From ed706c8d1d05ef7aa4f18df1566b478905e0456e Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 29 Jun 2021 10:40:44 +0200 Subject: [PATCH 001/164] Initial commit --- packages/v3/.gitignore | 2 +- packages/v3/components/Tasks.ts | 37 +++++ packages/v3/hardhat.config.ts | 2 + packages/v3/migration/engine/errors.ts | 12 ++ packages/v3/migration/engine/migrate.ts | 42 +++++ packages/v3/migration/engine/task.ts | 3 + packages/v3/migration/engine/types.ts | 26 +++ packages/v3/migration/engine/utils.ts | 155 ++++++++++++++++++ .../migrations/0_initialDeployment.ts | 25 +++ packages/v3/package.json | 1 + packages/v3/tsconfig.json | 2 +- yarn.lock | 5 + 12 files changed, 310 insertions(+), 2 deletions(-) create mode 100644 packages/v3/components/Tasks.ts create mode 100644 packages/v3/migration/engine/errors.ts create mode 100644 packages/v3/migration/engine/migrate.ts create mode 100644 packages/v3/migration/engine/task.ts create mode 100644 packages/v3/migration/engine/types.ts create mode 100644 packages/v3/migration/engine/utils.ts create mode 100644 packages/v3/migration/migrations/0_initialDeployment.ts diff --git a/packages/v3/.gitignore b/packages/v3/.gitignore index fce6b7170..8565b450c 100644 --- a/packages/v3/.gitignore +++ b/packages/v3/.gitignore @@ -9,7 +9,7 @@ yarn-error.log* cache artifacts -data +/data typechain .coverage_artifacts diff --git a/packages/v3/components/Tasks.ts b/packages/v3/components/Tasks.ts new file mode 100644 index 000000000..7bf335796 --- /dev/null +++ b/packages/v3/components/Tasks.ts @@ -0,0 +1,37 @@ +import path from 'path'; +import { task, types } from 'hardhat/config'; +import { BigNumberish } from 'ethers'; + +export type executeOverride = { gasPrice?: BigNumberish }; + +export type executionConfig = { confirmationToWait: number }; + +export const importCsjOrEsModule = (filePath: string) => { + const imported = require(filePath); + return imported.default !== undefined ? imported.default : imported; +}; + +export const lazyAction = (pathToAction: string) => { + return (taskArgs: any, hre: any, runSuper: any) => { + const actualPath = path.isAbsolute(pathToAction) + ? pathToAction + : path.join(hre.config.paths.root, pathToAction); + const action = importCsjOrEsModule(actualPath); + + return action(taskArgs, hre, runSuper); + }; +}; + +export type defaultParamTask = { + ledger: boolean; + ledgerPath: string; + gasPrice: number; + confirmationToWait: number; +}; + +export const newDefaultTask = (taskName: string, description: string) => + task('bancor:' + taskName, description) + .addFlag('ledger', 'Signing from a ledger') + .addParam('ledgerPath', 'Ledger path', "m/44'/60'/0'/0", types.string) + .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) + .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int); diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index 6eb75d2d1..0bbff7c26 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -16,6 +16,8 @@ import 'hardhat-contract-sizer'; import 'hardhat-abi-exporter'; import 'hardhat-gas-reporter'; +import './migration/engine/task'; + const configPath = path.join(__dirname, '/config.json'); const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {}; diff --git a/packages/v3/migration/engine/errors.ts b/packages/v3/migration/engine/errors.ts new file mode 100644 index 000000000..51f16c729 --- /dev/null +++ b/packages/v3/migration/engine/errors.ts @@ -0,0 +1,12 @@ +import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; + +export class executionError extends Error { + tx: ContractTransaction; + receipt: ContractReceipt; + + constructor(tx: ContractTransaction, receipt: ContractReceipt) { + super('Execution Error'); + this.receipt = receipt; + this.tx = tx; + } +} diff --git a/packages/v3/migration/engine/migrate.ts b/packages/v3/migration/engine/migrate.ts new file mode 100644 index 000000000..007ec39ff --- /dev/null +++ b/packages/v3/migration/engine/migrate.ts @@ -0,0 +1,42 @@ +import { defaultParam, Migration } from './types'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { importCsjOrEsModule } from 'components/Tasks'; +import { deployExecute, getDefaultParams } from './utils'; +import chalk from 'chalk'; + +export default async (args: defaultParam, hre: HardhatRuntimeEnvironment) => { + const { signer, migrationsData, state, writeState, executionConfig, overrides } = await getDefaultParams(hre, args); + + if (migrationsData.length === 0) { + console.log(chalk.yellowBright`Nothing to migrate ⚡️`); + return; + } + + let networkState: any = state.networkState; + for (const migrationFilePath in migrationsData) { + const migrationData = migrationsData[migrationFilePath]; + + const migration = importCsjOrEsModule(migrationData.fullPath) as Migration; + + console.log(chalk.blueBright`Executing ${migrationData.fileName}, id: ${migrationData.migrationId}`); + + try { + networkState = await migration.up(signer, networkState, deployExecute(executionConfig, overrides)); + + // If healthcheck doesn't pass + if (!(await migration.healthcheck(signer, networkState, deployExecute(executionConfig, overrides)))) { + // migration down + } + // Update migration state + const newMigrationState = state.migrationState; + newMigrationState.latestMigration = migrationData.migrationId; + + writeState(newMigrationState, networkState); + } catch (e) { + console.log(chalk.red(e)); + // migration down + return; + } + } + console.log(chalk.yellowBright`Migration(s) complete ⚡️`); +}; diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts new file mode 100644 index 000000000..7430e645f --- /dev/null +++ b/packages/v3/migration/engine/task.ts @@ -0,0 +1,3 @@ +import { lazyAction, newDefaultTask } from 'components/Tasks'; + +newDefaultTask('migrate', '').setAction(lazyAction('migration/engine/migrate.ts')); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts new file mode 100644 index 000000000..ddbc4acf6 --- /dev/null +++ b/packages/v3/migration/engine/types.ts @@ -0,0 +1,26 @@ +import { Signer } from 'ethers'; +import { deployExecuteType } from './utils'; + +export type defaultParam = { + ledger: boolean; + ledgerPath: string; + gasPrice: number; + confirmationToWait: number; +}; + +export type State = { + migrationState: { + latestMigration: number; + }; + networkState: any; +}; + +export type token = { + address: string; + tx: string; +}; + +export interface Migration { + up: (signer: Signer, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; + healthcheck: (signer: Signer, state: any, { deploy, execute }: deployExecuteType) => Promise; +} diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils.ts new file mode 100644 index 000000000..acf6ef018 --- /dev/null +++ b/packages/v3/migration/engine/utils.ts @@ -0,0 +1,155 @@ +import fs from 'fs'; +import path from 'path'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { LedgerSigner } from '@ethersproject/hardware-wallets'; +import { Contract } from 'components/Contracts'; +import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; +import { defaultParamTask, executionConfig, executeOverride } from 'components/Tasks'; +import { executionError } from './errors'; +import chalk from 'chalk'; +import { BigNumber } from 'ethers'; +import { State } from 'migration/engine/types'; +import { parseUnits } from 'ethers/lib/utils'; + +export const MIGRATION_FOLDER = 'migration'; + +export const writeFetchState = (hre: HardhatRuntimeEnvironment) => { + const pathToState = path.join(hre.config.paths.root, MIGRATION_FOLDER, 'data', hre.network.name); + return { + writeState: async (migrationState: any, networkState: any) => { + const state: State = { + migrationState: migrationState, + networkState: networkState + }; + fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); + }, + fetchState: () => { + return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as State; + } + }; +}; + +export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: defaultParamTask) => { + // Signer check + const signer = args.ledger + ? new LedgerSigner(hre.ethers.provider, 'hid', args.ledgerPath) + : (await hre.ethers.getSigners())[0]; + + // Overrides check + let overrides: executeOverride = {}; + + if (args.gasPrice === 0 && hre.network.name === 'mainnet') { + throw new Error("Gas Price shouldn't be equal to 0 for mainnet use"); + } + overrides.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); + + // Execution config + let executionConfig: executionConfig = { + confirmationToWait: args.confirmationToWait + }; + + if (executionConfig.confirmationToWait <= 1 && hre.network.name === 'mainnet') { + throw new Error("Confirmation to wait shouldn't be lower than or equal to 1 for mainnet use"); + } + + // Deployment files + let pathToDeploymentFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER, 'data', hre.network.name); + if (!fs.existsSync(pathToDeploymentFiles)) { + fs.mkdirSync(pathToDeploymentFiles); + } + + const allDeploymentFiles = fs.readdirSync(pathToDeploymentFiles); + const deploymentFiles = allDeploymentFiles.filter((fileName: string) => fileName === 'state.json'); + + const { writeState, fetchState } = writeFetchState(hre); + + // If there is no state file in the network's folder, create one + if (deploymentFiles.length === 0) { + writeState( + { + latestMigration: -1 + }, + {} + ); + } + const state = fetchState(); + + // Migration files + const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER, 'migrations'); + const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); + const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); + const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); + const migrationsData: { + fullPath: string; + fileName: string; + migrationId: number; + }[] = []; + for (const migrationFilePath of migrationFilesPath) { + const fileName = path.basename(migrationFilePath); + const migrationId = Number(fileName.split('_')[0]); + if (migrationId > state.migrationState.latestMigration) { + migrationsData.push({ + fullPath: migrationFilePath, + fileName: fileName, + migrationId: migrationId + }); + } + } + migrationsData.sort((a, b) => (a.migrationId > b.migrationId ? 1 : b.migrationId > a.migrationId ? -1 : 0)); + return { + signer, + state, + writeState, + migrationsData, + executionConfig, + overrides + }; +}; + +export type deployExecuteType = ReturnType; +export const deployExecute = (executionConfig: executionConfig, overrides: executeOverride) => { + const deploy = async Promise>( + name: string, + func: T, + ...args: Parameters + ): Promise> => { + const contract = await func(...args, overrides); + console.log(chalk.yellow`Deploying contract ${name} (${contract.__contractName__})`); + console.log(`Tx: `, contract.deployTransaction.hash); + + console.log(chalk.grey`Waiting to be mined ...`); + const receipt = await contract.deployTransaction.wait(executionConfig.confirmationToWait); + + if (receipt.status !== 1) { + console.log(chalk.red`Error while executing.`); + throw new executionError(contract.deployTransaction, receipt); + } + + console.log(chalk.greenBright`Deployed at ${contract.address} 🚀 `); + return contract; + }; + + const execute = async Promise>( + executionInstruction: string, + func: T, + ...args: Parameters + ): Promise => { + const tx = await func(...args, overrides); + console.log(executionInstruction); + console.log(`Executing tx: `, tx.hash); + + const receipt = await tx.wait(executionConfig.confirmationToWait); + if (receipt.status !== 1) { + console.log(chalk.red`Error while executing.`); + throw new executionError(tx, receipt); + } + + console.log(chalk.greenBright`Executed ✨`); + return receipt; + }; + + return { + deploy, + execute + }; +}; diff --git a/packages/v3/migration/migrations/0_initialDeployment.ts b/packages/v3/migration/migrations/0_initialDeployment.ts new file mode 100644 index 000000000..9d5c5fafa --- /dev/null +++ b/packages/v3/migration/migrations/0_initialDeployment.ts @@ -0,0 +1,25 @@ +import Contracts from 'components/Contracts'; +import { parseUnits } from 'ethers/lib/utils'; +import { Migration, token } from 'migration/engine/types'; + +export type State = { + BNT: token; +}; + +const migration: Migration = { + up: async (signer, _, { deploy, execute }): Promise => { + const contracts = Contracts.connect(signer); + + const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', parseUnits('10000')); + return { + BNT: { + address: BNT.address, + tx: BNT.deployTransaction.hash + } + }; + }, + healthcheck: async (signer, state: State, { deploy, execute }) => { + return true; + } +}; +export default migration; diff --git a/packages/v3/package.json b/packages/v3/package.json index 1ebe1135b..505619bac 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -19,6 +19,7 @@ "!/contracts/helpers" ], "scripts": { + "hh": "hardhat", "build": "hardhat compile", "test": "yarn build && NODE_OPTIONS='--max-old-space-size=6144' hardhat test", "testb": "BAIL=1 yarn test", diff --git a/packages/v3/tsconfig.json b/packages/v3/tsconfig.json index a20c40dc1..8f3c62043 100644 --- a/packages/v3/tsconfig.json +++ b/packages/v3/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "baseUrl": "./" }, - "include": ["./test", "./tasks", "./components"], + "include": ["./test", "./tasks", "./components", "./migration"], "files": ["./hardhat.config.ts"], "paths": {} } diff --git a/yarn.lock b/yarn.lock index 02de45ef8..3700c8f16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1574,6 +1574,11 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.4.1-solc-0.7-2.tgz#8d46f2310560d3756bd5235e20f4e50caa947e92" integrity sha512-hGbNTTlkcsRhMdJ+IMAWKn5uI1IK9yvJamZpQou1aOjgr+VOFo7eqdiqs+Dwv8fGzN7L/Wdg4XqiW3vGqTHk3g== +"@openzeppelin/contracts@3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.2.0.tgz#3e6b3a7662d8ed64271ade96ef42655db983fd9d" + integrity sha512-bUOmkSoPkjnUyMiKo6RYnb0VHBk5D9KKDAgNLzF41aqAM3TeE0yGdFF5dVRcV60pZdJLlyFT/jjXIZCWyyEzAQ== + "@openzeppelin/contracts@3.4.0": version "3.4.0" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.0.tgz#9a1669ad5f9fdfb6e273bb5a4fed10cb4cc35eb0" From 13342ef3b26798f1a7c1c98c325540e6a91f9bec Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 29 Jun 2021 20:39:56 +0200 Subject: [PATCH 002/164] Rework architecture + adding docs --- packages/v3/.gitignore | 3 + packages/v3/components/Tasks.ts | 20 --- packages/v3/hardhat.config.ts | 2 +- packages/v3/migration/README.md | 22 ++++ packages/v3/migration/engine/executions.ts | 55 ++++++++ packages/v3/migration/engine/logger.ts | 11 ++ packages/v3/migration/engine/migrate.ts | 42 ------ packages/v3/migration/engine/task.ts | 3 - .../migration/engine/tasks/createMigration.ts | 39 ++++++ packages/v3/migration/engine/tasks/index.ts | 29 +++++ packages/v3/migration/engine/tasks/migrate.ts | 46 +++++++ packages/v3/migration/engine/types.ts | 13 +- packages/v3/migration/engine/utils.ts | 123 +++++++----------- .../migrations/0_initialDeployment.ts | 4 +- 14 files changed, 261 insertions(+), 151 deletions(-) create mode 100644 packages/v3/migration/README.md create mode 100644 packages/v3/migration/engine/executions.ts create mode 100644 packages/v3/migration/engine/logger.ts delete mode 100644 packages/v3/migration/engine/migrate.ts delete mode 100644 packages/v3/migration/engine/task.ts create mode 100644 packages/v3/migration/engine/tasks/createMigration.ts create mode 100644 packages/v3/migration/engine/tasks/index.ts create mode 100644 packages/v3/migration/engine/tasks/migrate.ts diff --git a/packages/v3/.gitignore b/packages/v3/.gitignore index 8565b450c..56cde6edf 100644 --- a/packages/v3/.gitignore +++ b/packages/v3/.gitignore @@ -23,3 +23,6 @@ scTopics contracts/hardhat-dependency-compiler config.json + +migration/data/hardhat +migration/data/localhost diff --git a/packages/v3/components/Tasks.ts b/packages/v3/components/Tasks.ts index 7bf335796..8f441594f 100644 --- a/packages/v3/components/Tasks.ts +++ b/packages/v3/components/Tasks.ts @@ -1,10 +1,4 @@ import path from 'path'; -import { task, types } from 'hardhat/config'; -import { BigNumberish } from 'ethers'; - -export type executeOverride = { gasPrice?: BigNumberish }; - -export type executionConfig = { confirmationToWait: number }; export const importCsjOrEsModule = (filePath: string) => { const imported = require(filePath); @@ -21,17 +15,3 @@ export const lazyAction = (pathToAction: string) => { return action(taskArgs, hre, runSuper); }; }; - -export type defaultParamTask = { - ledger: boolean; - ledgerPath: string; - gasPrice: number; - confirmationToWait: number; -}; - -export const newDefaultTask = (taskName: string, description: string) => - task('bancor:' + taskName, description) - .addFlag('ledger', 'Signing from a ledger') - .addParam('ledgerPath', 'Ledger path', "m/44'/60'/0'/0", types.string) - .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) - .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int); diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index f278afb2d..3701b5a63 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -17,7 +17,7 @@ import 'hardhat-contract-sizer'; import 'hardhat-abi-exporter'; import 'hardhat-gas-reporter'; -import './migration/engine/task'; +import './migration/engine/tasks'; const configPath = path.join(__dirname, '/config.json'); const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {}; diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md new file mode 100644 index 000000000..88a7bb2bb --- /dev/null +++ b/packages/v3/migration/README.md @@ -0,0 +1,22 @@ +# Migration + +## data + +The `data` folder got a folder for each network used. + +In each network folder there is a `state.json` file. It represent the migration state and the network state. + +This is a sample: + +```json +{ + "migrationState": { + "latestMigration": 0 + }, + "networkState": {} +} +``` + +## engine + +## migrations diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts new file mode 100644 index 000000000..f58ed94ae --- /dev/null +++ b/packages/v3/migration/engine/executions.ts @@ -0,0 +1,55 @@ +import { executionError } from './errors'; +import { Contract } from 'components/Contracts'; +import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; +import { log } from './logger'; +import { executeOverride, executionConfig } from './utils'; + +export type deployExecuteType = ReturnType; + +export const initDeployExecute = (executionConfig: executionConfig, overrides: executeOverride) => { + const deploy = async Promise>( + name: string, + func: T, + ...args: Parameters + ): Promise> => { + const contract = await func(...args, overrides); + + log.executingTx(`Deploying contract ${name} (${contract.__contractName__})`); + console.log(`Tx: `, contract.deployTransaction.hash); + + log.greyed(`Waiting to be mined ...`); + const receipt = await contract.deployTransaction.wait(executionConfig.confirmationToWait); + + if (receipt.status !== 1) { + log.error(`Error while executing.`); + throw new executionError(contract.deployTransaction, receipt); + } + + log.success(`Deployed at ${contract.address} 🚀 `); + return contract; + }; + + const execute = async Promise>( + executionInstruction: string, + func: T, + ...args: Parameters + ): Promise => { + const tx = await func(...args, overrides); + console.log(executionInstruction); + console.log(`Executing tx: `, tx.hash); + + const receipt = await tx.wait(executionConfig.confirmationToWait); + if (receipt.status !== 1) { + log.error(`Error while executing.`); + throw new executionError(tx, receipt); + } + + log.success(`Executed ✨`); + return receipt; + }; + + return { + deploy, + execute + }; +}; diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts new file mode 100644 index 000000000..f058fc25b --- /dev/null +++ b/packages/v3/migration/engine/logger.ts @@ -0,0 +1,11 @@ +import chalk from 'chalk'; + +export const log = { + info: (str: string) => console.log(chalk.cyanBright`⚠️ ${str}`), + done: (str: string) => console.log(chalk.bold.yellowBright`${str}`), + executing: (str: string) => console.log(chalk.bold.blue`${str}`), + executingTx: (str: string) => console.log(chalk.bold.yellow`${str}`), + greyed: (str: string) => console.log(chalk.grey`${str}`), + success: (str: string) => console.log(chalk.bold.greenBright`${str}`), + error: (str: string) => console.log(chalk.bold.red`⛔️ ${str}`) +}; diff --git a/packages/v3/migration/engine/migrate.ts b/packages/v3/migration/engine/migrate.ts deleted file mode 100644 index 007ec39ff..000000000 --- a/packages/v3/migration/engine/migrate.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { defaultParam, Migration } from './types'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { importCsjOrEsModule } from 'components/Tasks'; -import { deployExecute, getDefaultParams } from './utils'; -import chalk from 'chalk'; - -export default async (args: defaultParam, hre: HardhatRuntimeEnvironment) => { - const { signer, migrationsData, state, writeState, executionConfig, overrides } = await getDefaultParams(hre, args); - - if (migrationsData.length === 0) { - console.log(chalk.yellowBright`Nothing to migrate ⚡️`); - return; - } - - let networkState: any = state.networkState; - for (const migrationFilePath in migrationsData) { - const migrationData = migrationsData[migrationFilePath]; - - const migration = importCsjOrEsModule(migrationData.fullPath) as Migration; - - console.log(chalk.blueBright`Executing ${migrationData.fileName}, id: ${migrationData.migrationId}`); - - try { - networkState = await migration.up(signer, networkState, deployExecute(executionConfig, overrides)); - - // If healthcheck doesn't pass - if (!(await migration.healthcheck(signer, networkState, deployExecute(executionConfig, overrides)))) { - // migration down - } - // Update migration state - const newMigrationState = state.migrationState; - newMigrationState.latestMigration = migrationData.migrationId; - - writeState(newMigrationState, networkState); - } catch (e) { - console.log(chalk.red(e)); - // migration down - return; - } - } - console.log(chalk.yellowBright`Migration(s) complete ⚡️`); -}; diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts deleted file mode 100644 index 7430e645f..000000000 --- a/packages/v3/migration/engine/task.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { lazyAction, newDefaultTask } from 'components/Tasks'; - -newDefaultTask('migrate', '').setAction(lazyAction('migration/engine/migrate.ts')); diff --git a/packages/v3/migration/engine/tasks/createMigration.ts b/packages/v3/migration/engine/tasks/createMigration.ts new file mode 100644 index 000000000..18d1395d6 --- /dev/null +++ b/packages/v3/migration/engine/tasks/createMigration.ts @@ -0,0 +1,39 @@ +import fs from 'fs'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import path from 'path'; +import { log } from '../logger'; +import { createMigrationParamTask } from '.'; +import { MIGRATION_FOLDER } from '../utils'; + +export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { + const templateMigrationFile = `import Contracts from 'components/Contracts'; +import { Migration } from 'migration/engine/types'; + +export type State = {}; + +const migration: Migration = { + up: async (signer, _, { deploy, execute }): Promise => { + const contracts = Contracts.connect(signer); + return {}; + }, + healthcheck: async (signer, state: State, { deploy, execute }) => { + return true; + } +}; +export default migration; +`; + + if (args.migrationName === '') { + throw new Error('File name cannot be empty'); + } + + // Fetch timestamp + const migrationId = Date.now(); + + const fileName = `${migrationId}_${args.migrationName}.ts`; + + const pathToNewMigrationFile = path.join(hre.config.paths.root, MIGRATION_FOLDER, fileName); + fs.writeFileSync(pathToNewMigrationFile, templateMigrationFile); + + log.done(`Migration file created ⚡️`); +}; diff --git a/packages/v3/migration/engine/tasks/index.ts b/packages/v3/migration/engine/tasks/index.ts new file mode 100644 index 000000000..a7a2d9a10 --- /dev/null +++ b/packages/v3/migration/engine/tasks/index.ts @@ -0,0 +1,29 @@ +import { lazyAction } from 'components/Tasks'; +import { task, types } from 'hardhat/config'; + +const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks/'; + +export type defaultParamTask = { + ledger: boolean; + ledgerPath: string; + gasPrice: number; + confirmationToWait: number; +}; + +export type migrateParamTask = defaultParamTask & { + reset: boolean; +}; +task('migrate', 'Migrate the network') + .addFlag('ledger', 'Signing from a ledger') + .addParam('ledgerPath', 'Ledger path', "m/44'/60'/0'/0", types.string) + .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) + .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int) + .addFlag('reset', 'Reset the migration data') + .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'migration.ts')); + +export type createMigrationParamTask = { + migrationName: string; +}; +task('createMigration', 'Create a migration file') + .addParam('migrationName', 'Name of the migration name') + .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'createMigration.ts')); diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts new file mode 100644 index 000000000..6a69482de --- /dev/null +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -0,0 +1,46 @@ +import { Migration } from '../types'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { importCsjOrEsModule } from 'components/Tasks'; +import { getMigrateParams } from '../utils'; +import { log } from '../logger'; +import { migrateParamTask } from '.'; + +export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { + const { signer, migrationsData, initialState, writeState, deployExecute } = await getMigrateParams(hre, args); + + let state = initialState; + + // If there is no migration to run, exit + if (migrationsData.length === 0) { + log.done(`Nothing to migrate ⚡️`); + return; + } + + let currentNetworkState: any = state.networkState; + for (const migrationData of migrationsData) { + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + + log.executing(`Executing ${migrationData.fileName}, id: ${migrationData.migrationId}`); + + try { + currentNetworkState = await migration.up(signer, currentNetworkState, deployExecute); + + // If healthcheck doesn't pass + if (!(await migration.healthcheck(signer, currentNetworkState, deployExecute))) { + log.error("Healthcheck didn't pass"); + // @TODO revert the migration here + return; + } + + // If healthcheck passed, update the state and write it to the system + state.migrationState = { latestMigration: migrationData.migrationId }; + writeState(state); + } catch (e) { + log.error('Migration execution failed'); + log.error(e); + // @TODO revert the migration here + return; + } + } + log.done(`Migration(s) complete ⚡️`); +}; diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index ddbc4acf6..477b06b3c 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,21 +1,14 @@ import { Signer } from 'ethers'; -import { deployExecuteType } from './utils'; +import { deployExecuteType } from './executions'; -export type defaultParam = { - ledger: boolean; - ledgerPath: string; - gasPrice: number; - confirmationToWait: number; -}; - -export type State = { +export type SystemState = { migrationState: { latestMigration: number; }; networkState: any; }; -export type token = { +export type deployedContract = { address: string; tx: string; }; diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils.ts index acf6ef018..e4688e4bf 100644 --- a/packages/v3/migration/engine/utils.ts +++ b/packages/v3/migration/engine/utils.ts @@ -2,29 +2,28 @@ import fs from 'fs'; import path from 'path'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; -import { Contract } from 'components/Contracts'; -import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -import { defaultParamTask, executionConfig, executeOverride } from 'components/Tasks'; -import { executionError } from './errors'; -import chalk from 'chalk'; -import { BigNumber } from 'ethers'; -import { State } from 'migration/engine/types'; + +import { SystemState } from 'migration/engine/types'; import { parseUnits } from 'ethers/lib/utils'; +import { initDeployExecute } from './executions'; +import { defaultParamTask, migrateParamTask } from './tasks'; +import { log } from './logger'; +import { BigNumberish } from 'ethers'; + +export const MIGRATION_FOLDER = 'migration/migrations'; +export const MIGRATION_DATA_FOLDER = 'migration/data'; -export const MIGRATION_FOLDER = 'migration'; +export type executeOverride = { gasPrice?: BigNumberish }; +export type executionConfig = { confirmationToWait: number }; export const writeFetchState = (hre: HardhatRuntimeEnvironment) => { - const pathToState = path.join(hre.config.paths.root, MIGRATION_FOLDER, 'data', hre.network.name); + const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name); return { - writeState: async (migrationState: any, networkState: any) => { - const state: State = { - migrationState: migrationState, - networkState: networkState - }; + writeState: async (state: SystemState) => { fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); }, fetchState: () => { - return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as State; + return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; } }; }; @@ -52,30 +51,53 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def throw new Error("Confirmation to wait shouldn't be lower than or equal to 1 for mainnet use"); } + const deployExecute = initDeployExecute(executionConfig, overrides); + + return { + signer, + overrides, + executionConfig, + deployExecute + }; +}; + +export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { + const { signer, overrides, executionConfig, deployExecute } = await getDefaultParams(hre, args); + + // If reset, delete all the files in the corresponding network folder + if (args.reset) { + log.info(`Resetting ${hre.network.name} migratation folder`); + fs.rmSync(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name), { + recursive: true + }); + } + // Deployment files - let pathToDeploymentFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER, 'data', hre.network.name); + let pathToDeploymentFiles = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name); + // If deployment folder doesn't exist, create it if (!fs.existsSync(pathToDeploymentFiles)) { fs.mkdirSync(pathToDeploymentFiles); } + // Read all files into the folder and fetch any state file const allDeploymentFiles = fs.readdirSync(pathToDeploymentFiles); const deploymentFiles = allDeploymentFiles.filter((fileName: string) => fileName === 'state.json'); const { writeState, fetchState } = writeFetchState(hre); - // If there is no state file in the network's folder, create one + // If there is no state file in the network's folder, create an empty one if (deploymentFiles.length === 0) { - writeState( - { + writeState({ + migrationState: { latestMigration: -1 }, - {} - ); + networkState: {} + }); } - const state = fetchState(); + const initialState = fetchState(); // Migration files - const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER, 'migrations'); + const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); @@ -87,7 +109,7 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def for (const migrationFilePath of migrationFilesPath) { const fileName = path.basename(migrationFilePath); const migrationId = Number(fileName.split('_')[0]); - if (migrationId > state.migrationState.latestMigration) { + if (migrationId > initialState.migrationState.latestMigration) { migrationsData.push({ fullPath: migrationFilePath, fileName: fileName, @@ -95,61 +117,16 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def }); } } + // Even if migrations should be automatically sorted by the dir fetching, sort again just in case migrationsData.sort((a, b) => (a.migrationId > b.migrationId ? 1 : b.migrationId > a.migrationId ? -1 : 0)); + return { signer, - state, + initialState, + deployExecute, writeState, migrationsData, executionConfig, overrides }; }; - -export type deployExecuteType = ReturnType; -export const deployExecute = (executionConfig: executionConfig, overrides: executeOverride) => { - const deploy = async Promise>( - name: string, - func: T, - ...args: Parameters - ): Promise> => { - const contract = await func(...args, overrides); - console.log(chalk.yellow`Deploying contract ${name} (${contract.__contractName__})`); - console.log(`Tx: `, contract.deployTransaction.hash); - - console.log(chalk.grey`Waiting to be mined ...`); - const receipt = await contract.deployTransaction.wait(executionConfig.confirmationToWait); - - if (receipt.status !== 1) { - console.log(chalk.red`Error while executing.`); - throw new executionError(contract.deployTransaction, receipt); - } - - console.log(chalk.greenBright`Deployed at ${contract.address} 🚀 `); - return contract; - }; - - const execute = async Promise>( - executionInstruction: string, - func: T, - ...args: Parameters - ): Promise => { - const tx = await func(...args, overrides); - console.log(executionInstruction); - console.log(`Executing tx: `, tx.hash); - - const receipt = await tx.wait(executionConfig.confirmationToWait); - if (receipt.status !== 1) { - console.log(chalk.red`Error while executing.`); - throw new executionError(tx, receipt); - } - - console.log(chalk.greenBright`Executed ✨`); - return receipt; - }; - - return { - deploy, - execute - }; -}; diff --git a/packages/v3/migration/migrations/0_initialDeployment.ts b/packages/v3/migration/migrations/0_initialDeployment.ts index 9d5c5fafa..eaddfd77d 100644 --- a/packages/v3/migration/migrations/0_initialDeployment.ts +++ b/packages/v3/migration/migrations/0_initialDeployment.ts @@ -1,9 +1,9 @@ import Contracts from 'components/Contracts'; import { parseUnits } from 'ethers/lib/utils'; -import { Migration, token } from 'migration/engine/types'; +import { Migration, deployedContract } from 'migration/engine/types'; export type State = { - BNT: token; + BNT: deployedContract; }; const migration: Migration = { From eef9a6bddd42868a8f1fc987c84cb0b419c3bc36 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 30 Jun 2021 12:06:28 +0200 Subject: [PATCH 003/164] Update README.md + few folder organizations --- .../v3/components/{Tasks.ts => TasksUtils.ts} | 0 packages/v3/migration/README.md | 82 +++++++++++++++++-- packages/v3/migration/engine/tasks/index.ts | 6 +- packages/v3/migration/engine/tasks/migrate.ts | 9 +- packages/v3/migration/engine/types.ts | 2 +- packages/v3/migration/engine/utils.ts | 8 +- 6 files changed, 92 insertions(+), 15 deletions(-) rename packages/v3/components/{Tasks.ts => TasksUtils.ts} (100%) diff --git a/packages/v3/components/Tasks.ts b/packages/v3/components/TasksUtils.ts similarity index 100% rename from packages/v3/components/Tasks.ts rename to packages/v3/components/TasksUtils.ts diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 88a7bb2bb..a4d4b838b 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -4,19 +4,91 @@ The `data` folder got a folder for each network used. -In each network folder there is a `state.json` file. It represent the migration state and the network state. - -This is a sample: +In each network folder there is a `state.json` file. It represents the migration state and the network state: ```json { "migrationState": { - "latestMigration": 0 + "latestMigration": -1 }, "networkState": {} } ``` +## migrations + +The `migration` folder is home for all migrations file. + +A migration file is a typescript file that expose a particular object respecting a strict interface: + +```ts +export interface Migration { + up: (signer: Signer, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; + healthcheck: (signer: Signer, newState: any, { deploy, execute }: deployExecuteType) => Promise; +} +``` + ## engine -## migrations +The engine expose 1 small task, and one main task `migrate`. + +### migrate + +Migrate the system from point A to point B. + +Algorithm: + +##### Fetch `{ signer, migrationsData, initialState, writeState, deployExecute }` + +`signer`: Can either be a normal signer or a ledger signer. This object is passed to the migration script. + +`migrationsData`: An array of migrationData to be executed (counting only the migration that haven't been already run - using the timestamp as reference). A migrationData is: + +```ts +{ + fullPath: string; + fileName: string; + migrationTimestamp: number; +} +``` + +`initialState`: The state of the global system on a particular network. It's fetch from the `state.json` file mentionned above. The property `networkState` of this object is passed to the migration script. + +`writeState`: A function that will replace the current state of the network with the one provided. + +`deployExecute`: An object that have 2 functions, `deploy` and `execute`. This object is passed to the migration script. + +##### Running the migration + +1. If there is no migrationsData in the array, exit. + +2. Run every migration in a loop as follow: + -> Importing the migration file. + -> Executing the `up` function of that migration file. + ---> If `up` throw, exit. // @TODO add `down` functionnality (this is going to be complicated here). + -> Executing the `healthcheck` function of that migration file. + ---> If healthcheck returns false, exit. // @TODO add `down` functionnality. + -> Update the latestMigration to the current migration's timestamp. + -> Update the networkState to the new networkState + +###### createMigration + +Create a migration file based from a template. + +```ts +import Contracts from 'components/Contracts'; +import { Migration } from 'migration/engine/types'; + +export type State = {}; + +const migration: Migration = { + up: async (signer, _, { deploy, execute }): Promise => { + const contracts = Contracts.connect(signer); + return {}; + }, + healthcheck: async (signer, state: State, { deploy, execute }) => { + return true; + } +}; +export default migration; +``` diff --git a/packages/v3/migration/engine/tasks/index.ts b/packages/v3/migration/engine/tasks/index.ts index a7a2d9a10..cbc1dca8b 100644 --- a/packages/v3/migration/engine/tasks/index.ts +++ b/packages/v3/migration/engine/tasks/index.ts @@ -1,4 +1,4 @@ -import { lazyAction } from 'components/Tasks'; +import { lazyAction } from 'components/TasksUtils'; import { task, types } from 'hardhat/config'; const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks/'; @@ -19,11 +19,11 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'migration.ts')); + .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'migrate.ts')); export type createMigrationParamTask = { migrationName: string; }; task('createMigration', 'Create a migration file') - .addParam('migrationName', 'Name of the migration name') + .addPositionalParam('migrationName', 'Name of the migration name') .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'createMigration.ts')); diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index 6a69482de..d4f554465 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -1,6 +1,6 @@ import { Migration } from '../types'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { importCsjOrEsModule } from 'components/Tasks'; +import { importCsjOrEsModule } from 'components/TasksUtils'; import { getMigrateParams } from '../utils'; import { log } from '../logger'; import { migrateParamTask } from '.'; @@ -20,7 +20,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => for (const migrationData of migrationsData) { const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - log.executing(`Executing ${migrationData.fileName}, id: ${migrationData.migrationId}`); + log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); try { currentNetworkState = await migration.up(signer, currentNetworkState, deployExecute); @@ -33,7 +33,10 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => } // If healthcheck passed, update the state and write it to the system - state.migrationState = { latestMigration: migrationData.migrationId }; + state = { + migrationState: { latestMigration: migrationData.migrationTimestamp }, + networkState: currentNetworkState + }; writeState(state); } catch (e) { log.error('Migration execution failed'); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 477b06b3c..709a41171 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -15,5 +15,5 @@ export type deployedContract = { export interface Migration { up: (signer: Signer, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; - healthcheck: (signer: Signer, state: any, { deploy, execute }: deployExecuteType) => Promise; + healthcheck: (signer: Signer, newState: any, { deploy, execute }: deployExecuteType) => Promise; } diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils.ts index e4688e4bf..5556d873a 100644 --- a/packages/v3/migration/engine/utils.ts +++ b/packages/v3/migration/engine/utils.ts @@ -104,7 +104,7 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig const migrationsData: { fullPath: string; fileName: string; - migrationId: number; + migrationTimestamp: number; }[] = []; for (const migrationFilePath of migrationFilesPath) { const fileName = path.basename(migrationFilePath); @@ -113,12 +113,14 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig migrationsData.push({ fullPath: migrationFilePath, fileName: fileName, - migrationId: migrationId + migrationTimestamp: migrationId }); } } // Even if migrations should be automatically sorted by the dir fetching, sort again just in case - migrationsData.sort((a, b) => (a.migrationId > b.migrationId ? 1 : b.migrationId > a.migrationId ? -1 : 0)); + migrationsData.sort((a, b) => + a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 + ); return { signer, From 36550b25c6d0858f2595c7a2fa09193420e9fdc3 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 30 Jun 2021 12:32:57 +0200 Subject: [PATCH 004/164] Architecture folder reorg + add info to README --- packages/v3/migration/README.md | 4 + packages/v3/migration/engine/tasks/index.ts | 5 +- .../engine/tasks/{ => migrate}/migrate.ts | 8 +- .../engine/tasks/migrate/migrateUtils.ts | 92 +++++++++++++++++++ .../tasks/{ => subtasks}/createMigration.ts | 6 +- packages/v3/migration/engine/utils.ts | 88 +----------------- 6 files changed, 107 insertions(+), 96 deletions(-) rename packages/v3/migration/engine/tasks/{ => migrate}/migrate.ts (91%) create mode 100644 packages/v3/migration/engine/tasks/migrate/migrateUtils.ts rename packages/v3/migration/engine/tasks/{ => subtasks}/createMigration.ts (89%) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index a4d4b838b..2817bcac4 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -36,6 +36,8 @@ The engine expose 1 small task, and one main task `migrate`. Migrate the system from point A to point B. +`yarn hh migrate --help` for more info on params. + Algorithm: ##### Fetch `{ signer, migrationsData, initialState, writeState, deployExecute }` @@ -75,6 +77,8 @@ Algorithm: Create a migration file based from a template. +`yarn hh createMigration --help` for more info on params. + ```ts import Contracts from 'components/Contracts'; import { Migration } from 'migration/engine/types'; diff --git a/packages/v3/migration/engine/tasks/index.ts b/packages/v3/migration/engine/tasks/index.ts index cbc1dca8b..6a6f53304 100644 --- a/packages/v3/migration/engine/tasks/index.ts +++ b/packages/v3/migration/engine/tasks/index.ts @@ -2,6 +2,7 @@ import { lazyAction } from 'components/TasksUtils'; import { task, types } from 'hardhat/config'; const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks/'; +const PATH_TO_ENGINE_SUBTASKS_FOLDER = 'migration/engine/tasks/subtasks/'; export type defaultParamTask = { ledger: boolean; @@ -19,11 +20,11 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'migrate.ts')); + .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'migrate/migrate.ts')); export type createMigrationParamTask = { migrationName: string; }; task('createMigration', 'Create a migration file') .addPositionalParam('migrationName', 'Name of the migration name') - .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'createMigration.ts')); + .setAction(lazyAction(PATH_TO_ENGINE_SUBTASKS_FOLDER + 'createMigration.ts')); diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate/migrate.ts similarity index 91% rename from packages/v3/migration/engine/tasks/migrate.ts rename to packages/v3/migration/engine/tasks/migrate/migrate.ts index d4f554465..f394d02fd 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate/migrate.ts @@ -1,9 +1,9 @@ -import { Migration } from '../types'; +import { Migration } from '../../types'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { importCsjOrEsModule } from 'components/TasksUtils'; -import { getMigrateParams } from '../utils'; -import { log } from '../logger'; -import { migrateParamTask } from '.'; +import { log } from '../../logger'; +import { migrateParamTask } from '..'; +import { getMigrateParams } from './migrateUtils'; export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { const { signer, migrationsData, initialState, writeState, deployExecute } = await getMigrateParams(hre, args); diff --git a/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts b/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts new file mode 100644 index 000000000..3d65b3a3d --- /dev/null +++ b/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts @@ -0,0 +1,92 @@ +import fs from 'fs'; +import path from 'path'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; + +import { SystemState } from 'migration/engine/types'; +import { migrateParamTask } from '../../tasks'; +import { log } from '../../logger'; +import { getDefaultParams, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from '../../utils'; + +export const writeFetchState = (hre: HardhatRuntimeEnvironment) => { + const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name); + return { + writeState: async (state: SystemState) => { + fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); + }, + fetchState: () => { + return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; + } + }; +}; + +export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { + const { signer, overrides, executionConfig, deployExecute } = await getDefaultParams(hre, args); + + // If reset, delete all the files in the corresponding network folder + if (args.reset) { + log.info(`Resetting ${hre.network.name} migratation folder`); + fs.rmSync(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name), { + recursive: true + }); + } + + // Deployment files + let pathToDeploymentFiles = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name); + // If deployment folder doesn't exist, create it + if (!fs.existsSync(pathToDeploymentFiles)) { + fs.mkdirSync(pathToDeploymentFiles); + } + + // Read all files into the folder and fetch any state file + const allDeploymentFiles = fs.readdirSync(pathToDeploymentFiles); + const deploymentFiles = allDeploymentFiles.filter((fileName: string) => fileName === 'state.json'); + + const { writeState, fetchState } = writeFetchState(hre); + + // If there is no state file in the network's folder, create an empty one + if (deploymentFiles.length === 0) { + writeState({ + migrationState: { + latestMigration: -1 + }, + networkState: {} + }); + } + const initialState = fetchState(); + + // Migration files + const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); + const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); + const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); + const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); + const migrationsData: { + fullPath: string; + fileName: string; + migrationTimestamp: number; + }[] = []; + for (const migrationFilePath of migrationFilesPath) { + const fileName = path.basename(migrationFilePath); + const migrationId = Number(fileName.split('_')[0]); + if (migrationId > initialState.migrationState.latestMigration) { + migrationsData.push({ + fullPath: migrationFilePath, + fileName: fileName, + migrationTimestamp: migrationId + }); + } + } + // Even if migrations should be automatically sorted by the dir fetching, sort again just in case + migrationsData.sort((a, b) => + a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 + ); + + return { + signer, + initialState, + deployExecute, + writeState, + migrationsData, + executionConfig, + overrides + }; +}; diff --git a/packages/v3/migration/engine/tasks/createMigration.ts b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts similarity index 89% rename from packages/v3/migration/engine/tasks/createMigration.ts rename to packages/v3/migration/engine/tasks/subtasks/createMigration.ts index 18d1395d6..67bd68367 100644 --- a/packages/v3/migration/engine/tasks/createMigration.ts +++ b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts @@ -1,9 +1,9 @@ import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import path from 'path'; -import { log } from '../logger'; -import { createMigrationParamTask } from '.'; -import { MIGRATION_FOLDER } from '../utils'; +import { log } from '../../logger'; +import { createMigrationParamTask } from '..'; +import { MIGRATION_FOLDER } from '../../utils'; export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { const templateMigrationFile = `import Contracts from 'components/Contracts'; diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils.ts index 5556d873a..aa6b9ede6 100644 --- a/packages/v3/migration/engine/utils.ts +++ b/packages/v3/migration/engine/utils.ts @@ -3,11 +3,9 @@ import path from 'path'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; -import { SystemState } from 'migration/engine/types'; import { parseUnits } from 'ethers/lib/utils'; import { initDeployExecute } from './executions'; -import { defaultParamTask, migrateParamTask } from './tasks'; -import { log } from './logger'; +import { defaultParamTask } from './tasks'; import { BigNumberish } from 'ethers'; export const MIGRATION_FOLDER = 'migration/migrations'; @@ -16,18 +14,6 @@ export const MIGRATION_DATA_FOLDER = 'migration/data'; export type executeOverride = { gasPrice?: BigNumberish }; export type executionConfig = { confirmationToWait: number }; -export const writeFetchState = (hre: HardhatRuntimeEnvironment) => { - const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name); - return { - writeState: async (state: SystemState) => { - fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); - }, - fetchState: () => { - return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; - } - }; -}; - export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: defaultParamTask) => { // Signer check const signer = args.ledger @@ -60,75 +46,3 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def deployExecute }; }; - -export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { - const { signer, overrides, executionConfig, deployExecute } = await getDefaultParams(hre, args); - - // If reset, delete all the files in the corresponding network folder - if (args.reset) { - log.info(`Resetting ${hre.network.name} migratation folder`); - fs.rmSync(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name), { - recursive: true - }); - } - - // Deployment files - let pathToDeploymentFiles = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name); - // If deployment folder doesn't exist, create it - if (!fs.existsSync(pathToDeploymentFiles)) { - fs.mkdirSync(pathToDeploymentFiles); - } - - // Read all files into the folder and fetch any state file - const allDeploymentFiles = fs.readdirSync(pathToDeploymentFiles); - const deploymentFiles = allDeploymentFiles.filter((fileName: string) => fileName === 'state.json'); - - const { writeState, fetchState } = writeFetchState(hre); - - // If there is no state file in the network's folder, create an empty one - if (deploymentFiles.length === 0) { - writeState({ - migrationState: { - latestMigration: -1 - }, - networkState: {} - }); - } - const initialState = fetchState(); - - // Migration files - const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); - const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); - const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); - const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); - const migrationsData: { - fullPath: string; - fileName: string; - migrationTimestamp: number; - }[] = []; - for (const migrationFilePath of migrationFilesPath) { - const fileName = path.basename(migrationFilePath); - const migrationId = Number(fileName.split('_')[0]); - if (migrationId > initialState.migrationState.latestMigration) { - migrationsData.push({ - fullPath: migrationFilePath, - fileName: fileName, - migrationTimestamp: migrationId - }); - } - } - // Even if migrations should be automatically sorted by the dir fetching, sort again just in case - migrationsData.sort((a, b) => - a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 - ); - - return { - signer, - initialState, - deployExecute, - writeState, - migrationsData, - executionConfig, - overrides - }; -}; From c5500264bd18593ef4852b3349d729067c1be428 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 30 Jun 2021 14:50:22 +0200 Subject: [PATCH 005/164] README.md correction --- packages/v3/migration/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 2817bcac4..ddb0c8135 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -67,9 +67,9 @@ Algorithm: 2. Run every migration in a loop as follow: -> Importing the migration file. -> Executing the `up` function of that migration file. - ---> If `up` throw, exit. // @TODO add `down` functionnality (this is going to be complicated here). + ---> If `up` throw, exit. // @TODO add call to `down` functionnality (this is going to be complicated here). -> Executing the `healthcheck` function of that migration file. - ---> If healthcheck returns false, exit. // @TODO add `down` functionnality. + ---> If healthcheck returns false, exit. // @TODO add call to `down` functionnality. -> Update the latestMigration to the current migration's timestamp. -> Update the networkState to the new networkState From 9039d24ba9a7634d81064296454e53f10826aa12 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 5 Jul 2021 11:53:40 +0200 Subject: [PATCH 006/164] Minor fixes --- packages/v3/components/Contracts.ts | 2 ++ .../{TasksUtils.ts => TaskUtils.ts} | 2 +- packages/v3/migration/README.md | 16 ++++++------- packages/v3/migration/engine/executions.ts | 14 +++++------ packages/v3/migration/engine/logger.ts | 1 + packages/v3/migration/engine/tasks/index.ts | 13 ++++++----- .../migration/engine/tasks/migrate/migrate.ts | 10 ++++---- .../engine/tasks/subtasks/createMigration.ts | 23 ++++++++++++------- packages/v3/migration/engine/types.ts | 10 ++++++-- packages/v3/migration/engine/utils.ts | 8 +++---- ...lDeployment.ts => 0_initial_deployment.ts} | 8 +++---- 11 files changed, 62 insertions(+), 45 deletions(-) rename packages/v3/components/{TasksUtils.ts => TaskUtils.ts} (87%) rename packages/v3/migration/migrations/{0_initialDeployment.ts => 0_initial_deployment.ts} (68%) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 162c6ba87..acaeebb83 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -109,4 +109,6 @@ const getContracts = (signer?: Signer) => { }; }; +export type Contracts = ReturnType; + export default getContracts(); diff --git a/packages/v3/components/TasksUtils.ts b/packages/v3/components/TaskUtils.ts similarity index 87% rename from packages/v3/components/TasksUtils.ts rename to packages/v3/components/TaskUtils.ts index 8f441594f..79d9a8628 100644 --- a/packages/v3/components/TasksUtils.ts +++ b/packages/v3/components/TaskUtils.ts @@ -2,7 +2,7 @@ import path from 'path'; export const importCsjOrEsModule = (filePath: string) => { const imported = require(filePath); - return imported.default !== undefined ? imported.default : imported; + return imported.default || imported; }; export const lazyAction = (pathToAction: string) => { diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index ddb0c8135..4ad2a5f70 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -1,8 +1,8 @@ # Migration -## data +## Data -The `data` folder got a folder for each network used. +The `data` folder consists of one designated folder per network. In each network folder there is a `state.json` file. It represents the migration state and the network state: @@ -15,7 +15,7 @@ In each network folder there is a `state.json` file. It represents the migration } ``` -## migrations +## Migrations The `migration` folder is home for all migrations file. @@ -28,11 +28,11 @@ export interface Migration { } ``` -## engine +## Engine The engine expose 1 small task, and one main task `migrate`. -### migrate +### Migrate Migrate the system from point A to point B. @@ -42,7 +42,7 @@ Algorithm: ##### Fetch `{ signer, migrationsData, initialState, writeState, deployExecute }` -`signer`: Can either be a normal signer or a ledger signer. This object is passed to the migration script. +`signer`: Can either be a normal signer or a Ledger signer. This object is passed to the migration script. `migrationsData`: An array of migrationData to be executed (counting only the migration that haven't been already run - using the timestamp as reference). A migrationData is: @@ -54,7 +54,7 @@ Algorithm: } ``` -`initialState`: The state of the global system on a particular network. It's fetch from the `state.json` file mentionned above. The property `networkState` of this object is passed to the migration script. +`initialState`: The state of the global system on a particular network. It's fetched from the `state.json` file mentionned above. The property `networkState` of this object is passed to the migration script. `writeState`: A function that will replace the current state of the network with the one provided. @@ -77,7 +77,7 @@ Algorithm: Create a migration file based from a template. -`yarn hh createMigration --help` for more info on params. +`yarn hh create-migration --help` for more info on params. ```ts import Contracts from 'components/Contracts'; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index f58ed94ae..90a364dc6 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -15,17 +15,17 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e const contract = await func(...args, overrides); log.executingTx(`Deploying contract ${name} (${contract.__contractName__})`); - console.log(`Tx: `, contract.deployTransaction.hash); + log.normal(`Tx: `, contract.deployTransaction.hash); - log.greyed(`Waiting to be mined ...`); + log.greyed(`Waiting to be mined...`); const receipt = await contract.deployTransaction.wait(executionConfig.confirmationToWait); if (receipt.status !== 1) { - log.error(`Error while executing.`); + log.error(`Error while executing`); throw new executionError(contract.deployTransaction, receipt); } - log.success(`Deployed at ${contract.address} 🚀 `); + log.success(`Deployed ${name} at ${contract.address} 🚀 !`); return contract; }; @@ -35,12 +35,12 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e ...args: Parameters ): Promise => { const tx = await func(...args, overrides); - console.log(executionInstruction); - console.log(`Executing tx: `, tx.hash); + log.normal(executionInstruction); + log.normal(`Executing tx: `, tx.hash); const receipt = await tx.wait(executionConfig.confirmationToWait); if (receipt.status !== 1) { - log.error(`Error while executing.`); + log.error(`Error while executing`); throw new executionError(tx, receipt); } diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts index f058fc25b..1cda6a7a6 100644 --- a/packages/v3/migration/engine/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -1,6 +1,7 @@ import chalk from 'chalk'; export const log = { + normal: (...str: string[]) => console.log(...str), info: (str: string) => console.log(chalk.cyanBright`⚠️ ${str}`), done: (str: string) => console.log(chalk.bold.yellowBright`${str}`), executing: (str: string) => console.log(chalk.bold.blue`${str}`), diff --git a/packages/v3/migration/engine/tasks/index.ts b/packages/v3/migration/engine/tasks/index.ts index 6a6f53304..027b77808 100644 --- a/packages/v3/migration/engine/tasks/index.ts +++ b/packages/v3/migration/engine/tasks/index.ts @@ -1,8 +1,9 @@ -import { lazyAction } from 'components/TasksUtils'; +import path from 'path'; +import { lazyAction } from 'components/TaskUtils'; import { task, types } from 'hardhat/config'; -const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks/'; -const PATH_TO_ENGINE_SUBTASKS_FOLDER = 'migration/engine/tasks/subtasks/'; +const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks'; +const PATH_TO_ENGINE_SUBTASKS_FOLDER = 'migration/engine/tasks/subtasks'; export type defaultParamTask = { ledger: boolean; @@ -20,11 +21,11 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(lazyAction(PATH_TO_ENGINE_TASKS_FOLDER + 'migrate/migrate.ts')); + .setAction(lazyAction(path.join(PATH_TO_ENGINE_TASKS_FOLDER, 'migrate/migrate.ts'))); export type createMigrationParamTask = { migrationName: string; }; -task('createMigration', 'Create a migration file') +task('create-migration', 'Create a migration file') .addPositionalParam('migrationName', 'Name of the migration name') - .setAction(lazyAction(PATH_TO_ENGINE_SUBTASKS_FOLDER + 'createMigration.ts')); + .setAction(lazyAction(path.join(PATH_TO_ENGINE_SUBTASKS_FOLDER, 'createMigration.ts'))); diff --git a/packages/v3/migration/engine/tasks/migrate/migrate.ts b/packages/v3/migration/engine/tasks/migrate/migrate.ts index f394d02fd..74eabc146 100644 --- a/packages/v3/migration/engine/tasks/migrate/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate/migrate.ts @@ -1,9 +1,10 @@ import { Migration } from '../../types'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { importCsjOrEsModule } from 'components/TasksUtils'; +import { importCsjOrEsModule } from 'components/TaskUtils'; import { log } from '../../logger'; import { migrateParamTask } from '..'; import { getMigrateParams } from './migrateUtils'; +import Contracts from 'components/Contracts'; export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { const { signer, migrationsData, initialState, writeState, deployExecute } = await getMigrateParams(hre, args); @@ -22,12 +23,13 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + const contracts = Contracts.connect(signer); try { - currentNetworkState = await migration.up(signer, currentNetworkState, deployExecute); + currentNetworkState = await migration.up(signer, contracts, currentNetworkState, deployExecute); // If healthcheck doesn't pass - if (!(await migration.healthcheck(signer, currentNetworkState, deployExecute))) { - log.error("Healthcheck didn't pass"); + if (!(await migration.healthcheck(signer, contracts, currentNetworkState, deployExecute))) { + log.error('Healthcheck failed'); // @TODO revert the migration here return; } diff --git a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts index 67bd68367..575ca56f1 100644 --- a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts +++ b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts @@ -6,17 +6,24 @@ import { createMigrationParamTask } from '..'; import { MIGRATION_FOLDER } from '../../utils'; export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { - const templateMigrationFile = `import Contracts from 'components/Contracts'; -import { Migration } from 'migration/engine/types'; - -export type State = {}; + const templateMigrationFile = `import { Migration, deployedContract } from 'migration/engine/types'; + +export type State = { + BNT: deployedContract; +}; const migration: Migration = { - up: async (signer, _, { deploy, execute }): Promise => { - const contracts = Contracts.connect(signer); - return {}; + up: async (signer, contracts, _, { deploy, execute }): Promise => { + const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', 1000000); + return { + BNT: { + address: BNT.address, + tx: BNT.deployTransaction.hash + } + }; }, - healthcheck: async (signer, state: State, { deploy, execute }) => { + + healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { return true; } }; diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 709a41171..9371f9c4c 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,3 +1,4 @@ +import { Contracts } from 'components/Contracts'; import { Signer } from 'ethers'; import { deployExecuteType } from './executions'; @@ -14,6 +15,11 @@ export type deployedContract = { }; export interface Migration { - up: (signer: Signer, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; - healthcheck: (signer: Signer, newState: any, { deploy, execute }: deployExecuteType) => Promise; + up: (signer: Signer, contracts: Contracts, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; + healthcheck: ( + signer: Signer, + contracts: Contracts, + newState: any, + { deploy, execute }: deployExecuteType + ) => Promise; } diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils.ts index aa6b9ede6..ec0c23e6d 100644 --- a/packages/v3/migration/engine/utils.ts +++ b/packages/v3/migration/engine/utils.ts @@ -21,10 +21,10 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def : (await hre.ethers.getSigners())[0]; // Overrides check - let overrides: executeOverride = {}; + const overrides: executeOverride = {}; - if (args.gasPrice === 0 && hre.network.name === 'mainnet') { - throw new Error("Gas Price shouldn't be equal to 0 for mainnet use"); + if (!args.gasPrice && hre.network.name === 'mainnet') { + throw new Error("Gas Price shouldn't be equal to 0 for mainnet use. Aborting"); } overrides.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); @@ -34,7 +34,7 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def }; if (executionConfig.confirmationToWait <= 1 && hre.network.name === 'mainnet') { - throw new Error("Confirmation to wait shouldn't be lower than or equal to 1 for mainnet use"); + throw new Error("Transaction confirmation wasn't defined. Aborting"); } const deployExecute = initDeployExecute(executionConfig, overrides); diff --git a/packages/v3/migration/migrations/0_initialDeployment.ts b/packages/v3/migration/migrations/0_initial_deployment.ts similarity index 68% rename from packages/v3/migration/migrations/0_initialDeployment.ts rename to packages/v3/migration/migrations/0_initial_deployment.ts index eaddfd77d..c7ec53f0d 100644 --- a/packages/v3/migration/migrations/0_initialDeployment.ts +++ b/packages/v3/migration/migrations/0_initial_deployment.ts @@ -1,4 +1,3 @@ -import Contracts from 'components/Contracts'; import { parseUnits } from 'ethers/lib/utils'; import { Migration, deployedContract } from 'migration/engine/types'; @@ -7,9 +6,7 @@ export type State = { }; const migration: Migration = { - up: async (signer, _, { deploy, execute }): Promise => { - const contracts = Contracts.connect(signer); - + up: async (signer, contracts, _, { deploy, execute }): Promise => { const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', parseUnits('10000')); return { BNT: { @@ -18,7 +15,8 @@ const migration: Migration = { } }; }, - healthcheck: async (signer, state: State, { deploy, execute }) => { + + healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { return true; } }; From 8cd399b50f973111de9d0dcaa2c60b8c46bc0dc1 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 5 Jul 2021 12:34:38 +0200 Subject: [PATCH 007/164] Few fixes --- packages/v3/migration/README.md | 34 +++++++++++++------ packages/v3/migration/engine/errors.ts | 2 +- packages/v3/migration/engine/executions.ts | 6 ++-- .../migration/engine/tasks/migrate/migrate.ts | 6 ++-- .../engine/tasks/migrate/migrateUtils.ts | 4 +-- .../engine/tasks/subtasks/createMigration.ts | 1 - 6 files changed, 32 insertions(+), 21 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 4ad2a5f70..b5c83af33 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -23,14 +23,19 @@ A migration file is a typescript file that expose a particular object respecting ```ts export interface Migration { - up: (signer: Signer, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; - healthcheck: (signer: Signer, newState: any, { deploy, execute }: deployExecuteType) => Promise; + up: (signer: Signer, contracts: Contracts, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; + healthcheck: ( + signer: Signer, + contracts: Contracts, + newState: any, + { deploy, execute }: deployExecuteType + ) => Promise; } ``` ## Engine -The engine expose 1 small task, and one main task `migrate`. +The engine expose one small task, and one main task `migrate`. ### Migrate @@ -62,7 +67,7 @@ Algorithm: ##### Running the migration -1. If there is no migrationsData in the array, exit. +1. If there is no migrationData in the array, exit. 2. Run every migration in a loop as follow: -> Importing the migration file. @@ -80,17 +85,24 @@ Create a migration file based from a template. `yarn hh create-migration --help` for more info on params. ```ts -import Contracts from 'components/Contracts'; -import { Migration } from 'migration/engine/types'; +import { Migration, deployedContract } from 'migration/engine/types'; -export type State = {}; +export type State = { + BNT: deployedContract; +}; const migration: Migration = { - up: async (signer, _, { deploy, execute }): Promise => { - const contracts = Contracts.connect(signer); - return {}; + up: async (signer, contracts, _, { deploy, execute }): Promise => { + const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', 1000000); + return { + BNT: { + address: BNT.address, + tx: BNT.deployTransaction.hash + } + }; }, - healthcheck: async (signer, state: State, { deploy, execute }) => { + + healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { return true; } }; diff --git a/packages/v3/migration/engine/errors.ts b/packages/v3/migration/engine/errors.ts index 51f16c729..17ad7f4a4 100644 --- a/packages/v3/migration/engine/errors.ts +++ b/packages/v3/migration/engine/errors.ts @@ -1,6 +1,6 @@ import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -export class executionError extends Error { +export class ExecutionError extends Error { tx: ContractTransaction; receipt: ContractReceipt; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index 90a364dc6..d3654eea2 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -1,4 +1,4 @@ -import { executionError } from './errors'; +import { ExecutionError } from './errors'; import { Contract } from 'components/Contracts'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; import { log } from './logger'; @@ -22,7 +22,7 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e if (receipt.status !== 1) { log.error(`Error while executing`); - throw new executionError(contract.deployTransaction, receipt); + throw new ExecutionError(contract.deployTransaction, receipt); } log.success(`Deployed ${name} at ${contract.address} 🚀 !`); @@ -41,7 +41,7 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e const receipt = await tx.wait(executionConfig.confirmationToWait); if (receipt.status !== 1) { log.error(`Error while executing`); - throw new executionError(tx, receipt); + throw new ExecutionError(tx, receipt); } log.success(`Executed ✨`); diff --git a/packages/v3/migration/engine/tasks/migrate/migrate.ts b/packages/v3/migration/engine/tasks/migrate/migrate.ts index 74eabc146..6da2c883a 100644 --- a/packages/v3/migration/engine/tasks/migrate/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate/migrate.ts @@ -11,7 +11,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => let state = initialState; - // If there is no migration to run, exit + // if there is no migration to run, exit if (migrationsData.length === 0) { log.done(`Nothing to migrate ⚡️`); return; @@ -27,14 +27,14 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => try { currentNetworkState = await migration.up(signer, contracts, currentNetworkState, deployExecute); - // If healthcheck doesn't pass + // if healthcheck doesn't pass if (!(await migration.healthcheck(signer, contracts, currentNetworkState, deployExecute))) { log.error('Healthcheck failed'); // @TODO revert the migration here return; } - // If healthcheck passed, update the state and write it to the system + // if healthcheck passed, update the state and write it to the system state = { migrationState: { latestMigration: migrationData.migrationTimestamp }, networkState: currentNetworkState diff --git a/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts b/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts index 3d65b3a3d..ab26283c5 100644 --- a/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts +++ b/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts @@ -39,12 +39,12 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig // Read all files into the folder and fetch any state file const allDeploymentFiles = fs.readdirSync(pathToDeploymentFiles); - const deploymentFiles = allDeploymentFiles.filter((fileName: string) => fileName === 'state.json'); + const deploymentFiles = allDeploymentFiles.find((fileName: string) => fileName === 'state.json'); const { writeState, fetchState } = writeFetchState(hre); // If there is no state file in the network's folder, create an empty one - if (deploymentFiles.length === 0) { + if (!deploymentFiles) { writeState({ migrationState: { latestMigration: -1 diff --git a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts index 575ca56f1..8afe0fb8a 100644 --- a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts +++ b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts @@ -34,7 +34,6 @@ export default migration; throw new Error('File name cannot be empty'); } - // Fetch timestamp const migrationId = Date.now(); const fileName = `${migrationId}_${args.migrationName}.ts`; From 961116da9b2e92c7c294ff8a6bc38e583cdc1852 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 6 Jul 2021 13:08:58 +0200 Subject: [PATCH 008/164] Update README.md --- packages/v3/migration/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index b5c83af33..22e06a5ba 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -49,7 +49,7 @@ Algorithm: `signer`: Can either be a normal signer or a Ledger signer. This object is passed to the migration script. -`migrationsData`: An array of migrationData to be executed (counting only the migration that haven't been already run - using the timestamp as reference). A migrationData is: +`migrationsData`: A list of migrationData to be executed (counting only the migration that haven't been already run - using the timestamp as reference). A migrationData is: ```ts { @@ -67,7 +67,7 @@ Algorithm: ##### Running the migration -1. If there is no migrationData in the array, exit. +1. If there is no migrationData in the list, exit. 2. Run every migration in a loop as follow: -> Importing the migration file. From 910e1466f6c403b759a402a10276b0fb8eb20500 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 6 Jul 2021 14:36:57 +0200 Subject: [PATCH 009/164] add description to readme.md --- packages/v3/migration/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 22e06a5ba..83fd11409 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -108,3 +108,15 @@ const migration: Migration = { }; export default migration; ``` + +## How to create a migration file ? + +``` +yarn hh create-migration migrationFileName +``` + +## How to execute a migration ? + +``` +yarn hh migrate +``` From ed939e899594198a062a87b7485b7d42137bea8c Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 19 Jul 2021 11:32:28 +0200 Subject: [PATCH 010/164] Fixed issues + renamed files + change forking methods --- packages/v3/.gitignore | 1 + packages/v3/components/v2Helpers/v2.ts | 105 ++++++++++++++++++ packages/v3/hardhat.config.ts | 43 +++---- .../migration/engine/tasks/migrate/migrate.ts | 3 + packages/v3/migration/engine/types.ts | 1 - .../migrations/0_initial_deployment.ts | 23 ---- .../v3/migration/migrations/0_v2_to_v3.ts | 52 +++++++++ packages/v3/package.json | 1 + packages/v3/tsconfig.json | 2 +- 9 files changed, 186 insertions(+), 45 deletions(-) create mode 100644 packages/v3/components/v2Helpers/v2.ts delete mode 100644 packages/v3/migration/migrations/0_initial_deployment.ts create mode 100644 packages/v3/migration/migrations/0_v2_to_v3.ts diff --git a/packages/v3/.gitignore b/packages/v3/.gitignore index 56cde6edf..5f3a4f460 100644 --- a/packages/v3/.gitignore +++ b/packages/v3/.gitignore @@ -26,3 +26,4 @@ config.json migration/data/hardhat migration/data/localhost +migration/data/fork* diff --git a/packages/v3/components/v2Helpers/v2.ts b/packages/v3/components/v2Helpers/v2.ts new file mode 100644 index 000000000..510deb69d --- /dev/null +++ b/packages/v3/components/v2Helpers/v2.ts @@ -0,0 +1,105 @@ +import { + BancorNetwork__factory, + ConverterFactory__factory, + ConverterRegistryData__factory, + ConverterRegistry__factory, + ConverterUpgrader__factory, + LiquidityProtectionSettings__factory, + LiquidityProtectionStats__factory, + LiquidityProtectionStore__factory, + LiquidityProtectionSystemStore__factory, + LiquidityProtection__factory, + NetworkSettings__factory, + StakingRewardsStore__factory, + StakingRewards__factory, + TokenHolder__factory +} from '@bancor/contracts-v2/typechain'; +import { ContractRegistry } from '@bancor/contracts-v2/typechain'; +import { Signer } from 'ethers'; +import { formatBytes32String } from 'ethers/lib/utils'; + +export const fetchV2ContractState = async (ContractRegistry: ContractRegistry, signer: Signer) => { + return { + BancorNetwork: BancorNetwork__factory.connect( + await ContractRegistry.addressOf(formatBytes32String('BancorNetwork')), + signer + ), + + LiquidityProtection: await fetchLiquidityProtectionContracts(ContractRegistry, signer), + StakingRewards: await fetchStakingRewardsContracts(ContractRegistry, signer), + Converter: await fetchConverter(ContractRegistry, signer), + NetworkSettings: await fetchNetworkSettings(ContractRegistry, signer) + }; +}; + +export const fetchConverter = async (ContractRegistry: ContractRegistry, signer: Signer) => { + return { + ConverterRegistry: ConverterRegistry__factory.connect( + await ContractRegistry.addressOf(formatBytes32String('BancorConverterRegistry')), + signer + ), + ConverterRegistryData: ConverterRegistryData__factory.connect( + await ContractRegistry.addressOf(formatBytes32String('BancorConverterRegistryData')), + signer + ), + ConverterUpgrader: ConverterUpgrader__factory.connect( + await ContractRegistry.addressOf(formatBytes32String('BancorConverterUpgrader')), + signer + ), + ConverterFactory: ConverterFactory__factory.connect( + await ContractRegistry.addressOf(formatBytes32String('ConverterFactory')), + signer + ) + }; +}; + +export const fetchNetworkSettings = async (ContractRegistry: ContractRegistry, signer: Signer) => { + const NetworkSettings = NetworkSettings__factory.connect( + await ContractRegistry.addressOf(formatBytes32String('NetworkSettings')), + signer + ); + const NetworkFeeWallet = TokenHolder__factory.connect(await NetworkSettings.networkFeeWallet(), signer); + + return { NetworkSettings, NetworkFeeWallet }; +}; + +export const fetchLiquidityProtectionContracts = async (ContractRegistry: ContractRegistry, signer: Signer) => { + const LiquidityProtection = LiquidityProtection__factory.connect( + await ContractRegistry.addressOf(formatBytes32String('LiquidityProtection')), + signer + ); + const LiquidityProtectionStore = LiquidityProtectionStore__factory.connect( + await LiquidityProtection.store(), + signer + ); + const LiquidityProtectionSystemStore = LiquidityProtectionSystemStore__factory.connect( + await LiquidityProtection.systemStore(), + signer + ); + const LiquidityProtectionStats = LiquidityProtectionStats__factory.connect( + await LiquidityProtection.stats(), + signer + ); + const LiquidityProtectionSettings = LiquidityProtectionSettings__factory.connect( + await LiquidityProtection.settings(), + signer + ); + + return { + LiquidityProtection, + LiquidityProtectionStore, + LiquidityProtectionSystemStore, + LiquidityProtectionStats, + LiquidityProtectionSettings + }; +}; + +export const fetchStakingRewardsContracts = async (ContractRegistry: ContractRegistry, signer: Signer) => { + const StakingRewards = StakingRewards__factory.connect( + await ContractRegistry.addressOf(formatBytes32String('StakingRewards')), + signer + ); + const StakingRewardsStore = StakingRewardsStore__factory.connect(await StakingRewards.store(), signer); + + return { StakingRewards, StakingRewardsStore }; +}; diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index 3701b5a63..214f1643b 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -19,15 +19,14 @@ import 'hardhat-gas-reporter'; import './migration/engine/tasks'; -const configPath = path.join(__dirname, '/config.json'); +const configPath = path.join(__dirname, 'config.json'); const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {}; -const loadAPIKey = (apiKeyName: string) => { - return configFile.apiKeys ? (configFile.apiKeys[apiKeyName] ? configFile.apiKeys[apiKeyName] : '') : ''; +const loadAPIKey = (keyName: string) => { + return configFile.keys ? (configFile.keys[keyName] ? configFile.keys[keyName] : undefined) : undefined; }; -// Casting to unknown assume the good type is provided -const loadENVKey = (envKeyName: string) => { +const loadENV = (envKeyName: string) => { return process.env[envKeyName] as unknown as T; }; @@ -48,21 +47,25 @@ const config: HardhatUserConfig = { }, solidity: { - version: '0.7.6', - settings: { - optimizer: { - enabled: true, - runs: 200 - }, - metadata: { - bytecodeHash: 'none' - }, - outputSelection: { - '*': { - '*': ['storageLayout'] // Enable slots, offsets and types of the contract's state variables + compilers: [ + { + version: '0.7.6', + settings: { + optimizer: { + enabled: true, + runs: 200 + }, + metadata: { + bytecodeHash: 'none' + }, + outputSelection: { + '*': { + '*': ['storageLayout'] // Enable slots, offsets and types of the contract's state variables + } + } } } - } + ] }, dependencyCompiler: { @@ -86,13 +89,13 @@ const config: HardhatUserConfig = { gasReporter: { currency: 'USD', - enabled: loadENVKey('PROFILE') + enabled: loadENV('PROFILE') }, mocha: { timeout: 600000, color: true, - bail: loadENVKey('BAIL') + bail: loadENV('BAIL') } }; diff --git a/packages/v3/migration/engine/tasks/migrate/migrate.ts b/packages/v3/migration/engine/tasks/migrate/migrate.ts index 6da2c883a..2b62d35f3 100644 --- a/packages/v3/migration/engine/tasks/migrate/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate/migrate.ts @@ -23,6 +23,9 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + // Save oldState + const oldState = currentNetworkState; + const contracts = Contracts.connect(signer); try { currentNetworkState = await migration.up(signer, contracts, currentNetworkState, deployExecute); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 9371f9c4c..980da6ada 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -11,7 +11,6 @@ export type SystemState = { export type deployedContract = { address: string; - tx: string; }; export interface Migration { diff --git a/packages/v3/migration/migrations/0_initial_deployment.ts b/packages/v3/migration/migrations/0_initial_deployment.ts deleted file mode 100644 index c7ec53f0d..000000000 --- a/packages/v3/migration/migrations/0_initial_deployment.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { parseUnits } from 'ethers/lib/utils'; -import { Migration, deployedContract } from 'migration/engine/types'; - -export type State = { - BNT: deployedContract; -}; - -const migration: Migration = { - up: async (signer, contracts, _, { deploy, execute }): Promise => { - const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', parseUnits('10000')); - return { - BNT: { - address: BNT.address, - tx: BNT.deployTransaction.hash - } - }; - }, - - healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { - return true; - } -}; -export default migration; diff --git a/packages/v3/migration/migrations/0_v2_to_v3.ts b/packages/v3/migration/migrations/0_v2_to_v3.ts new file mode 100644 index 000000000..4260edc45 --- /dev/null +++ b/packages/v3/migration/migrations/0_v2_to_v3.ts @@ -0,0 +1,52 @@ +import { ContractRegistry__factory, TokenGovernance__factory } from '@bancor/contracts-v2/typechain'; +import { TestERC20Token__factory } from 'typechain'; +import { Migration, deployedContract } from 'migration/engine/types'; +import { fetchV2ContractState } from 'components/v2Helpers/v2'; + +export type OldState = { + BNT: { token: deployedContract; governance: deployedContract }; + vBNT: { token: deployedContract; governance: deployedContract }; + + ContractRegistry: deployedContract; + VortexBurner: deployedContract; +}; + +export type State = { + BNT: { token: deployedContract; governance: deployedContract }; + vBNT: { token: deployedContract; governance: deployedContract }; + + ContractRegistry: deployedContract; + VortexBurner: deployedContract; + + BancorVault: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, V2State: OldState, { deploy, execute }): Promise => { + const ContractRegistry = ContractRegistry__factory.connect(V2State.ContractRegistry.address, signer); + + const BNT = TestERC20Token__factory.connect(V2State.BNT.token.address, signer); + const vBNT = TestERC20Token__factory.connect(V2State.vBNT.token.address, signer); + + const BNTGov = TokenGovernance__factory.connect(V2State.BNT.governance.address, signer); + const vBNTGov = TokenGovernance__factory.connect(V2State.vBNT.governance.address, signer); + + // Fetch V2 contracts + const V2ContractState = await fetchV2ContractState(ContractRegistry, signer); + + const BancorVault = await deploy('BancorVault', contracts.BancorVault.deploy, BNT.address); + + return { + ...V2State, + + BancorVault: { + address: BancorVault.address + } + }; + }, + + healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { + return true; + } +}; +export default migration; diff --git a/packages/v3/package.json b/packages/v3/package.json index 27bd66f9c..f52b77055 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -20,6 +20,7 @@ ], "scripts": { "hh": "hardhat", + "migrate": "hardhat migrate", "build": "hardhat compile", "test": "yarn build && NODE_OPTIONS='--max-old-space-size=6144' hardhat test", "testb": "BAIL=1 yarn test", diff --git a/packages/v3/tsconfig.json b/packages/v3/tsconfig.json index 8f3c62043..20ee6dfee 100644 --- a/packages/v3/tsconfig.json +++ b/packages/v3/tsconfig.json @@ -5,5 +5,5 @@ }, "include": ["./test", "./tasks", "./components", "./migration"], "files": ["./hardhat.config.ts"], - "paths": {} + "references": [{ "path": "../v2" }] } From 820d1e2cfebb9ca6d2c67f4d5cee2d13839e555e Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 20 Jul 2021 13:57:29 +0200 Subject: [PATCH 011/164] Architecture re organization + improvement for fork used + bunch of optimizations + README update --- packages/v3/hardhat.config.ts | 64 ++++++------- packages/v3/migration/README.md | 96 +++++++++---------- packages/v3/migration/config.ts | 15 +++ .../migration/engine/{ => errors}/errors.ts | 0 packages/v3/migration/engine/executions.ts | 10 +- .../v3/migration/engine/{tasks => }/index.ts | 16 +--- .../migration/engine/{ => logger}/logger.ts | 0 .../v3/migration/engine/{utils.ts => task.ts} | 21 ++-- .../{migrate/migrateUtils.ts => migrate.ts} | 80 ++++++++++++---- .../migration/engine/tasks/migrate/migrate.ts | 54 ----------- .../engine/tasks/subtasks/createMigration.ts | 19 ++-- packages/v3/migration/engine/types.ts | 11 ++- .../v3/migration/migrations/0_v2_to_v3.ts | 30 +++--- packages/v3/package.json | 1 + yarn.lock | 5 + 15 files changed, 215 insertions(+), 207 deletions(-) create mode 100644 packages/v3/migration/config.ts rename packages/v3/migration/engine/{ => errors}/errors.ts (100%) rename packages/v3/migration/engine/{tasks => }/index.ts (75%) rename packages/v3/migration/engine/{ => logger}/logger.ts (100%) rename packages/v3/migration/engine/{utils.ts => task.ts} (79%) rename packages/v3/migration/engine/tasks/{migrate/migrateUtils.ts => migrate.ts} (52%) delete mode 100644 packages/v3/migration/engine/tasks/migrate/migrate.ts diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index a90b947c3..54b1d1620 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -1,49 +1,52 @@ -import fs from 'fs'; -import path from 'path'; - -import { HardhatUserConfig } from 'hardhat/config'; - -import 'tsconfig-paths/register'; - -import '@nomiclabs/hardhat-waffle'; import '@nomiclabs/hardhat-ethers'; +import '@nomiclabs/hardhat-etherscan'; +import '@nomiclabs/hardhat-waffle'; import '@typechain/hardhat'; +// Patch BigNumber to include a min and a max functions. +import { BigNumber } from 'ethers'; +import fs from 'fs'; +import 'hardhat-abi-exporter'; +import 'hardhat-contract-sizer'; import 'hardhat-dependency-compiler'; import 'hardhat-deploy'; - -import 'solidity-coverage'; -import '@nomiclabs/hardhat-etherscan'; -import 'hardhat-contract-sizer'; -import 'hardhat-abi-exporter'; import 'hardhat-gas-reporter'; - -import './migration/engine/tasks'; +import { HardhatUserConfig } from 'hardhat/config'; +import path from 'path'; +import 'solidity-coverage'; +import 'tsconfig-paths/register'; +import './migration/engine'; const configPath = path.join(__dirname, 'config.json'); const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {}; -const loadAPIKey = (keyName: string) => { +export const loadKey = (keyName: string) => { return configFile.keys ? (configFile.keys[keyName] ? configFile.keys[keyName] : undefined) : undefined; }; -const loadENV = (envKeyName: string) => { +export const loadENV = (envKeyName: string) => { return process.env[envKeyName] as unknown as T; }; -const configNetworks = configFile.networks || {}; +const hardhatDefaultConfig = { + gasPrice: 20000000000, + gas: 9500000, + accounts: { + count: 10, + accountsBalance: '10000000000000000000000000000' + } +}; + +const hardhatForkedConfig = loadENV('FORK') + ? { + forking: { + url: loadKey(`url-${loadENV('FORK')}`) + } + } + : undefined; const config: HardhatUserConfig = { networks: { - hardhat: { - gasPrice: 20000000000, - gas: 9500000, - accounts: { - count: 10, - accountsBalance: '10000000000000000000000000000' - } - }, - - ...configNetworks + hardhat: hardhatForkedConfig || hardhatDefaultConfig }, solidity: { @@ -76,7 +79,7 @@ const config: HardhatUserConfig = { }, etherscan: { - apiKey: loadAPIKey('etherscan') + apiKey: loadKey('etherscan') }, contractSizer: { @@ -104,9 +107,6 @@ const config: HardhatUserConfig = { export default config; -// Patch BigNumber to include a min and a max functions. -import { BigNumber } from 'ethers'; - declare module 'ethers' { class BigNumber { static min(a: any, b: any): boolean; diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 83fd11409..ec63c9c72 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -15,6 +15,9 @@ In each network folder there is a `state.json` file. It represents the migration } ``` +`latestMigration`: The timestamp of the latest ran migration. +`networkState`: Data that is passed to the migration file as initial state. + ## Migrations The `migration` folder is home for all migrations file. @@ -23,7 +26,12 @@ A migration file is a typescript file that expose a particular object respecting ```ts export interface Migration { - up: (signer: Signer, contracts: Contracts, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; + up: ( + signer: Signer, + contracts: Contracts, + initialState: any, + { deploy, execute }: deployExecuteType + ) => Promise<{}>; healthcheck: ( signer: Signer, contracts: Contracts, @@ -35,70 +43,73 @@ export interface Migration { ## Engine -The engine expose one small task, and one main task `migrate`. +The engine is the backbone of the migration system, containing its logic. + +It also expose tasks and subtasks. -### Migrate +### Tasks + +##### Migrate Migrate the system from point A to point B. `yarn hh migrate --help` for more info on params. -Algorithm: +### Subtasks -##### Fetch `{ signer, migrationsData, initialState, writeState, deployExecute }` +##### CreateMigration -`signer`: Can either be a normal signer or a Ledger signer. This object is passed to the migration script. +Create a migration file based from a template. -`migrationsData`: A list of migrationData to be executed (counting only the migration that haven't been already run - using the timestamp as reference). A migrationData is: +`yarn hh create-migration --help` for more info on params. -```ts -{ - fullPath: string; - fileName: string; - migrationTimestamp: number; -} -``` +# Getting started -`initialState`: The state of the global system on a particular network. It's fetched from the `state.json` file mentionned above. The property `networkState` of this object is passed to the migration script. +## How to run the migration on a fork ? -`writeState`: A function that will replace the current state of the network with the one provided. +Because of current Hardhat limitation it's not practical to launch a fork and run migration on it via the `hardhat.config.ts`. So we had to find a workaround. To do so you have to execute the command by specifying the network in which you want to run. like so: -`deployExecute`: An object that have 2 functions, `deploy` and `execute`. This object is passed to the migration script. +`FORK=mainnet yarn hh migrate` -##### Running the migration +In order for this to work you need to have in your `config.json` at the root of the `v3` repo in the key brackets the url for the corresponding FORK value. It NEEDS to start with `url-`, like so: `url-mainnet`. -1. If there is no migrationData in the list, exit. +## How to create a migration file ? -2. Run every migration in a loop as follow: - -> Importing the migration file. - -> Executing the `up` function of that migration file. - ---> If `up` throw, exit. // @TODO add call to `down` functionnality (this is going to be complicated here). - -> Executing the `healthcheck` function of that migration file. - ---> If healthcheck returns false, exit. // @TODO add call to `down` functionnality. - -> Update the latestMigration to the current migration's timestamp. - -> Update the networkState to the new networkState +``` +yarn hh create-migration migrationFileName +``` -###### createMigration +If you don't use this CLI to generate your migration files, bear in mind that they have to start by a number splitted from the rest of the name by the character '\_', like so: "999_testfile.ts". -Create a migration file based from a template. +## How to execute a migration ? -`yarn hh create-migration --help` for more info on params. +``` +yarn hh migrate --network fork-mainnet +``` + +1. `Migrate` will look for the network data folder. If not it will create one. + +2. It will run every migration file from latestMigration timestamp to the latest in the migrations folder. + +3. Update the state on the go. + +## What does a basic migration file looks like ```ts -import { Migration, deployedContract } from 'migration/engine/types'; +import { deployedContract, Migration } from 'migration/engine/types'; + +export type InitialState = {}; export type State = { BNT: deployedContract; }; const migration: Migration = { - up: async (signer, contracts, _, { deploy, execute }): Promise => { + up: async (signer, contracts, V2State: InitialState, { deploy, execute }): Promise => { const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', 1000000); + return { - BNT: { - address: BNT.address, - tx: BNT.deployTransaction.hash - } + BNT: BNT.address }; }, @@ -106,17 +117,6 @@ const migration: Migration = { return true; } }; -export default migration; -``` -## How to create a migration file ? - -``` -yarn hh create-migration migrationFileName -``` - -## How to execute a migration ? - -``` -yarn hh migrate +export default migration; ``` diff --git a/packages/v3/migration/config.ts b/packages/v3/migration/config.ts new file mode 100644 index 000000000..6b4b15bb6 --- /dev/null +++ b/packages/v3/migration/config.ts @@ -0,0 +1,15 @@ +import { network } from 'hardhat'; +import { loadENV } from 'hardhat.config'; + +export const MIGRATION_FOLDER = 'migration/migrations'; +export const MIGRATION_DATA_FOLDER = 'migration/data'; + +const GET_NETWORK_NAME = () => { + const networkForkName = loadENV('FORK'); + if (networkForkName) { + return 'fork-' + networkForkName; + } + return network.name; +}; + +export const NETWORK_NAME = GET_NETWORK_NAME(); diff --git a/packages/v3/migration/engine/errors.ts b/packages/v3/migration/engine/errors/errors.ts similarity index 100% rename from packages/v3/migration/engine/errors.ts rename to packages/v3/migration/engine/errors/errors.ts diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index d3654eea2..80ecaab70 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -1,8 +1,8 @@ -import { ExecutionError } from './errors'; -import { Contract } from 'components/Contracts'; +import { ExecutionError } from './errors/errors'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -import { log } from './logger'; -import { executeOverride, executionConfig } from './utils'; +import { log } from './logger/logger'; +import { executeOverride, executionConfig } from './task'; +import { Contract } from 'ethers'; export type deployExecuteType = ReturnType; @@ -14,7 +14,7 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e ): Promise> => { const contract = await func(...args, overrides); - log.executingTx(`Deploying contract ${name} (${contract.__contractName__})`); + log.executingTx(`Deploying contract ${name}`); log.normal(`Tx: `, contract.deployTransaction.hash); log.greyed(`Waiting to be mined...`); diff --git a/packages/v3/migration/engine/tasks/index.ts b/packages/v3/migration/engine/index.ts similarity index 75% rename from packages/v3/migration/engine/tasks/index.ts rename to packages/v3/migration/engine/index.ts index 027b77808..e8bfd03b7 100644 --- a/packages/v3/migration/engine/tasks/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -1,16 +1,10 @@ -import path from 'path'; import { lazyAction } from 'components/TaskUtils'; import { task, types } from 'hardhat/config'; +import path from 'path'; +import { defaultParamTask } from './task'; -const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks'; -const PATH_TO_ENGINE_SUBTASKS_FOLDER = 'migration/engine/tasks/subtasks'; - -export type defaultParamTask = { - ledger: boolean; - ledgerPath: string; - gasPrice: number; - confirmationToWait: number; -}; +export const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks'; +export const PATH_TO_ENGINE_SUBTASKS_FOLDER = 'migration/engine/tasks/subtasks'; export type migrateParamTask = defaultParamTask & { reset: boolean; @@ -21,7 +15,7 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(lazyAction(path.join(PATH_TO_ENGINE_TASKS_FOLDER, 'migrate/migrate.ts'))); + .setAction(lazyAction(path.join(PATH_TO_ENGINE_TASKS_FOLDER, 'migrate.ts'))); export type createMigrationParamTask = { migrationName: string; diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger/logger.ts similarity index 100% rename from packages/v3/migration/engine/logger.ts rename to packages/v3/migration/engine/logger/logger.ts diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/task.ts similarity index 79% rename from packages/v3/migration/engine/utils.ts rename to packages/v3/migration/engine/task.ts index ec0c23e6d..9d0fb3e44 100644 --- a/packages/v3/migration/engine/utils.ts +++ b/packages/v3/migration/engine/task.ts @@ -1,15 +1,16 @@ -import fs from 'fs'; -import path from 'path'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; - +import { BigNumberish } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { NETWORK_NAME } from 'migration/config'; import { initDeployExecute } from './executions'; -import { defaultParamTask } from './tasks'; -import { BigNumberish } from 'ethers'; -export const MIGRATION_FOLDER = 'migration/migrations'; -export const MIGRATION_DATA_FOLDER = 'migration/data'; +export type defaultParamTask = { + ledger: boolean; + ledgerPath: string; + gasPrice: number; + confirmationToWait: number; +}; export type executeOverride = { gasPrice?: BigNumberish }; export type executionConfig = { confirmationToWait: number }; @@ -23,7 +24,7 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def // Overrides check const overrides: executeOverride = {}; - if (!args.gasPrice && hre.network.name === 'mainnet') { + if (!args.gasPrice && NETWORK_NAME === 'mainnet') { throw new Error("Gas Price shouldn't be equal to 0 for mainnet use. Aborting"); } overrides.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); @@ -33,7 +34,7 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def confirmationToWait: args.confirmationToWait }; - if (executionConfig.confirmationToWait <= 1 && hre.network.name === 'mainnet') { + if (executionConfig.confirmationToWait <= 1 && NETWORK_NAME === 'mainnet') { throw new Error("Transaction confirmation wasn't defined. Aborting"); } diff --git a/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts b/packages/v3/migration/engine/tasks/migrate.ts similarity index 52% rename from packages/v3/migration/engine/tasks/migrate/migrateUtils.ts rename to packages/v3/migration/engine/tasks/migrate.ts index ab26283c5..4cd796453 100644 --- a/packages/v3/migration/engine/tasks/migrate/migrateUtils.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -1,22 +1,60 @@ +import Contracts from 'components/Contracts'; +import { importCsjOrEsModule } from 'components/TaskUtils'; import fs from 'fs'; -import path from 'path'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; - +import { getDefaultParams } from 'migration/engine/task'; import { SystemState } from 'migration/engine/types'; -import { migrateParamTask } from '../../tasks'; -import { log } from '../../logger'; -import { getDefaultParams, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from '../../utils'; +import path from 'path'; +import { migrateParamTask } from '..'; +import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME } from '../../config'; +import { log } from '../logger/logger'; +import { Migration } from '../types'; -export const writeFetchState = (hre: HardhatRuntimeEnvironment) => { - const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name); - return { - writeState: async (state: SystemState) => { - fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); - }, - fetchState: () => { - return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; +export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { + const { signer, migrationsData, initialState, writeState, deployExecute } = await getMigrateParams(hre, args); + + let state = initialState; + + // if there is no migration to run, exit + if (migrationsData.length === 0) { + log.done(`Nothing to migrate ⚡️`); + return; + } + + let currentNetworkState: any = state.networkState; + for (const migrationData of migrationsData) { + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + + log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + + // Save oldState + const oldState = currentNetworkState; + + const contracts = Contracts.connect(signer); + try { + currentNetworkState = await migration.up(signer, contracts, currentNetworkState, deployExecute); + + // if healthcheck doesn't pass + if (!(await migration.healthcheck(signer, contracts, currentNetworkState, deployExecute))) { + log.error('Healthcheck failed'); + // @TODO revert the migration here + return; + } + + // if healthcheck passed, update the state and write it to the system + state = { + migrationState: { latestMigration: migrationData.migrationTimestamp }, + networkState: currentNetworkState + }; + writeState(state); + } catch (e) { + log.error('Migration execution failed'); + log.error(e); + // @TODO revert the migration here + return; } - }; + } + log.done(`Migration(s) complete ⚡️`); }; export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { @@ -24,14 +62,14 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig // If reset, delete all the files in the corresponding network folder if (args.reset) { - log.info(`Resetting ${hre.network.name} migratation folder`); - fs.rmSync(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name), { + log.info(`Resetting ${NETWORK_NAME} migratation folder`); + fs.rmSync(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME), { recursive: true }); } // Deployment files - let pathToDeploymentFiles = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, hre.network.name); + let pathToDeploymentFiles = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); // If deployment folder doesn't exist, create it if (!fs.existsSync(pathToDeploymentFiles)) { fs.mkdirSync(pathToDeploymentFiles); @@ -41,7 +79,13 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig const allDeploymentFiles = fs.readdirSync(pathToDeploymentFiles); const deploymentFiles = allDeploymentFiles.find((fileName: string) => fileName === 'state.json'); - const { writeState, fetchState } = writeFetchState(hre); + const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); + const writeState = async (state: SystemState) => { + fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); + }; + const fetchState = () => { + return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; + }; // If there is no state file in the network's folder, create an empty one if (!deploymentFiles) { diff --git a/packages/v3/migration/engine/tasks/migrate/migrate.ts b/packages/v3/migration/engine/tasks/migrate/migrate.ts deleted file mode 100644 index 2b62d35f3..000000000 --- a/packages/v3/migration/engine/tasks/migrate/migrate.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Migration } from '../../types'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { importCsjOrEsModule } from 'components/TaskUtils'; -import { log } from '../../logger'; -import { migrateParamTask } from '..'; -import { getMigrateParams } from './migrateUtils'; -import Contracts from 'components/Contracts'; - -export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { - const { signer, migrationsData, initialState, writeState, deployExecute } = await getMigrateParams(hre, args); - - let state = initialState; - - // if there is no migration to run, exit - if (migrationsData.length === 0) { - log.done(`Nothing to migrate ⚡️`); - return; - } - - let currentNetworkState: any = state.networkState; - for (const migrationData of migrationsData) { - const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - - log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - - // Save oldState - const oldState = currentNetworkState; - - const contracts = Contracts.connect(signer); - try { - currentNetworkState = await migration.up(signer, contracts, currentNetworkState, deployExecute); - - // if healthcheck doesn't pass - if (!(await migration.healthcheck(signer, contracts, currentNetworkState, deployExecute))) { - log.error('Healthcheck failed'); - // @TODO revert the migration here - return; - } - - // if healthcheck passed, update the state and write it to the system - state = { - migrationState: { latestMigration: migrationData.migrationTimestamp }, - networkState: currentNetworkState - }; - writeState(state); - } catch (e) { - log.error('Migration execution failed'); - log.error(e); - // @TODO revert the migration here - return; - } - } - log.done(`Migration(s) complete ⚡️`); -}; diff --git a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts index 8afe0fb8a..e33c59df1 100644 --- a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts +++ b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts @@ -1,25 +1,25 @@ import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { MIGRATION_FOLDER } from 'migration/config'; +import { createMigrationParamTask } from 'migration/engine'; +import { log } from 'migration/engine/logger/logger'; import path from 'path'; -import { log } from '../../logger'; -import { createMigrationParamTask } from '..'; -import { MIGRATION_FOLDER } from '../../utils'; export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { - const templateMigrationFile = `import { Migration, deployedContract } from 'migration/engine/types'; + const templateMigrationFile = `import { deployedContract, Migration } from 'migration/engine/types'; +export type InitialState = {}; + export type State = { BNT: deployedContract; }; const migration: Migration = { - up: async (signer, contracts, _, { deploy, execute }): Promise => { + up: async (signer, contracts, V2State: InitialState, { deploy, execute }): Promise => { const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', 1000000); + return { - BNT: { - address: BNT.address, - tx: BNT.deployTransaction.hash - } + BNT: BNT.address }; }, @@ -27,6 +27,7 @@ const migration: Migration = { return true; } }; + export default migration; `; diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 980da6ada..440143ec6 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -9,12 +9,15 @@ export type SystemState = { networkState: any; }; -export type deployedContract = { - address: string; -}; +export type deployedContract = string; export interface Migration { - up: (signer: Signer, contracts: Contracts, oldState: any, { deploy, execute }: deployExecuteType) => Promise<{}>; + up: ( + signer: Signer, + contracts: Contracts, + initialState: any, + { deploy, execute }: deployExecuteType + ) => Promise<{}>; healthcheck: ( signer: Signer, contracts: Contracts, diff --git a/packages/v3/migration/migrations/0_v2_to_v3.ts b/packages/v3/migration/migrations/0_v2_to_v3.ts index 4260edc45..c2e57989e 100644 --- a/packages/v3/migration/migrations/0_v2_to_v3.ts +++ b/packages/v3/migration/migrations/0_v2_to_v3.ts @@ -1,9 +1,9 @@ import { ContractRegistry__factory, TokenGovernance__factory } from '@bancor/contracts-v2/typechain'; -import { TestERC20Token__factory } from 'typechain'; -import { Migration, deployedContract } from 'migration/engine/types'; import { fetchV2ContractState } from 'components/v2Helpers/v2'; +import { deployedContract, Migration } from 'migration/engine/types'; +import { TestERC20Token__factory } from 'typechain'; -export type OldState = { +export type InitialState = { BNT: { token: deployedContract; governance: deployedContract }; vBNT: { token: deployedContract; governance: deployedContract }; @@ -22,26 +22,24 @@ export type State = { }; const migration: Migration = { - up: async (signer, contracts, V2State: OldState, { deploy, execute }): Promise => { - const ContractRegistry = ContractRegistry__factory.connect(V2State.ContractRegistry.address, signer); - - const BNT = TestERC20Token__factory.connect(V2State.BNT.token.address, signer); - const vBNT = TestERC20Token__factory.connect(V2State.vBNT.token.address, signer); - - const BNTGov = TokenGovernance__factory.connect(V2State.BNT.governance.address, signer); - const vBNTGov = TokenGovernance__factory.connect(V2State.vBNT.governance.address, signer); - - // Fetch V2 contracts + up: async (signer, contracts, V2State: InitialState, { deploy, execute }): Promise => { + const ContractRegistry = ContractRegistry__factory.connect(V2State.ContractRegistry, signer); + // Fetch basic info from config + const BNT = TestERC20Token__factory.connect(V2State.BNT.token, signer); + const vBNT = TestERC20Token__factory.connect(V2State.vBNT.token, signer); + const BNTGov = TokenGovernance__factory.connect(V2State.BNT.governance, signer); + const vBNTGov = TokenGovernance__factory.connect(V2State.vBNT.governance, signer); + + // Fetch V2 contracts from basic info const V2ContractState = await fetchV2ContractState(ContractRegistry, signer); + // Deploy V3 contracts const BancorVault = await deploy('BancorVault', contracts.BancorVault.deploy, BNT.address); return { ...V2State, - BancorVault: { - address: BancorVault.address - } + BancorVault: BancorVault.address }; }, diff --git a/packages/v3/package.json b/packages/v3/package.json index f00e9b5c7..4b13042f1 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -69,6 +69,7 @@ "mocha": "^9.0.2", "prettier": "^2.3.2", "prettier-package-json": "^2.6.0", + "prettier-plugin-organize-imports": "^2.3.2", "prettier-plugin-solidity": "^1.0.0-beta.14", "snyk": "^1.658.0", "solc": "0.7.6", diff --git a/yarn.lock b/yarn.lock index 37528a622..175c3d8b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11326,6 +11326,11 @@ prettier-package-json@^2.5.0, prettier-package-json@^2.6.0: sort-object-keys "^1.1.3" sort-order "^1.0.1" +prettier-plugin-organize-imports@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-2.3.2.tgz#b8a5446093d1ef5273abc05d2afc1924b40f4009" + integrity sha512-kWjQUX+ajt/h2ORXSyaXCTDcXO+01FSOz+xUVsaqJ9a0JGkr0fbUQ6GQARl4sI1fSBv8Y68d6iudz3l0i6uU3Q== + prettier-plugin-solidity@^1.0.0-beta.14: version "1.0.0-beta.14" resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.14.tgz#9e6f15ba5fc8bf23ddf72a02aaec00352e49cbcc" From e4635f1883852c366ab69803bcf641947a15769c Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 20 Jul 2021 16:22:35 +0200 Subject: [PATCH 012/164] update config.json in readme --- packages/v3/README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/v3/README.md b/packages/v3/README.md index 0a3cab21e..846381808 100644 --- a/packages/v3/README.md +++ b/packages/v3/README.md @@ -15,14 +15,9 @@ In order to use some plugins, API keys or custom network with secret config we n ```json { - "apiKeys": { - "etherscan": "" - }, - - "networks": { - "mainnet": { - "url": "" - } + "keys": { + "etherscan": "XYZ", + "url-mainnet": "https://eth-mainnet.alchemyapi.io/v2/supersecretcode" } } ``` From 7ddaad0784a3ca74fab6849c955108659f4ad7ab Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 21 Jul 2021 15:42:55 +0200 Subject: [PATCH 013/164] Added mainnet network info + optimization + better handling of migration for forked network --- packages/v3/components/Contracts.ts | 5 +- packages/v3/components/v2Helpers/v2.ts | 2 +- packages/v3/migration/config.ts | 20 +++++++- packages/v3/migration/data/mainnet/state.json | 17 +++++++ packages/v3/migration/engine/executions.ts | 4 +- packages/v3/migration/engine/tasks/migrate.ts | 50 +++++++++++-------- .../migrations/0_deploy_proxyAdmin.ts | 40 +++++++++++++++ .../{0_v2_to_v3.ts => 1_v2_to_v3.ts} | 23 +++------ packages/v3/test/helpers/AccessControl.ts | 4 +- packages/v3/test/helpers/Constants.ts | 2 +- packages/v3/test/helpers/Factory.ts | 7 +-- packages/v3/test/helpers/Time.ts | 2 +- packages/v3/test/helpers/Utils.ts | 7 +-- packages/v3/test/network/BancorNetwork.ts | 11 ++-- packages/v3/test/network/BancorVault.ts | 17 +++---- packages/v3/test/network/NetworkSettings.ts | 14 +++--- .../v3/test/network/PendingWithdrawals.ts | 10 ++-- .../v3/test/pools/LiquidityPoolCollection.ts | 12 ++--- packages/v3/test/pools/NetworkTokenPool.ts | 8 ++- packages/v3/test/pools/PoolToken.ts | 17 +++---- packages/v3/test/token/ERC20Burnable.ts | 11 ++-- packages/v3/test/token/ReserveToken.ts | 11 ++-- packages/v3/test/token/SafeERC20Ex.ts | 11 ++-- 23 files changed, 172 insertions(+), 133 deletions(-) create mode 100644 packages/v3/migration/data/mainnet/state.json create mode 100644 packages/v3/migration/migrations/0_deploy_proxyAdmin.ts rename packages/v3/migration/migrations/{0_v2_to_v3.ts => 1_v2_to_v3.ts} (61%) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 2147c39f4..7b7730447 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -1,7 +1,6 @@ -import { ethers } from 'hardhat'; -import { ContractFactory } from '@ethersproject/contracts'; import { Signer } from '@ethersproject/abstract-signer'; - +import { ContractFactory } from '@ethersproject/contracts'; +import { ethers } from 'hardhat'; import { BancorNetwork__factory, BancorVault__factory, diff --git a/packages/v3/components/v2Helpers/v2.ts b/packages/v3/components/v2Helpers/v2.ts index 510deb69d..00619f939 100644 --- a/packages/v3/components/v2Helpers/v2.ts +++ b/packages/v3/components/v2Helpers/v2.ts @@ -1,5 +1,6 @@ import { BancorNetwork__factory, + ContractRegistry, ConverterFactory__factory, ConverterRegistryData__factory, ConverterRegistry__factory, @@ -14,7 +15,6 @@ import { StakingRewards__factory, TokenHolder__factory } from '@bancor/contracts-v2/typechain'; -import { ContractRegistry } from '@bancor/contracts-v2/typechain'; import { Signer } from 'ethers'; import { formatBytes32String } from 'ethers/lib/utils'; diff --git a/packages/v3/migration/config.ts b/packages/v3/migration/config.ts index 6b4b15bb6..1d9d4d0c1 100644 --- a/packages/v3/migration/config.ts +++ b/packages/v3/migration/config.ts @@ -1,15 +1,31 @@ import { network } from 'hardhat'; import { loadENV } from 'hardhat.config'; +import { log } from 'migration/engine/logger/logger'; export const MIGRATION_FOLDER = 'migration/migrations'; export const MIGRATION_DATA_FOLDER = 'migration/data'; +const FORK_PREFIX = 'fork-'; + +const MAINNET = 'mainnet'; + +type FORK_NETWORK_SUPPORTED = typeof MAINNET; + const GET_NETWORK_NAME = () => { - const networkForkName = loadENV('FORK'); + const networkForkName = loadENV('FORK'); if (networkForkName) { - return 'fork-' + networkForkName; + if (networkForkName !== MAINNET) { + log.error(`${networkForkName} is not supported, aborting.`); + process.exit(-1); + } + + return FORK_PREFIX + networkForkName; } return network.name; }; export const NETWORK_NAME = GET_NETWORK_NAME(); +export const FORK = { + isFork: NETWORK_NAME.startsWith(FORK_PREFIX), + originalNetwork: GET_NETWORK_NAME().substring(FORK_PREFIX.length) +}; diff --git a/packages/v3/migration/data/mainnet/state.json b/packages/v3/migration/data/mainnet/state.json new file mode 100644 index 000000000..d2a4fc04b --- /dev/null +++ b/packages/v3/migration/data/mainnet/state.json @@ -0,0 +1,17 @@ +{ + "migrationState": { + "latestMigration": -1 + }, + "networkState": { + "BNT": { + "token": "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C", + "governance": "0xa489C2b5b36835A327851Ab917A80562B5AFC244" + }, + "vBNT": { + "token": "0x48Fb253446873234F2fEBbF9BdeAA72d9d387f94", + "governance": "0x0887ae1251E180d7D453aeDEBee26e1639f20113" + }, + "ContractRegistry": "0x52Ae12ABe5D8BD778BD5397F99cA900624CfADD4", + "VortexBurner": "0x2f87b1fca1769BC3361700078e1985b2Dc0f1142" + } +} diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index 80ecaab70..46afcca68 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -1,8 +1,8 @@ -import { ExecutionError } from './errors/errors'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; +import { Contract } from 'ethers'; +import { ExecutionError } from './errors/errors'; import { log } from './logger/logger'; import { executeOverride, executionConfig } from './task'; -import { Contract } from 'ethers'; export type deployExecuteType = ReturnType; diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index 4cd796453..552a720b7 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -6,7 +6,7 @@ import { getDefaultParams } from 'migration/engine/task'; import { SystemState } from 'migration/engine/types'; import path from 'path'; import { migrateParamTask } from '..'; -import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME } from '../../config'; +import { FORK, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME } from '../../config'; import { log } from '../logger/logger'; import { Migration } from '../types'; @@ -40,6 +40,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => // @TODO revert the migration here return; } + log.success('Healthcheck success ✨ '); // if healthcheck passed, update the state and write it to the system state = { @@ -60,43 +61,50 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { const { signer, overrides, executionConfig, deployExecute } = await getDefaultParams(hre, args); - // If reset, delete all the files in the corresponding network folder + const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); + if (args.reset) { + // If reset, delete all the files in the corresponding network folder log.info(`Resetting ${NETWORK_NAME} migratation folder`); - fs.rmSync(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME), { - recursive: true + fs.rmSync(pathToState, { + recursive: true, + force: true }); } - // Deployment files - let pathToDeploymentFiles = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); - // If deployment folder doesn't exist, create it - if (!fs.existsSync(pathToDeploymentFiles)) { - fs.mkdirSync(pathToDeploymentFiles); + // If network folder doesn't exist, create it + if (!fs.existsSync(pathToState)) { + fs.mkdirSync(pathToState); } // Read all files into the folder and fetch any state file - const allDeploymentFiles = fs.readdirSync(pathToDeploymentFiles); - const deploymentFiles = allDeploymentFiles.find((fileName: string) => fileName === 'state.json'); + const pathToStateFolder = fs.readdirSync(pathToState); + const stateFile = pathToStateFolder.find((fileName: string) => fileName === 'state.json'); - const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); const writeState = async (state: SystemState) => { fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); }; - const fetchState = () => { + const fetchState = (pathToState: string) => { return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; }; + let state = { + migrationState: { + latestMigration: -1 + }, + networkState: {} + }; + + // If network is a fork fetch info from original network + if (FORK.isFork) { + state = fetchState(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, FORK.originalNetwork)); + } + // If there is no state file in the network's folder, create an empty one - if (!deploymentFiles) { - writeState({ - migrationState: { - latestMigration: -1 - }, - networkState: {} - }); + if (!stateFile) { + writeState(state); } - const initialState = fetchState(); + const initialState = fetchState(pathToState); // Migration files const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts new file mode 100644 index 000000000..cae869472 --- /dev/null +++ b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts @@ -0,0 +1,40 @@ +import { deployedContract, Migration } from 'migration/engine/types'; + +export type InitialState = { + BNT: { token: deployedContract; governance: deployedContract }; + vBNT: { token: deployedContract; governance: deployedContract }; + + ContractRegistry: deployedContract; + VortexBurner: deployedContract; +}; + +export type State = { + BNT: { token: deployedContract; governance: deployedContract }; + vBNT: { token: deployedContract; governance: deployedContract }; + + ContractRegistry: deployedContract; + VortexBurner: deployedContract; + + ProxyAdmin: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + const ProxyAdmin = await deploy('ProxyAdmin', contracts.ProxyAdmin.deploy); + + return { + ...initialState, + + ProxyAdmin: ProxyAdmin.address + }; + }, + + healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/0_v2_to_v3.ts b/packages/v3/migration/migrations/1_v2_to_v3.ts similarity index 61% rename from packages/v3/migration/migrations/0_v2_to_v3.ts rename to packages/v3/migration/migrations/1_v2_to_v3.ts index c2e57989e..9dd8f39b0 100644 --- a/packages/v3/migration/migrations/0_v2_to_v3.ts +++ b/packages/v3/migration/migrations/1_v2_to_v3.ts @@ -2,14 +2,7 @@ import { ContractRegistry__factory, TokenGovernance__factory } from '@bancor/con import { fetchV2ContractState } from 'components/v2Helpers/v2'; import { deployedContract, Migration } from 'migration/engine/types'; import { TestERC20Token__factory } from 'typechain'; - -export type InitialState = { - BNT: { token: deployedContract; governance: deployedContract }; - vBNT: { token: deployedContract; governance: deployedContract }; - - ContractRegistry: deployedContract; - VortexBurner: deployedContract; -}; +import { State as InitialState } from './0_deploy_proxyAdmin'; export type State = { BNT: { token: deployedContract; governance: deployedContract }; @@ -22,13 +15,13 @@ export type State = { }; const migration: Migration = { - up: async (signer, contracts, V2State: InitialState, { deploy, execute }): Promise => { - const ContractRegistry = ContractRegistry__factory.connect(V2State.ContractRegistry, signer); + up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + const ContractRegistry = ContractRegistry__factory.connect(initialState.ContractRegistry, signer); // Fetch basic info from config - const BNT = TestERC20Token__factory.connect(V2State.BNT.token, signer); - const vBNT = TestERC20Token__factory.connect(V2State.vBNT.token, signer); - const BNTGov = TokenGovernance__factory.connect(V2State.BNT.governance, signer); - const vBNTGov = TokenGovernance__factory.connect(V2State.vBNT.governance, signer); + const BNT = TestERC20Token__factory.connect(initialState.BNT.token, signer); + const vBNT = TestERC20Token__factory.connect(initialState.vBNT.token, signer); + const BNTGov = TokenGovernance__factory.connect(initialState.BNT.governance, signer); + const vBNTGov = TokenGovernance__factory.connect(initialState.vBNT.governance, signer); // Fetch V2 contracts from basic info const V2ContractState = await fetchV2ContractState(ContractRegistry, signer); @@ -37,7 +30,7 @@ const migration: Migration = { const BancorVault = await deploy('BancorVault', contracts.BancorVault.deploy, BNT.address); return { - ...V2State, + ...initialState, BancorVault: BancorVault.address }; diff --git a/packages/v3/test/helpers/AccessControl.ts b/packages/v3/test/helpers/AccessControl.ts index fab86a074..326adc768 100644 --- a/packages/v3/test/helpers/AccessControl.ts +++ b/packages/v3/test/helpers/AccessControl.ts @@ -1,7 +1,5 @@ import { expect } from 'chai'; -import { ethers } from 'ethers'; -import { BigNumber } from 'ethers'; - +import { BigNumber, ethers } from 'ethers'; import { AccessControlUpgradeable } from 'typechain'; const { diff --git a/packages/v3/test/helpers/Constants.ts b/packages/v3/test/helpers/Constants.ts index b057c6057..1407c071d 100644 --- a/packages/v3/test/helpers/Constants.ts +++ b/packages/v3/test/helpers/Constants.ts @@ -1,4 +1,4 @@ -import { ethers, BigNumber } from 'ethers'; +import { BigNumber, ethers } from 'ethers'; const { constants: { AddressZero, MaxUint256 } diff --git a/packages/v3/test/helpers/Factory.ts b/packages/v3/test/helpers/Factory.ts index 824c1d410..ee0a64d47 100644 --- a/packages/v3/test/helpers/Factory.ts +++ b/packages/v3/test/helpers/Factory.ts @@ -1,11 +1,8 @@ +import Contracts, { Contract, ContractBuilder } from 'components/Contracts'; import { BaseContract, BigNumber, ContractFactory } from 'ethers'; import { isEqual } from 'lodash'; - -import Contracts, { Contract, ContractBuilder } from 'components/Contracts'; - -import { ProxyAdmin } from 'typechain'; - import { toAddress } from 'test/helpers/Utils'; +import { ProxyAdmin } from 'typechain'; const TOTAL_SUPPLY = BigNumber.from(1_000_000_000).mul(BigNumber.from(10).pow(18)); diff --git a/packages/v3/test/helpers/Time.ts b/packages/v3/test/helpers/Time.ts index 804d4b8eb..e13a92c5f 100644 --- a/packages/v3/test/helpers/Time.ts +++ b/packages/v3/test/helpers/Time.ts @@ -1,5 +1,5 @@ -import { ethers } from 'hardhat'; import { BigNumber, BigNumberish } from 'ethers'; +import { ethers } from 'hardhat'; export const advanceBlock = async () => { return await ethers.provider.send('evm_mine', []); diff --git a/packages/v3/test/helpers/Utils.ts b/packages/v3/test/helpers/Utils.ts index 644a787ab..6677eaf9f 100644 --- a/packages/v3/test/helpers/Utils.ts +++ b/packages/v3/test/helpers/Utils.ts @@ -1,11 +1,8 @@ -import { ethers } from 'hardhat'; -import { BigNumber, BigNumberish, ContractTransaction, BaseContract } from 'ethers'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - import Contracts from 'components/Contracts'; +import { BaseContract, BigNumber, BigNumberish, ContractTransaction } from 'ethers'; +import { ethers } from 'hardhat'; import { TestERC20Token } from 'typechain'; - import { NATIVE_TOKEN_ADDRESS } from './Constants'; export type TokenWithAddress = TestERC20Token | { address: string }; diff --git a/packages/v3/test/network/BancorNetwork.ts b/packages/v3/test/network/BancorNetwork.ts index 8a46f1f94..23208aca7 100644 --- a/packages/v3/test/network/BancorNetwork.ts +++ b/packages/v3/test/network/BancorNetwork.ts @@ -1,14 +1,11 @@ -import { expect } from 'chai'; -import { ethers } from 'hardhat'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - +import { expect } from 'chai'; import Contracts from 'components/Contracts'; -import { BancorNetwork, TokenHolderUpgradeable } from 'typechain'; - +import { ethers } from 'hardhat'; import { ZERO_ADDRESS } from 'test/helpers/Constants'; -import { shouldHaveGap } from 'test/helpers/Proxy'; import { createSystem, createTokenHolder } from 'test/helpers/Factory'; +import { shouldHaveGap } from 'test/helpers/Proxy'; +import { BancorNetwork, TokenHolderUpgradeable } from 'typechain'; let nonOwner: SignerWithAddress; let newOwner: SignerWithAddress; diff --git a/packages/v3/test/network/BancorVault.ts b/packages/v3/test/network/BancorVault.ts index 231b5e124..fad0b1497 100644 --- a/packages/v3/test/network/BancorVault.ts +++ b/packages/v3/test/network/BancorVault.ts @@ -1,17 +1,14 @@ -import { expect } from 'chai'; -import { ethers } from 'hardhat'; -import { BigNumber } from 'ethers'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - +import { expect } from 'chai'; import Contracts from 'components/Contracts'; -import { BancorVault, TestERC20Token } from 'typechain'; - -import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from 'test/helpers/Constants'; -import { TokenWithAddress, getBalance, transfer } from 'test/helpers/Utils'; +import { BigNumber } from 'ethers'; +import { ethers } from 'hardhat'; import { expectRole, roles } from 'test/helpers/AccessControl'; +import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from 'test/helpers/Constants'; +import { createSystem } from 'test/helpers/Factory'; import { shouldHaveGap } from 'test/helpers/Proxy'; -import { createSystem, createNetworkToken } from 'test/helpers/Factory'; +import { getBalance, TokenWithAddress, transfer } from 'test/helpers/Utils'; +import { BancorVault, TestERC20Token } from 'typechain'; const { BancorVault: BancorVaultRoles } = roles; diff --git a/packages/v3/test/network/NetworkSettings.ts b/packages/v3/test/network/NetworkSettings.ts index 50e0e3c30..63d448e23 100644 --- a/packages/v3/test/network/NetworkSettings.ts +++ b/packages/v3/test/network/NetworkSettings.ts @@ -1,14 +1,12 @@ -import { expect } from 'chai'; -import { ethers } from 'hardhat'; -import { BigNumber } from 'ethers'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - +import { expect } from 'chai'; import Contracts from 'components/Contracts'; -import { NetworkSettings, TokenHolderUpgradeable, TestERC20Token } from 'typechain'; -import { ZERO_ADDRESS, PPM_RESOLUTION } from 'test/helpers/Constants'; +import { BigNumber } from 'ethers'; +import { ethers } from 'hardhat'; +import { PPM_RESOLUTION, ZERO_ADDRESS } from 'test/helpers/Constants'; +import { createSystem, createTokenHolder } from 'test/helpers/Factory'; import { shouldHaveGap } from 'test/helpers/Proxy'; -import { createTokenHolder, createSystem } from 'test/helpers/Factory'; +import { NetworkSettings, TestERC20Token, TokenHolderUpgradeable } from 'typechain'; let networkFeeWallet: TokenHolderUpgradeable; diff --git a/packages/v3/test/network/PendingWithdrawals.ts b/packages/v3/test/network/PendingWithdrawals.ts index ccc0a70a3..f9dadbd9e 100644 --- a/packages/v3/test/network/PendingWithdrawals.ts +++ b/packages/v3/test/network/PendingWithdrawals.ts @@ -1,13 +1,11 @@ -import { expect } from 'chai'; -import { ethers } from 'hardhat'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - +import { expect } from 'chai'; import Contracts from 'components/Contracts'; -import { duration } from 'test/helpers/Time'; +import { ethers } from 'hardhat'; import { ZERO_ADDRESS } from 'test/helpers/Constants'; -import { shouldHaveGap } from 'test/helpers/Proxy'; import { createSystem } from 'test/helpers/Factory'; +import { shouldHaveGap } from 'test/helpers/Proxy'; +import { duration } from 'test/helpers/Time'; import { PendingWithdrawals } from 'typechain'; const DEFAULT_LOCK_DURATION = duration.days(7); diff --git a/packages/v3/test/pools/LiquidityPoolCollection.ts b/packages/v3/test/pools/LiquidityPoolCollection.ts index 82c66b0cb..b6ebd5e0a 100644 --- a/packages/v3/test/pools/LiquidityPoolCollection.ts +++ b/packages/v3/test/pools/LiquidityPoolCollection.ts @@ -1,13 +1,11 @@ -import { expect } from 'chai'; -import { ethers } from 'hardhat'; -import { BigNumber } from 'ethers'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - +import { expect } from 'chai'; import Contracts from 'components/Contracts'; -import { NetworkSettings, PendingWithdrawals, BancorNetwork, LiquidityPoolCollection, TestERC20Token } from 'typechain'; -import { createSystem } from 'test/helpers/Factory'; +import { BigNumber } from 'ethers'; +import { ethers } from 'hardhat'; import { PPM_RESOLUTION } from 'test/helpers/Constants'; +import { createSystem } from 'test/helpers/Factory'; +import { LiquidityPoolCollection, TestERC20Token } from 'typechain'; const DEFAULT_TRADING_FEE_PPM = BigNumber.from(2000); const POOL_TYPE = BigNumber.from(1); diff --git a/packages/v3/test/pools/NetworkTokenPool.ts b/packages/v3/test/pools/NetworkTokenPool.ts index 2457500f8..9014fc96c 100644 --- a/packages/v3/test/pools/NetworkTokenPool.ts +++ b/packages/v3/test/pools/NetworkTokenPool.ts @@ -1,11 +1,9 @@ +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; -import { ethers } from 'hardhat'; import { BigNumber } from 'ethers'; - -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - -import { shouldHaveGap } from 'test/helpers/Proxy'; +import { ethers } from 'hardhat'; import { createSystem } from 'test/helpers/Factory'; +import { shouldHaveGap } from 'test/helpers/Proxy'; let nonOwner: SignerWithAddress; diff --git a/packages/v3/test/pools/PoolToken.ts b/packages/v3/test/pools/PoolToken.ts index 522997436..1239f2080 100644 --- a/packages/v3/test/pools/PoolToken.ts +++ b/packages/v3/test/pools/PoolToken.ts @@ -1,18 +1,15 @@ +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; -import { ethers } from 'hardhat'; -import { BigNumber, BigNumberish } from 'ethers'; -import { TypedDataUtils, signTypedMessage } from 'eth-sig-util'; +import Contracts from 'components/Contracts'; +import { signTypedMessage, TypedDataUtils } from 'eth-sig-util'; import { fromRpcSig } from 'ethereumjs-util'; import Wallet from 'ethereumjs-wallet'; - -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - -import Contracts from 'components/Contracts'; +import { BigNumber, BigNumberish } from 'ethers'; +import { ethers } from 'hardhat'; +import { MAX_UINT256, ZERO_ADDRESS } from 'test/helpers/Constants'; +import { duration, latest } from 'test/helpers/Time'; import { PoolToken, TestERC20Token } from 'typechain'; -import { ZERO_ADDRESS, MAX_UINT256 } from 'test/helpers/Constants'; -import { latest, duration } from 'test/helpers/Time'; - let poolToken: PoolToken; let reserveToken: TestERC20Token; diff --git a/packages/v3/test/token/ERC20Burnable.ts b/packages/v3/test/token/ERC20Burnable.ts index 9f608dc27..8f593868c 100644 --- a/packages/v3/test/token/ERC20Burnable.ts +++ b/packages/v3/test/token/ERC20Burnable.ts @@ -1,13 +1,10 @@ -import { expect } from 'chai'; -import { ethers } from 'hardhat'; -import { BigNumber, ContractTransaction } from 'ethers'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - +import { expect } from 'chai'; import Contracts from 'components/Contracts'; -import { TestERC20Burnable } from 'typechain'; - +import { BigNumber, ContractTransaction } from 'ethers'; +import { ethers } from 'hardhat'; import { ZERO_ADDRESS } from 'test/helpers/Constants'; +import { TestERC20Burnable } from 'typechain'; let burnable: TestERC20Burnable; let owner: SignerWithAddress; diff --git a/packages/v3/test/token/ReserveToken.ts b/packages/v3/test/token/ReserveToken.ts index d4c0f9ca4..6c3d48ebb 100644 --- a/packages/v3/test/token/ReserveToken.ts +++ b/packages/v3/test/token/ReserveToken.ts @@ -1,14 +1,11 @@ -import { expect } from 'chai'; -import { ethers } from 'hardhat'; -import { BigNumber } from 'ethers'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - +import { expect } from 'chai'; import Contracts from 'components/Contracts'; -import { TestReserveToken } from 'typechain'; - +import { BigNumber } from 'ethers'; +import { ethers } from 'hardhat'; import { NATIVE_TOKEN_ADDRESS } from 'test/helpers/Constants'; import { getBalance } from 'test/helpers/Utils'; +import { TestReserveToken } from 'typechain'; const TOTAL_SUPPLY = BigNumber.from(1_000_000); diff --git a/packages/v3/test/token/SafeERC20Ex.ts b/packages/v3/test/token/SafeERC20Ex.ts index 454254a80..ce6bc273b 100644 --- a/packages/v3/test/token/SafeERC20Ex.ts +++ b/packages/v3/test/token/SafeERC20Ex.ts @@ -1,12 +1,9 @@ -import { expect } from 'chai'; -import { ethers } from 'hardhat'; -import { BigNumber } from 'ethers'; - import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; - +import { expect } from 'chai'; import Contracts from 'components/Contracts'; - -import { TestSafeERC20Ex, TestERC20Token } from 'typechain'; +import { BigNumber } from 'ethers'; +import { ethers } from 'hardhat'; +import { TestERC20Token, TestSafeERC20Ex } from 'typechain'; const TOTAL_SUPPLY = BigNumber.from(1_000_000); From 23d65ef12486bc59f10370885226f86cbab53f57 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 22 Jul 2021 12:05:33 +0200 Subject: [PATCH 014/164] Fix issues + update README.md + optimizations --- packages/v3/hardhat.config.ts | 15 ++++++++++----- packages/v3/migration/README.md | 8 +++++--- packages/v3/migration/config.ts | 16 +++++++++------- packages/v3/migration/engine/tasks/migrate.ts | 14 +++++++++++--- 4 files changed, 35 insertions(+), 18 deletions(-) diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index 54b1d1620..a388c4179 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -36,12 +36,17 @@ const hardhatDefaultConfig = { } }; -const hardhatForkedConfig = loadENV('FORK') - ? { - forking: { - url: loadKey(`url-${loadENV('FORK')}`) +const FORK_NETWORK = loadENV('FORK'); +const FORK_NETWORK_URL = loadKey(`url-${FORK_NETWORK}`); + +const hardhatForkedConfig = FORK_NETWORK + ? FORK_NETWORK_URL + ? { + forking: { + url: FORK_NETWORK_URL + } } - } + : undefined : undefined; const config: HardhatUserConfig = { diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index ec63c9c72..e584a35f5 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -67,11 +67,13 @@ Create a migration file based from a template. ## How to run the migration on a fork ? -Because of current Hardhat limitation it's not practical to launch a fork and run migration on it via the `hardhat.config.ts`. So we had to find a workaround. To do so you have to execute the command by specifying the network in which you want to run. like so: +Because of current Hardhat limitation it's not practical to launch a fork and run migration on it via the `hardhat.config.ts`. So we had to find a workaround. -`FORK=mainnet yarn hh migrate` +To do so you have to execute the command by specifying the network in which you want to fork as an ENV variable. You'll also need to have the original network `state.json` file. Meaning that if you want to test a migration on a fork of the `mainnet` network you'll need have provided the correct state to the `mainnet` network folder. -In order for this to work you need to have in your `config.json` at the root of the `v3` repo in the key brackets the url for the corresponding FORK value. It NEEDS to start with `url-`, like so: `url-mainnet`. +Like so: `FORK=mainnet yarn hh migrate` + +In order for this to work you need to have in your `config.json` at the root of the `v3` repo in the `keys` object the url for the corresponding FORK value. It NEEDS to start with `url-`, example: `url-mainnet`. ## How to create a migration file ? diff --git a/packages/v3/migration/config.ts b/packages/v3/migration/config.ts index 1d9d4d0c1..9c3aab43c 100644 --- a/packages/v3/migration/config.ts +++ b/packages/v3/migration/config.ts @@ -13,19 +13,21 @@ type FORK_NETWORK_SUPPORTED = typeof MAINNET; const GET_NETWORK_NAME = () => { const networkForkName = loadENV('FORK'); + if (networkForkName) { - if (networkForkName !== MAINNET) { - log.error(`${networkForkName} is not supported, aborting.`); - process.exit(-1); + if (networkForkName === MAINNET) { + return FORK_PREFIX + networkForkName; } - - return FORK_PREFIX + networkForkName; + log.error(`${networkForkName} is not supported, aborting.`); + process.exit(-1); } return network.name; }; export const NETWORK_NAME = GET_NETWORK_NAME(); -export const FORK = { + +export const NETWORK_STATUS = { isFork: NETWORK_NAME.startsWith(FORK_PREFIX), - originalNetwork: GET_NETWORK_NAME().substring(FORK_PREFIX.length) + originalNetwork: NETWORK_NAME.substring(FORK_PREFIX.length), + networkName: NETWORK_NAME }; diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index 552a720b7..500de863d 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -6,7 +6,7 @@ import { getDefaultParams } from 'migration/engine/task'; import { SystemState } from 'migration/engine/types'; import path from 'path'; import { migrateParamTask } from '..'; -import { FORK, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME } from '../../config'; +import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, NETWORK_STATUS } from '../../config'; import { log } from '../logger/logger'; import { Migration } from '../types'; @@ -96,8 +96,16 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig }; // If network is a fork fetch info from original network - if (FORK.isFork) { - state = fetchState(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, FORK.originalNetwork)); + if (args.reset && NETWORK_STATUS.isFork) { + try { + log.info(`Fetching initial state from ${NETWORK_STATUS.originalNetwork}`); + state = fetchState(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_STATUS.originalNetwork)); + } catch (e) { + log.error( + `${NETWORK_STATUS.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` + ); + process.exit(); + } } // If there is no state file in the network's folder, create an empty one From b38e48f0f781fb38863333f1df8dd3c323655d5c Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 23 Jul 2021 02:11:22 +0200 Subject: [PATCH 015/164] Add proxy to engine + add initial contract migrations --- packages/v3/migration/engine/Proxy.ts | 27 ++++++ packages/v3/migration/engine/task.ts | 14 ++- packages/v3/migration/engine/tasks/migrate.ts | 16 ++-- packages/v3/migration/engine/types.ts | 12 ++- .../migrations/0_deploy_proxyAdmin.ts | 12 +-- .../migrations/1_deploy_initial_contracts.ts | 85 +++++++++++++++++++ .../v3/migration/migrations/1_v2_to_v3.ts | 43 ---------- 7 files changed, 147 insertions(+), 62 deletions(-) create mode 100644 packages/v3/migration/engine/Proxy.ts create mode 100644 packages/v3/migration/migrations/1_deploy_initial_contracts.ts delete mode 100644 packages/v3/migration/migrations/1_v2_to_v3.ts diff --git a/packages/v3/migration/engine/Proxy.ts b/packages/v3/migration/engine/Proxy.ts new file mode 100644 index 000000000..bffebed11 --- /dev/null +++ b/packages/v3/migration/engine/Proxy.ts @@ -0,0 +1,27 @@ +import Contracts, { Contract, ContractBuilder } from 'components/Contracts'; +import { BaseContract, ContractFactory } from 'ethers'; +import { ProxyAdmin, TransparentUpgradeableProxy } from 'typechain'; + +export type proxyType = ReturnType; + +export const initProxy = (contracts: typeof Contracts) => { + const createTransparentProxy = async (admin: BaseContract, logicContract: BaseContract) => { + return contracts.TransparentUpgradeableProxy.deploy(logicContract.address, admin.address, []); + }; + + const createProxy = async ( + admin: ProxyAdmin, + logicContractToDeploy: ContractBuilder, + ...ctorArgs: Parameters + ): Promise & { asProxy: TransparentUpgradeableProxy }> => { + const logicContract = await logicContractToDeploy.deploy(...ctorArgs); + const proxy = await createTransparentProxy(admin, logicContract); + + return { + ...(await logicContractToDeploy.attach(proxy.address)), + asProxy: await contracts.TransparentUpgradeableProxy.attach(proxy.address) + }; + }; + + return { createProxy }; +}; diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts index 9d0fb3e44..029d8143a 100644 --- a/packages/v3/migration/engine/task.ts +++ b/packages/v3/migration/engine/task.ts @@ -1,9 +1,12 @@ import { LedgerSigner } from '@ethersproject/hardware-wallets'; +import Contracts from 'components/Contracts'; import { BigNumberish } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { NETWORK_NAME } from 'migration/config'; import { initDeployExecute } from './executions'; +import { initProxy } from './Proxy'; +import { executionTools } from './types'; export type defaultParamTask = { ledger: boolean; @@ -38,12 +41,21 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def throw new Error("Transaction confirmation wasn't defined. Aborting"); } + const contracts = Contracts.connect(signer); + const deployExecute = initDeployExecute(executionConfig, overrides); + const proxy = initProxy(contracts); + + const executionTools: executionTools = { + ...deployExecute, + ...proxy + }; return { signer, + contracts, overrides, executionConfig, - deployExecute + executionTools }; }; diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index 500de863d..051284582 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -1,4 +1,3 @@ -import Contracts from 'components/Contracts'; import { importCsjOrEsModule } from 'components/TaskUtils'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; @@ -11,7 +10,10 @@ import { log } from '../logger/logger'; import { Migration } from '../types'; export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { - const { signer, migrationsData, initialState, writeState, deployExecute } = await getMigrateParams(hre, args); + const { signer, contracts, migrationsData, initialState, writeState, executionTools } = await getMigrateParams( + hre, + args + ); let state = initialState; @@ -30,12 +32,11 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => // Save oldState const oldState = currentNetworkState; - const contracts = Contracts.connect(signer); try { - currentNetworkState = await migration.up(signer, contracts, currentNetworkState, deployExecute); + currentNetworkState = await migration.up(signer, contracts, currentNetworkState, executionTools); // if healthcheck doesn't pass - if (!(await migration.healthcheck(signer, contracts, currentNetworkState, deployExecute))) { + if (!(await migration.healthcheck(signer, contracts, currentNetworkState, executionTools))) { log.error('Healthcheck failed'); // @TODO revert the migration here return; @@ -59,7 +60,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => }; export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { - const { signer, overrides, executionConfig, deployExecute } = await getDefaultParams(hre, args); + const { signer, contracts, overrides, executionConfig, executionTools } = await getDefaultParams(hre, args); const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); @@ -142,8 +143,9 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig return { signer, + contracts, initialState, - deployExecute, + executionTools, writeState, migrationsData, executionConfig, diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 440143ec6..ae6ba08ec 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,6 +1,7 @@ import { Contracts } from 'components/Contracts'; import { Signer } from 'ethers'; import { deployExecuteType } from './executions'; +import { proxyType } from './Proxy'; export type SystemState = { migrationState: { @@ -11,17 +12,24 @@ export type SystemState = { export type deployedContract = string; +export type deployedProxy = { + proxy: deployedContract; + logic: deployedContract; +}; + +export type executionTools = deployExecuteType & proxyType; + export interface Migration { up: ( signer: Signer, contracts: Contracts, initialState: any, - { deploy, execute }: deployExecuteType + { deploy, execute, createProxy }: executionTools ) => Promise<{}>; healthcheck: ( signer: Signer, contracts: Contracts, newState: any, - { deploy, execute }: deployExecuteType + { deploy, execute, createProxy }: executionTools ) => Promise; } diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts index cae869472..5e18d1360 100644 --- a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts @@ -8,18 +8,12 @@ export type InitialState = { VortexBurner: deployedContract; }; -export type State = { - BNT: { token: deployedContract; governance: deployedContract }; - vBNT: { token: deployedContract; governance: deployedContract }; - - ContractRegistry: deployedContract; - VortexBurner: deployedContract; - +export type NextState = InitialState & { ProxyAdmin: deployedContract; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { const ProxyAdmin = await deploy('ProxyAdmin', contracts.ProxyAdmin.deploy); return { @@ -29,7 +23,7 @@ const migration: Migration = { }; }, - healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { + healthcheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; diff --git a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts new file mode 100644 index 000000000..ca6d66a32 --- /dev/null +++ b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts @@ -0,0 +1,85 @@ +import { deployedProxy, Migration } from 'migration/engine/types'; +import { NextState as InitialState } from './0_deploy_proxyAdmin'; + +export type NextState = InitialState & { + networkSettings: deployedProxy; + bancorNetwork: deployedProxy; + vault: deployedProxy; + networkTokenPool: deployedProxy; + pendingWithdrawals: deployedProxy; + collection: deployedProxy; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + // + const admin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); + + const networkSettings = await createProxy(admin, contracts.NetworkSettings); + await execute('Initialize NetworkSettings proxy', networkSettings.initialize); + + const bancorNetwork = await createProxy(admin, contracts.BancorNetwork, networkSettings.address); + + const vault = await createProxy(admin, contracts.BancorVault, initialState.BNT.token); + await execute('Initialize Vault proxy', vault.initialize); + + const networkTokenPool = await createProxy( + admin, + contracts.NetworkTokenPool, + networkSettings.address, + vault.address + ); + await execute('Initialize NetworkTokenPool proxy', networkTokenPool.initialize); + + const pendingWithdrawals = await createProxy( + admin, + contracts.PendingWithdrawals, + networkSettings.address, + networkTokenPool.address + ); + await execute('Initialize PendingWithdrawals proxy', pendingWithdrawals.initialize); + + const collection = await createProxy(admin, contracts.LiquidityPoolCollection, networkSettings.address); + + await execute('Initialize Network proxy', bancorNetwork.initialize, pendingWithdrawals.address); + + return { + ...initialState, + + networkSettings: { + proxy: networkSettings.address, + logic: await networkSettings.asProxy.connect(admin.address).callStatic.implementation() + }, + + bancorNetwork: { + proxy: bancorNetwork.address, + logic: await bancorNetwork.asProxy.connect(admin.address).callStatic.implementation() + }, + + vault: { + proxy: vault.address, + logic: await vault.asProxy.connect(admin.address).callStatic.implementation() + }, + + networkTokenPool: { + proxy: networkTokenPool.address, + logic: await networkTokenPool.asProxy.connect(admin.address).callStatic.implementation() + }, + + pendingWithdrawals: { + proxy: pendingWithdrawals.address, + logic: await pendingWithdrawals.asProxy.connect(admin.address).callStatic.implementation() + }, + + collection: { + proxy: collection.address, + logic: await collection.asProxy.connect(admin.address).callStatic.implementation() + } + }; + }, + + healthcheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + return true; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/1_v2_to_v3.ts b/packages/v3/migration/migrations/1_v2_to_v3.ts deleted file mode 100644 index 9dd8f39b0..000000000 --- a/packages/v3/migration/migrations/1_v2_to_v3.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ContractRegistry__factory, TokenGovernance__factory } from '@bancor/contracts-v2/typechain'; -import { fetchV2ContractState } from 'components/v2Helpers/v2'; -import { deployedContract, Migration } from 'migration/engine/types'; -import { TestERC20Token__factory } from 'typechain'; -import { State as InitialState } from './0_deploy_proxyAdmin'; - -export type State = { - BNT: { token: deployedContract; governance: deployedContract }; - vBNT: { token: deployedContract; governance: deployedContract }; - - ContractRegistry: deployedContract; - VortexBurner: deployedContract; - - BancorVault: deployedContract; -}; - -const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { - const ContractRegistry = ContractRegistry__factory.connect(initialState.ContractRegistry, signer); - // Fetch basic info from config - const BNT = TestERC20Token__factory.connect(initialState.BNT.token, signer); - const vBNT = TestERC20Token__factory.connect(initialState.vBNT.token, signer); - const BNTGov = TokenGovernance__factory.connect(initialState.BNT.governance, signer); - const vBNTGov = TokenGovernance__factory.connect(initialState.vBNT.governance, signer); - - // Fetch V2 contracts from basic info - const V2ContractState = await fetchV2ContractState(ContractRegistry, signer); - - // Deploy V3 contracts - const BancorVault = await deploy('BancorVault', contracts.BancorVault.deploy, BNT.address); - - return { - ...initialState, - - BancorVault: BancorVault.address - }; - }, - - healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { - return true; - } -}; -export default migration; From b454232dee0171b3ac63e86b0cbed7f0a14a66dc Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 23 Jul 2021 13:19:03 +0200 Subject: [PATCH 016/164] pass deploy & execute to initProxy --- packages/v3/migration/engine/Proxy.ts | 17 ++++++++++++++--- packages/v3/migration/engine/task.ts | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/v3/migration/engine/Proxy.ts b/packages/v3/migration/engine/Proxy.ts index bffebed11..a5a21ec1b 100644 --- a/packages/v3/migration/engine/Proxy.ts +++ b/packages/v3/migration/engine/Proxy.ts @@ -1,12 +1,19 @@ import Contracts, { Contract, ContractBuilder } from 'components/Contracts'; import { BaseContract, ContractFactory } from 'ethers'; import { ProxyAdmin, TransparentUpgradeableProxy } from 'typechain'; +import { deployExecuteType } from './executions'; export type proxyType = ReturnType; -export const initProxy = (contracts: typeof Contracts) => { +export const initProxy = (contracts: typeof Contracts, { deploy, execute }: deployExecuteType) => { const createTransparentProxy = async (admin: BaseContract, logicContract: BaseContract) => { - return contracts.TransparentUpgradeableProxy.deploy(logicContract.address, admin.address, []); + return await deploy( + 'Deploying Upgradeable Proxy', + contracts.TransparentUpgradeableProxy.deploy, + logicContract.address, + admin.address, + [] + ); }; const createProxy = async ( @@ -14,7 +21,11 @@ export const initProxy = (contracts: typeof Contracts) => { logicContractToDeploy: ContractBuilder, ...ctorArgs: Parameters ): Promise & { asProxy: TransparentUpgradeableProxy }> => { - const logicContract = await logicContractToDeploy.deploy(...ctorArgs); + const logicContract = await deploy( + 'Deploying Logic contract', + logicContractToDeploy.deploy as any, + ...ctorArgs + ); const proxy = await createTransparentProxy(admin, logicContract); return { diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts index 029d8143a..a4e228c2f 100644 --- a/packages/v3/migration/engine/task.ts +++ b/packages/v3/migration/engine/task.ts @@ -44,7 +44,7 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def const contracts = Contracts.connect(signer); const deployExecute = initDeployExecute(executionConfig, overrides); - const proxy = initProxy(contracts); + const proxy = initProxy(contracts, deployExecute); const executionTools: executionTools = { ...deployExecute, From 23dde3de64fb6a0e1360a37360afe77a10f6dec6 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 26 Jul 2021 00:36:40 +0200 Subject: [PATCH 017/164] fix typos --- packages/v3/components/v2Helpers/v2.ts | 105 ------------------ packages/v3/hardhat.config.ts | 1 - packages/v3/migration/README.md | 4 +- packages/v3/migration/data/mainnet/state.json | 4 +- packages/v3/migration/engine/tasks/migrate.ts | 6 +- .../engine/tasks/subtasks/createMigration.ts | 2 +- packages/v3/migration/engine/types.ts | 7 +- .../migrations/0_deploy_proxyAdmin.ts | 5 +- .../migrations/1_deploy_initial_contracts.ts | 38 ++----- 9 files changed, 17 insertions(+), 155 deletions(-) delete mode 100644 packages/v3/components/v2Helpers/v2.ts diff --git a/packages/v3/components/v2Helpers/v2.ts b/packages/v3/components/v2Helpers/v2.ts deleted file mode 100644 index 00619f939..000000000 --- a/packages/v3/components/v2Helpers/v2.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { - BancorNetwork__factory, - ContractRegistry, - ConverterFactory__factory, - ConverterRegistryData__factory, - ConverterRegistry__factory, - ConverterUpgrader__factory, - LiquidityProtectionSettings__factory, - LiquidityProtectionStats__factory, - LiquidityProtectionStore__factory, - LiquidityProtectionSystemStore__factory, - LiquidityProtection__factory, - NetworkSettings__factory, - StakingRewardsStore__factory, - StakingRewards__factory, - TokenHolder__factory -} from '@bancor/contracts-v2/typechain'; -import { Signer } from 'ethers'; -import { formatBytes32String } from 'ethers/lib/utils'; - -export const fetchV2ContractState = async (ContractRegistry: ContractRegistry, signer: Signer) => { - return { - BancorNetwork: BancorNetwork__factory.connect( - await ContractRegistry.addressOf(formatBytes32String('BancorNetwork')), - signer - ), - - LiquidityProtection: await fetchLiquidityProtectionContracts(ContractRegistry, signer), - StakingRewards: await fetchStakingRewardsContracts(ContractRegistry, signer), - Converter: await fetchConverter(ContractRegistry, signer), - NetworkSettings: await fetchNetworkSettings(ContractRegistry, signer) - }; -}; - -export const fetchConverter = async (ContractRegistry: ContractRegistry, signer: Signer) => { - return { - ConverterRegistry: ConverterRegistry__factory.connect( - await ContractRegistry.addressOf(formatBytes32String('BancorConverterRegistry')), - signer - ), - ConverterRegistryData: ConverterRegistryData__factory.connect( - await ContractRegistry.addressOf(formatBytes32String('BancorConverterRegistryData')), - signer - ), - ConverterUpgrader: ConverterUpgrader__factory.connect( - await ContractRegistry.addressOf(formatBytes32String('BancorConverterUpgrader')), - signer - ), - ConverterFactory: ConverterFactory__factory.connect( - await ContractRegistry.addressOf(formatBytes32String('ConverterFactory')), - signer - ) - }; -}; - -export const fetchNetworkSettings = async (ContractRegistry: ContractRegistry, signer: Signer) => { - const NetworkSettings = NetworkSettings__factory.connect( - await ContractRegistry.addressOf(formatBytes32String('NetworkSettings')), - signer - ); - const NetworkFeeWallet = TokenHolder__factory.connect(await NetworkSettings.networkFeeWallet(), signer); - - return { NetworkSettings, NetworkFeeWallet }; -}; - -export const fetchLiquidityProtectionContracts = async (ContractRegistry: ContractRegistry, signer: Signer) => { - const LiquidityProtection = LiquidityProtection__factory.connect( - await ContractRegistry.addressOf(formatBytes32String('LiquidityProtection')), - signer - ); - const LiquidityProtectionStore = LiquidityProtectionStore__factory.connect( - await LiquidityProtection.store(), - signer - ); - const LiquidityProtectionSystemStore = LiquidityProtectionSystemStore__factory.connect( - await LiquidityProtection.systemStore(), - signer - ); - const LiquidityProtectionStats = LiquidityProtectionStats__factory.connect( - await LiquidityProtection.stats(), - signer - ); - const LiquidityProtectionSettings = LiquidityProtectionSettings__factory.connect( - await LiquidityProtection.settings(), - signer - ); - - return { - LiquidityProtection, - LiquidityProtectionStore, - LiquidityProtectionSystemStore, - LiquidityProtectionStats, - LiquidityProtectionSettings - }; -}; - -export const fetchStakingRewardsContracts = async (ContractRegistry: ContractRegistry, signer: Signer) => { - const StakingRewards = StakingRewards__factory.connect( - await ContractRegistry.addressOf(formatBytes32String('StakingRewards')), - signer - ); - const StakingRewardsStore = StakingRewardsStore__factory.connect(await StakingRewards.store(), signer); - - return { StakingRewards, StakingRewardsStore }; -}; diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index a388c4179..8bc59189c 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -2,7 +2,6 @@ import '@nomiclabs/hardhat-ethers'; import '@nomiclabs/hardhat-etherscan'; import '@nomiclabs/hardhat-waffle'; import '@typechain/hardhat'; -// Patch BigNumber to include a min and a max functions. import { BigNumber } from 'ethers'; import fs from 'fs'; import 'hardhat-abi-exporter'; diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index e584a35f5..b2b4d07e2 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -32,7 +32,7 @@ export interface Migration { initialState: any, { deploy, execute }: deployExecuteType ) => Promise<{}>; - healthcheck: ( + healthCheck: ( signer: Signer, contracts: Contracts, newState: any, @@ -115,7 +115,7 @@ const migration: Migration = { }; }, - healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { + healthCheck: async (signer, contracts, state: State, { deploy, execute }) => { return true; } }; diff --git a/packages/v3/migration/data/mainnet/state.json b/packages/v3/migration/data/mainnet/state.json index d2a4fc04b..b5061ee03 100644 --- a/packages/v3/migration/data/mainnet/state.json +++ b/packages/v3/migration/data/mainnet/state.json @@ -10,8 +10,6 @@ "vBNT": { "token": "0x48Fb253446873234F2fEBbF9BdeAA72d9d387f94", "governance": "0x0887ae1251E180d7D453aeDEBee26e1639f20113" - }, - "ContractRegistry": "0x52Ae12ABe5D8BD778BD5397F99cA900624CfADD4", - "VortexBurner": "0x2f87b1fca1769BC3361700078e1985b2Dc0f1142" + } } } diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index 051284582..e1787d5e2 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -35,13 +35,13 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => try { currentNetworkState = await migration.up(signer, contracts, currentNetworkState, executionTools); - // if healthcheck doesn't pass - if (!(await migration.healthcheck(signer, contracts, currentNetworkState, executionTools))) { + // if health check doesn't pass + if (!(await migration.healthCheck(signer, contracts, currentNetworkState, executionTools))) { log.error('Healthcheck failed'); // @TODO revert the migration here return; } - log.success('Healthcheck success ✨ '); + log.success('Health check success ✨ '); // if healthcheck passed, update the state and write it to the system state = { diff --git a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts index e33c59df1..82fbcb5c8 100644 --- a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts +++ b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts @@ -23,7 +23,7 @@ const migration: Migration = { }; }, - healthcheck: async (signer, contracts, state: State, { deploy, execute }) => { + healthCheck: async (signer, contracts, state: State, { deploy, execute }) => { return true; } }; diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index ae6ba08ec..e3575c452 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -12,10 +12,7 @@ export type SystemState = { export type deployedContract = string; -export type deployedProxy = { - proxy: deployedContract; - logic: deployedContract; -}; +export type deployedProxy = deployedContract; export type executionTools = deployExecuteType & proxyType; @@ -26,7 +23,7 @@ export interface Migration { initialState: any, { deploy, execute, createProxy }: executionTools ) => Promise<{}>; - healthcheck: ( + healthCheck: ( signer: Signer, contracts: Contracts, newState: any, diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts index 5e18d1360..4b0ba893c 100644 --- a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts @@ -3,9 +3,6 @@ import { deployedContract, Migration } from 'migration/engine/types'; export type InitialState = { BNT: { token: deployedContract; governance: deployedContract }; vBNT: { token: deployedContract; governance: deployedContract }; - - ContractRegistry: deployedContract; - VortexBurner: deployedContract; }; export type NextState = InitialState & { @@ -23,7 +20,7 @@ const migration: Migration = { }; }, - healthcheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; diff --git a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts index ca6d66a32..6b6c63aac 100644 --- a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts +++ b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts @@ -12,7 +12,6 @@ export type NextState = InitialState & { const migration: Migration = { up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { - // const admin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); const networkSettings = await createProxy(admin, contracts.NetworkSettings); @@ -46,39 +45,16 @@ const migration: Migration = { return { ...initialState, - networkSettings: { - proxy: networkSettings.address, - logic: await networkSettings.asProxy.connect(admin.address).callStatic.implementation() - }, - - bancorNetwork: { - proxy: bancorNetwork.address, - logic: await bancorNetwork.asProxy.connect(admin.address).callStatic.implementation() - }, - - vault: { - proxy: vault.address, - logic: await vault.asProxy.connect(admin.address).callStatic.implementation() - }, - - networkTokenPool: { - proxy: networkTokenPool.address, - logic: await networkTokenPool.asProxy.connect(admin.address).callStatic.implementation() - }, - - pendingWithdrawals: { - proxy: pendingWithdrawals.address, - logic: await pendingWithdrawals.asProxy.connect(admin.address).callStatic.implementation() - }, - - collection: { - proxy: collection.address, - logic: await collection.asProxy.connect(admin.address).callStatic.implementation() - } + networkSettings: networkSettings.address, + bancorNetwork: bancorNetwork.address, + vault: vault.address, + networkTokenPool: networkTokenPool.address, + pendingWithdrawals: pendingWithdrawals.address, + collection: collection.address }; }, - healthcheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { return true; } }; From 771ce17705fda46777902b24596ae4f39a9a7d0a Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 26 Jul 2021 16:11:13 +0200 Subject: [PATCH 018/164] optimization of network forking use --- packages/v3/README.md | 8 +- packages/v3/hardhat.config.ts | 71 +++- packages/v3/migration/README.md | 42 ++- packages/v3/migration/config.ts | 22 +- packages/v3/migration/engine/Proxy.ts | 2 +- packages/v3/migration/engine/executions.ts | 4 +- packages/v3/migration/engine/index.ts | 4 +- packages/v3/migration/engine/task.ts | 6 +- packages/v3/migration/engine/tasks/migrate.ts | 18 +- packages/v3/migration/engine/types.ts | 4 +- .../migrations/1_deploy_initial_contracts.ts | 2 +- packages/v3/package.json | 2 +- yarn.lock | 315 +++++++++++++++++- 13 files changed, 412 insertions(+), 88 deletions(-) diff --git a/packages/v3/README.md b/packages/v3/README.md index 846381808..63866e84d 100644 --- a/packages/v3/README.md +++ b/packages/v3/README.md @@ -16,8 +16,12 @@ In order to use some plugins, API keys or custom network with secret config we n ```json { "keys": { - "etherscan": "XYZ", - "url-mainnet": "https://eth-mainnet.alchemyapi.io/v2/supersecretcode" + "etherscan": "XYZ" + }, + "networks": { + "mainnet": { + "url": "https://eth-mainnet.alchemyapi.io/v2/supersecretkey" + } } } ``` diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index 8bc59189c..ec823346f 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -1,3 +1,5 @@ +import './migration/engine'; +import { log } from './migration/engine/logger/logger'; import '@nomiclabs/hardhat-ethers'; import '@nomiclabs/hardhat-etherscan'; import '@nomiclabs/hardhat-waffle'; @@ -13,19 +15,61 @@ import { HardhatUserConfig } from 'hardhat/config'; import path from 'path'; import 'solidity-coverage'; import 'tsconfig-paths/register'; -import './migration/engine'; const configPath = path.join(__dirname, 'config.json'); const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {}; -export const loadKey = (keyName: string) => { +// Utilities +const loadKey = (keyName: string) => { return configFile.keys ? (configFile.keys[keyName] ? configFile.keys[keyName] : undefined) : undefined; }; - -export const loadENV = (envKeyName: string) => { +const loadNetworkUrl = (networkName: string) => { + return configFile.networks + ? configFile.networks[networkName] + ? configFile.networks[networkName].url + ? configFile.networks[networkName].url + : undefined + : undefined + : undefined; +}; +const loadENV = (envKeyName: string) => { return process.env[envKeyName] as unknown as T; }; +// Forking configuration +export const FORK_PREFIX = 'fork-'; + +const MAINNET = 'mainnet'; + +type FORK_NETWORK_SUPPORTED = typeof MAINNET; + +export const FORK_CONFIG = (() => { + const networkToFork: string = loadENV('FORK'); + const urlNetworkToFork: string = loadNetworkUrl(networkToFork); + + if (networkToFork && !urlNetworkToFork) { + log.error(`${networkToFork} config is not present in the config.json file, aborting.`); + process.exit(-1); + } + + if (!networkToFork && !urlNetworkToFork) { + return undefined; + } + + let FORKED_NETWORK_NAME: string = ''; + if (networkToFork === MAINNET) { + FORKED_NETWORK_NAME = FORK_PREFIX + networkToFork; + } else { + log.error(`${networkToFork} is not supported, aborting.`); + process.exit(-1); + } + + return { + networkName: FORKED_NETWORK_NAME, + networkUrl: urlNetworkToFork + }; +})(); + const hardhatDefaultConfig = { gasPrice: 20000000000, gas: 9500000, @@ -35,22 +79,19 @@ const hardhatDefaultConfig = { } }; -const FORK_NETWORK = loadENV('FORK'); -const FORK_NETWORK_URL = loadKey(`url-${FORK_NETWORK}`); - -const hardhatForkedConfig = FORK_NETWORK - ? FORK_NETWORK_URL - ? { - forking: { - url: FORK_NETWORK_URL - } +const hardhatForkedConfig = FORK_CONFIG + ? { + forking: { + url: FORK_CONFIG.networkUrl } - : undefined + } : undefined; const config: HardhatUserConfig = { networks: { - hardhat: hardhatForkedConfig || hardhatDefaultConfig + hardhat: hardhatForkedConfig || hardhatDefaultConfig, + + ...configFile.networks }, solidity: { diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index b2b4d07e2..78cdd61d3 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -65,16 +65,6 @@ Create a migration file based from a template. # Getting started -## How to run the migration on a fork ? - -Because of current Hardhat limitation it's not practical to launch a fork and run migration on it via the `hardhat.config.ts`. So we had to find a workaround. - -To do so you have to execute the command by specifying the network in which you want to fork as an ENV variable. You'll also need to have the original network `state.json` file. Meaning that if you want to test a migration on a fork of the `mainnet` network you'll need have provided the correct state to the `mainnet` network folder. - -Like so: `FORK=mainnet yarn hh migrate` - -In order for this to work you need to have in your `config.json` at the root of the `v3` repo in the `keys` object the url for the corresponding FORK value. It NEEDS to start with `url-`, example: `url-mainnet`. - ## How to create a migration file ? ``` @@ -83,10 +73,10 @@ yarn hh create-migration migrationFileName If you don't use this CLI to generate your migration files, bear in mind that they have to start by a number splitted from the rest of the name by the character '\_', like so: "999_testfile.ts". -## How to execute a migration ? +## How to execute a migration on a network? ``` -yarn hh migrate --network fork-mainnet +yarn hh migrate --network mainnet ``` 1. `Migrate` will look for the network data folder. If not it will create one. @@ -95,30 +85,38 @@ yarn hh migrate --network fork-mainnet 3. Update the state on the go. +## How to run the migration on a fork ? + +Because of current Hardhat limitation it's not practical to launch a fork and run migration on it via the `hardhat.config.ts`. So we had to find a workaround. + +To do so you have to execute the command by specifying the network in which you want to fork as an ENV variable. You'll also need to have the original network `state.json` file. Meaning that if you want to test a migration on a fork of the `mainnet` network you'll need to provide the correct state to the `mainnet` network folder. + +In order for this to work you need to have in your `config.json` at the root of the `v3` repo in the `urls` object the url for the corresponding FORK value. Example: `"mainnet": "https://eth-mainnet.alchemyapi.io/v2/supersecretcode"` if you are forking mainnet, i.e: `FORK=mainnet yarn hh migrate`. + ## What does a basic migration file looks like ```ts import { deployedContract, Migration } from 'migration/engine/types'; export type InitialState = {}; - -export type State = { - BNT: deployedContract; +export type NextState = InitialState & { + ProxyAdmin: deployedContract; }; - const migration: Migration = { - up: async (signer, contracts, V2State: InitialState, { deploy, execute }): Promise => { - const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', 1000000); - + up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + const ProxyAdmin = await deploy('ProxyAdmin', contracts.ProxyAdmin.deploy); return { - BNT: BNT.address + ...initialState, + + ProxyAdmin: ProxyAdmin.address }; }, - healthCheck: async (signer, contracts, state: State, { deploy, execute }) => { + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; return true; } }; - export default migration; ``` diff --git a/packages/v3/migration/config.ts b/packages/v3/migration/config.ts index 9c3aab43c..74fc87369 100644 --- a/packages/v3/migration/config.ts +++ b/packages/v3/migration/config.ts @@ -1,32 +1,18 @@ import { network } from 'hardhat'; -import { loadENV } from 'hardhat.config'; -import { log } from 'migration/engine/logger/logger'; +import { FORK_CONFIG, FORK_PREFIX } from 'hardhat.config'; export const MIGRATION_FOLDER = 'migration/migrations'; export const MIGRATION_DATA_FOLDER = 'migration/data'; -const FORK_PREFIX = 'fork-'; - -const MAINNET = 'mainnet'; - -type FORK_NETWORK_SUPPORTED = typeof MAINNET; - const GET_NETWORK_NAME = () => { - const networkForkName = loadENV('FORK'); - - if (networkForkName) { - if (networkForkName === MAINNET) { - return FORK_PREFIX + networkForkName; - } - log.error(`${networkForkName} is not supported, aborting.`); - process.exit(-1); + if (FORK_CONFIG) { + return FORK_CONFIG.networkName; } return network.name; }; - export const NETWORK_NAME = GET_NETWORK_NAME(); -export const NETWORK_STATUS = { +export const MIGRATION_CONFIG = { isFork: NETWORK_NAME.startsWith(FORK_PREFIX), originalNetwork: NETWORK_NAME.substring(FORK_PREFIX.length), networkName: NETWORK_NAME diff --git a/packages/v3/migration/engine/Proxy.ts b/packages/v3/migration/engine/Proxy.ts index a5a21ec1b..226f854a0 100644 --- a/packages/v3/migration/engine/Proxy.ts +++ b/packages/v3/migration/engine/Proxy.ts @@ -1,7 +1,7 @@ +import { deployExecuteType } from './executions'; import Contracts, { Contract, ContractBuilder } from 'components/Contracts'; import { BaseContract, ContractFactory } from 'ethers'; import { ProxyAdmin, TransparentUpgradeableProxy } from 'typechain'; -import { deployExecuteType } from './executions'; export type proxyType = ReturnType; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index 46afcca68..50304a3b3 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -1,8 +1,8 @@ -import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -import { Contract } from 'ethers'; import { ExecutionError } from './errors/errors'; import { log } from './logger/logger'; import { executeOverride, executionConfig } from './task'; +import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; +import { Contract } from 'ethers'; export type deployExecuteType = ReturnType; diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index e8bfd03b7..c22177506 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -1,7 +1,7 @@ -import { lazyAction } from 'components/TaskUtils'; +import { lazyAction } from '../../components/TaskUtils'; +import { defaultParamTask } from './task'; import { task, types } from 'hardhat/config'; import path from 'path'; -import { defaultParamTask } from './task'; export const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks'; export const PATH_TO_ENGINE_SUBTASKS_FOLDER = 'migration/engine/tasks/subtasks'; diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts index a4e228c2f..2049ddad0 100644 --- a/packages/v3/migration/engine/task.ts +++ b/packages/v3/migration/engine/task.ts @@ -1,12 +1,12 @@ +import { initProxy } from './Proxy'; +import { initDeployExecute } from './executions'; +import { executionTools } from './types'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; import Contracts from 'components/Contracts'; import { BigNumberish } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { NETWORK_NAME } from 'migration/config'; -import { initDeployExecute } from './executions'; -import { initProxy } from './Proxy'; -import { executionTools } from './types'; export type defaultParamTask = { ledger: boolean; diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index e1787d5e2..bd093bd44 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -1,13 +1,13 @@ +import { migrateParamTask } from '..'; +import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../../config'; +import { log } from '../logger/logger'; +import { Migration } from '../types'; import { importCsjOrEsModule } from 'components/TaskUtils'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { getDefaultParams } from 'migration/engine/task'; import { SystemState } from 'migration/engine/types'; import path from 'path'; -import { migrateParamTask } from '..'; -import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, NETWORK_STATUS } from '../../config'; -import { log } from '../logger/logger'; -import { Migration } from '../types'; export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { const { signer, contracts, migrationsData, initialState, writeState, executionTools } = await getMigrateParams( @@ -97,13 +97,15 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig }; // If network is a fork fetch info from original network - if (args.reset && NETWORK_STATUS.isFork) { + if (args.reset && MIGRATION_CONFIG.isFork) { try { - log.info(`Fetching initial state from ${NETWORK_STATUS.originalNetwork}`); - state = fetchState(path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_STATUS.originalNetwork)); + log.info(`Fetching initial state from ${MIGRATION_CONFIG.originalNetwork}`); + state = fetchState( + path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, MIGRATION_CONFIG.originalNetwork) + ); } catch (e) { log.error( - `${NETWORK_STATUS.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` + `${MIGRATION_CONFIG.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` ); process.exit(); } diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index e3575c452..3802b3c1b 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,7 +1,7 @@ +import { proxyType } from './Proxy'; +import { deployExecuteType } from './executions'; import { Contracts } from 'components/Contracts'; import { Signer } from 'ethers'; -import { deployExecuteType } from './executions'; -import { proxyType } from './Proxy'; export type SystemState = { migrationState: { diff --git a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts index 6b6c63aac..4f987b5b0 100644 --- a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts +++ b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts @@ -1,5 +1,5 @@ -import { deployedProxy, Migration } from 'migration/engine/types'; import { NextState as InitialState } from './0_deploy_proxyAdmin'; +import { deployedProxy, Migration } from 'migration/engine/types'; export type NextState = InitialState & { networkSettings: deployedProxy; diff --git a/packages/v3/package.json b/packages/v3/package.json index 4b13042f1..0c386b33f 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -47,6 +47,7 @@ "@nomiclabs/hardhat-waffle": "^2.0.1", "@openzeppelin/contracts": "3.4.1-solc-0.7-2", "@openzeppelin/contracts-upgradeable": "3.4.1-solc-0.7-2", + "@trivago/prettier-plugin-sort-imports": "^2.0.2", "@typechain/ethers-v5": "^7.0.1", "@typechain/hardhat": "^2.1.2", "@types/chai": "^4.2.21", @@ -69,7 +70,6 @@ "mocha": "^9.0.2", "prettier": "^2.3.2", "prettier-package-json": "^2.6.0", - "prettier-plugin-organize-imports": "^2.3.2", "prettier-plugin-solidity": "^1.0.0-beta.14", "snyk": "^1.658.0", "solc": "0.7.6", diff --git a/yarn.lock b/yarn.lock index 175c3d8b0..e30f9be99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,18 +16,174 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== dependencies: "@babel/highlight" "^7.14.5" +"@babel/compat-data@^7.14.5": + version "7.14.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" + integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw== + +"@babel/core@7.13.10": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.10.tgz#07de050bbd8193fcd8a3c27918c0890613a94559" + integrity sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.9" + "@babel/helper-compilation-targets" "^7.13.10" + "@babel/helper-module-transforms" "^7.13.0" + "@babel/helpers" "^7.13.10" + "@babel/parser" "^7.13.10" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@7.13.9": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39" + integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== + dependencies: + "@babel/types" "^7.13.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/generator@^7.13.0", "@babel/generator@^7.13.9", "@babel/generator@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.8.tgz#bf86fd6af96cf3b74395a8ca409515f89423e070" + integrity sha512-cYDUpvIzhBVnMzRoY1fkSEhK/HmwEVwlyULYgn/tMQYd6Obag3ylCjONle3gdErfXBW61SVTlR9QR7uWlgeIkg== + dependencies: + "@babel/types" "^7.14.8" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-compilation-targets@^7.13.10": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz#7a99c5d0967911e972fe2c3411f7d5b498498ecf" + integrity sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw== + dependencies: + "@babel/compat-data" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.16.6" + semver "^6.3.0" + +"@babel/helper-function-name@^7.12.13", "@babel/helper-function-name@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz#89e2c474972f15d8e233b52ee8c480e2cfcd50c4" + integrity sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ== + dependencies: + "@babel/helper-get-function-arity" "^7.14.5" + "@babel/template" "^7.14.5" + "@babel/types" "^7.14.5" + +"@babel/helper-get-function-arity@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz#25fbfa579b0937eee1f3b805ece4ce398c431815" + integrity sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-hoist-variables@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz#e0dd27c33a78e577d7c8884916a3e7ef1f7c7f8d" + integrity sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-member-expression-to-functions@^7.14.5": + version "7.14.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.7.tgz#97e56244beb94211fe277bd818e3a329c66f7970" + integrity sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-module-imports@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3" + integrity sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-module-transforms@^7.13.0": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.8.tgz#d4279f7e3fd5f4d5d342d833af36d4dd87d7dc49" + integrity sha512-RyE+NFOjXn5A9YU1dkpeBaduagTlZ0+fccnIcAGbv1KGUlReBj7utF7oEth8IdIBQPcux0DDgW5MFBH2xu9KcA== + dependencies: + "@babel/helper-module-imports" "^7.14.5" + "@babel/helper-replace-supers" "^7.14.5" + "@babel/helper-simple-access" "^7.14.8" + "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.8" + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.14.8" + "@babel/types" "^7.14.8" + +"@babel/helper-optimise-call-expression@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c" + integrity sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-replace-supers@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz#0ecc0b03c41cd567b4024ea016134c28414abb94" + integrity sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.14.5" + "@babel/helper-optimise-call-expression" "^7.14.5" + "@babel/traverse" "^7.14.5" + "@babel/types" "^7.14.5" + +"@babel/helper-simple-access@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924" + integrity sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg== + dependencies: + "@babel/types" "^7.14.8" + +"@babel/helper-split-export-declaration@^7.12.13", "@babel/helper-split-export-declaration@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz#22b23a54ef51c2b7605d851930c1976dd0bc693a" + integrity sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz#32be33a756f29e278a0d644fa08a2c9e0f88a34c" + integrity sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow== + "@babel/helper-validator-identifier@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== + +"@babel/helpers@^7.13.10": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.8.tgz#839f88f463025886cff7f85a35297007e2da1b77" + integrity sha512-ZRDmI56pnV+p1dH6d+UN6GINGz7Krps3+270qqI9UJ4wxYThfAIcI5i7j5vXC4FJ3Wap+S9qcebxeYiqn87DZw== + dependencies: + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.14.8" + "@babel/types" "^7.14.8" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" @@ -37,6 +193,72 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/parser@7.13.10": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.10.tgz#8f8f9bf7b3afa3eabd061f7a5bcdf4fec3c48409" + integrity sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ== + +"@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.14.5", "@babel/parser@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.8.tgz#66fd41666b2d7b840bd5ace7f7416d5ac60208d4" + integrity sha512-syoCQFOoo/fzkWDeM0dLEZi5xqurb5vuyzwIMNZRNun+N/9A4cUZeQaE7dTrB8jGaKuJRBtEOajtnmw0I5hvvA== + +"@babel/template@^7.12.13", "@babel/template@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" + integrity sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.14.5" + "@babel/types" "^7.14.5" + +"@babel/traverse@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" + integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.0" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.0" + "@babel/types" "^7.13.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.8.tgz#c0253f02677c5de1a8ff9df6b0aacbec7da1a8ce" + integrity sha512-kexHhzCljJcFNn1KYAQ6A5wxMRzq9ebYpEDV4+WdNyr3i7O44tanbDOR/xjiG2F3sllan+LgwK+7OMk0EmydHg== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.14.8" + "@babel/helper-function-name" "^7.14.5" + "@babel/helper-hoist-variables" "^7.14.5" + "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/parser" "^7.14.8" + "@babel/types" "^7.14.8" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" + integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@babel/types@^7.13.0", "@babel/types@^7.14.5", "@babel/types@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.8.tgz#38109de8fcadc06415fbd9b74df0065d4d41c728" + integrity sha512-iob4soQa7dZw8nodR/KlOQkPh9S4I8RwCxwRIFuiMRYjOzH/KJzdUfDgz6cGi5dDaclXF4P2PAhCdrBJNIg68Q== + dependencies: + "@babel/helper-validator-identifier" "^7.14.8" + to-fast-properties "^2.0.0" + "@bancor/token-governance@bancorprotocol/token-governance": version "0.1.0" resolved "https://codeload.github.com/bancorprotocol/token-governance/tar.gz/72c40f70149cbd4b294556ee253bb0afd9620098" @@ -2086,6 +2308,21 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== +"@trivago/prettier-plugin-sort-imports@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-2.0.2.tgz#62c52462220df6fb35815aaefeaa383fc2535ab1" + integrity sha512-esk6vplzXYwXQs079wBbKog4AFuZfxpJU+MygiijV0wbAibI0tEm+diFFhYP7B2lAaKKdU4+w+BW+McNZCw9HA== + dependencies: + "@babel/core" "7.13.10" + "@babel/generator" "7.13.9" + "@babel/parser" "7.13.10" + "@babel/traverse" "7.13.0" + "@babel/types" "7.13.0" + "@types/lodash" "4.14.168" + javascript-natural-sort "0.7.1" + lodash "4.17.21" + prettier "2.2.1" + "@truffle/error@^0.0.14": version "0.0.14" resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.14.tgz#59683b5407bede7bddf16d80dc5592f9c5e5fa05" @@ -2281,6 +2518,11 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.171.tgz#f01b3a5fe3499e34b622c362a46a609fdb23573b" integrity sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg== +"@types/lodash@4.14.168": + version "4.14.168" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.168.tgz#fe24632e79b7ade3f132891afff86caa5e5ce008" + integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q== + "@types/lru-cache@^5.1.0": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" @@ -3858,6 +4100,17 @@ browserslist@^3.2.6: caniuse-lite "^1.0.30000844" electron-to-chromium "^1.3.47" +browserslist@^4.16.6: + version "4.16.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" + integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== + dependencies: + caniuse-lite "^1.0.30001219" + colorette "^1.2.2" + electron-to-chromium "^1.3.723" + escalade "^3.1.1" + node-releases "^1.1.71" + bs58@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -4084,6 +4337,11 @@ caniuse-lite@^1.0.30000844: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001243.tgz#d9250155c91e872186671c523f3ae50cfc94a3aa" integrity sha512-vNxw9mkTBtkmLFnJRv/2rhs1yufpDfCkBZexG3Y0xdOH2Z/eE/85E4Dl5j1YUN34nZVsSp6vVRFQRrez9wJMRA== +caniuse-lite@^1.0.30001219: + version "1.0.30001247" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001247.tgz#105be7a8fb30cdd303275e769a9dfb87d4b3577a" + integrity sha512-4rS7co+7+AoOSPRPOPUt5/GdaqZc0EsUpWk66ofE3HJTAajUK2Ss2VwoNzVN69ghg8lYYlh0an0Iy4LIHHo9UQ== + caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -4422,6 +4680,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + colors@^1.1.2, colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -4638,7 +4901,7 @@ conventional-recommended-bump@^6.1.0: meow "^8.0.0" q "^1.5.1" -convert-source-map@^1.5.1: +convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== @@ -5282,6 +5545,11 @@ electron-to-chromium@^1.3.47: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.772.tgz#fd1ed39f9f3149f62f581734e4f026e600369479" integrity sha512-X/6VRCXWALzdX+RjCtBU6cyg8WZgoxm9YA02COmDOiNJEZ59WkQggDbWZ4t/giHi/3GS+cvdrP6gbLISANAGYA== +electron-to-chromium@^1.3.723: + version "1.3.786" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.786.tgz#1fc572abc77e2f474725f8a61acf7e25ced9fbe2" + integrity sha512-AmvbLBj3hepRk8v/DHrFF8gINxOFfDbrn6Ts3PcK46/FBdQb5OMmpamSpZQXSkfi77FfBzYtQtAk+00LCLYMVw== + elfy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/elfy/-/elfy-1.0.0.tgz#7a1c86af7d41e0a568cbb4a3fa5b685648d9efcd" @@ -6985,6 +7253,11 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" @@ -7213,7 +7486,7 @@ global@~4.4.0: min-document "^2.19.0" process "^0.11.10" -globals@^11.7.0: +globals@^11.1.0, globals@^11.7.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== @@ -8407,6 +8680,11 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" +javascript-natural-sort@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz#f9e2303d4507f6d74355a73664d1440fb5a0ef59" + integrity sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k= + js-sha3@0.5.7, js-sha3@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" @@ -8460,6 +8738,11 @@ jsesc@^1.3.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -8557,7 +8840,7 @@ json5@^0.5.1: resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= -json5@^2.2.0: +json5@^2.1.2, json5@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== @@ -9324,7 +9607,7 @@ lodash@4.17.20: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -10300,6 +10583,11 @@ node-hid@2.1.1: node-addon-api "^3.0.2" prebuild-install "^6.0.0" +node-releases@^1.1.71: + version "1.1.73" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" + integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg== + node.extend@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-2.0.2.tgz#b4404525494acc99740f3703c496b7d5182cc6cc" @@ -11326,11 +11614,6 @@ prettier-package-json@^2.5.0, prettier-package-json@^2.6.0: sort-object-keys "^1.1.3" sort-order "^1.0.1" -prettier-plugin-organize-imports@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-2.3.2.tgz#b8a5446093d1ef5273abc05d2afc1924b40f4009" - integrity sha512-kWjQUX+ajt/h2ORXSyaXCTDcXO+01FSOz+xUVsaqJ9a0JGkr0fbUQ6GQARl4sI1fSBv8Y68d6iudz3l0i6uU3Q== - prettier-plugin-solidity@^1.0.0-beta.14: version "1.0.0-beta.14" resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.14.tgz#9e6f15ba5fc8bf23ddf72a02aaec00352e49cbcc" @@ -11343,6 +11626,11 @@ prettier-plugin-solidity@^1.0.0-beta.14: solidity-comments-extractor "^0.0.7" string-width "^4.2.2" +prettier@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + prettier@^1.14.3: version "1.19.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" @@ -13197,7 +13485,7 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== -source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -13852,6 +14140,11 @@ to-fast-properties@^1.0.3: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" From 5a286799b73ce830b75ebdb3fc415e421bbd737c Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 27 Jul 2021 02:01:32 +0200 Subject: [PATCH 019/164] Add log default param + added atomical initialization --- packages/v3/migration/engine/Proxy.ts | 40 +++++++++---------- packages/v3/migration/engine/executions.ts | 16 ++++---- packages/v3/migration/engine/logger/logger.ts | 33 ++++++++++++--- packages/v3/migration/engine/task.ts | 11 +++-- packages/v3/migration/engine/types.ts | 2 +- .../migrations/0_deploy_proxyAdmin.ts | 2 +- .../migrations/1_deploy_initial_contracts.ts | 21 +++++----- 7 files changed, 74 insertions(+), 51 deletions(-) diff --git a/packages/v3/migration/engine/Proxy.ts b/packages/v3/migration/engine/Proxy.ts index 226f854a0..d768f804d 100644 --- a/packages/v3/migration/engine/Proxy.ts +++ b/packages/v3/migration/engine/Proxy.ts @@ -5,33 +5,31 @@ import { ProxyAdmin, TransparentUpgradeableProxy } from 'typechain'; export type proxyType = ReturnType; -export const initProxy = (contracts: typeof Contracts, { deploy, execute }: deployExecuteType) => { - const createTransparentProxy = async (admin: BaseContract, logicContract: BaseContract) => { - return await deploy( - 'Deploying Upgradeable Proxy', - contracts.TransparentUpgradeableProxy.deploy, - logicContract.address, - admin.address, - [] - ); +export type initializeArgs = Parameters | 'skipInit'; + +export const initProxy = (contracts: typeof Contracts, { deploy }: deployExecuteType) => { + const createTransparentProxy = async ( + admin: BaseContract, + logicContract: BaseContract, + initializeArgs: initializeArgs = [] + ) => { + const data = + initializeArgs === 'skipInit' + ? [] + : logicContract.interface.encodeFunctionData('initialize', initializeArgs); + + return await deploy(contracts.TransparentUpgradeableProxy, logicContract.address, admin.address, data); }; const createProxy = async ( admin: ProxyAdmin, logicContractToDeploy: ContractBuilder, + initializeArgs: initializeArgs, ...ctorArgs: Parameters - ): Promise & { asProxy: TransparentUpgradeableProxy }> => { - const logicContract = await deploy( - 'Deploying Logic contract', - logicContractToDeploy.deploy as any, - ...ctorArgs - ); - const proxy = await createTransparentProxy(admin, logicContract); - - return { - ...(await logicContractToDeploy.attach(proxy.address)), - asProxy: await contracts.TransparentUpgradeableProxy.attach(proxy.address) - }; + ): Promise> => { + const logicContract = await deploy(logicContractToDeploy, ...ctorArgs); + const proxy = await createTransparentProxy(admin, logicContract, initializeArgs); + return await logicContractToDeploy.attach(proxy.address); }; return { createProxy }; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index 50304a3b3..e17c0c747 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -2,19 +2,19 @@ import { ExecutionError } from './errors/errors'; import { log } from './logger/logger'; import { executeOverride, executionConfig } from './task'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -import { Contract } from 'ethers'; +import { ContractBuilder, Contract } from 'components/Contracts'; +import { ContractFactory } from 'ethers'; export type deployExecuteType = ReturnType; export const initDeployExecute = (executionConfig: executionConfig, overrides: executeOverride) => { - const deploy = async Promise>( - name: string, - func: T, - ...args: Parameters + const deploy = async Promise>>( + factory: ContractBuilder, + ...args: Parameters['deploy']> ): Promise> => { - const contract = await func(...args, overrides); + const contract = await factory.deploy(...([...args, overrides] as any)); - log.executingTx(`Deploying contract ${name}`); + log.executingTx(`Deploying contract \${${factory.contractName}}`); log.normal(`Tx: `, contract.deployTransaction.hash); log.greyed(`Waiting to be mined...`); @@ -25,7 +25,7 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e throw new ExecutionError(contract.deployTransaction, receipt); } - log.success(`Deployed ${name} at ${contract.address} 🚀 !`); + log.success(`Deployed \${${factory.contractName}} at ${contract.address} 🚀 !`); return contract; }; diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger/logger.ts index 1cda6a7a6..bf5dc61be 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger/logger.ts @@ -1,12 +1,35 @@ +import { executeOverride, executionConfig } from '../task'; import chalk from 'chalk'; +export const palette = { + white: (...str: string[]) => console.log(`${str}`), + magenta: (...str: string[]) => console.log(chalk.magenta`${str}`), + yellow: (...str: string[]) => console.log(chalk.yellow`${str}`) +}; + export const log = { + // Basic logging normal: (...str: string[]) => console.log(...str), info: (str: string) => console.log(chalk.cyanBright`⚠️ ${str}`), - done: (str: string) => console.log(chalk.bold.yellowBright`${str}`), - executing: (str: string) => console.log(chalk.bold.blue`${str}`), - executingTx: (str: string) => console.log(chalk.bold.yellow`${str}`), + done: (str: string) => console.log(chalk.yellowBright`${str}`), + executing: (str: string) => console.log(chalk.blue`${str}`), + executingTx: (str: string) => console.log(chalk.yellow`${str}`), greyed: (str: string) => console.log(chalk.grey`${str}`), - success: (str: string) => console.log(chalk.bold.greenBright`${str}`), - error: (str: string) => console.log(chalk.bold.red`⛔️ ${str}`) + success: (str: string) => console.log(chalk.greenBright`${str}`), + error: (str: string) => console.log(chalk.red`⛔️ ${str}`), + + // Specific logging + defaultParams: (signerAddress: string, overrides: executeOverride, executionConfig: executionConfig) => { + palette.yellow(`********************`); + palette.yellow(`** Default Params **`); + palette.yellow(`********************`); + + palette.yellow(`Basic info`); + palette.white(` Signer: ${signerAddress}`); + palette.yellow(`Overrides:`); + palette.white(` GasPrice: ${overrides.gasPrice} (gwei)`); + palette.yellow(`Execution Config:`); + palette.white(` Confirmation to wait: ${executionConfig.confirmationToWait}`); + palette.yellow(`********************`); + } }; diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts index 2049ddad0..c434fbcac 100644 --- a/packages/v3/migration/engine/task.ts +++ b/packages/v3/migration/engine/task.ts @@ -1,9 +1,10 @@ -import { initProxy } from './Proxy'; import { initDeployExecute } from './executions'; +import { log } from './logger/logger'; +import { initProxy } from './proxy'; import { executionTools } from './types'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; import Contracts from 'components/Contracts'; -import { BigNumberish } from 'ethers'; +import { BigNumberish, Signer } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { NETWORK_NAME } from 'migration/config'; @@ -46,11 +47,9 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def const deployExecute = initDeployExecute(executionConfig, overrides); const proxy = initProxy(contracts, deployExecute); - const executionTools: executionTools = { - ...deployExecute, - ...proxy - }; + const executionTools: executionTools = { ...deployExecute, ...proxy }; + log.defaultParams(await signer.getAddress(), overrides, executionConfig); return { signer, contracts, diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 3802b3c1b..525362b47 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,5 +1,5 @@ -import { proxyType } from './Proxy'; import { deployExecuteType } from './executions'; +import { proxyType } from './proxy'; import { Contracts } from 'components/Contracts'; import { Signer } from 'ethers'; diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts index 4b0ba893c..40ac46c77 100644 --- a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts @@ -11,7 +11,7 @@ export type NextState = InitialState & { const migration: Migration = { up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { - const ProxyAdmin = await deploy('ProxyAdmin', contracts.ProxyAdmin.deploy); + const ProxyAdmin = await deploy(contracts.ProxyAdmin); return { ...initialState, diff --git a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts index 4f987b5b0..ef2790a1a 100644 --- a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts +++ b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts @@ -14,33 +14,36 @@ const migration: Migration = { up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { const admin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - const networkSettings = await createProxy(admin, contracts.NetworkSettings); - await execute('Initialize NetworkSettings proxy', networkSettings.initialize); + const networkSettings = await createProxy(admin, contracts.NetworkSettings, []); - const bancorNetwork = await createProxy(admin, contracts.BancorNetwork, networkSettings.address); + const bancorNetwork = await createProxy(admin, contracts.BancorNetwork, 'skipInit', networkSettings.address); - const vault = await createProxy(admin, contracts.BancorVault, initialState.BNT.token); - await execute('Initialize Vault proxy', vault.initialize); + const vault = await createProxy(admin, contracts.BancorVault, [], initialState.BNT.token); const networkTokenPool = await createProxy( admin, contracts.NetworkTokenPool, + [], networkSettings.address, vault.address ); - await execute('Initialize NetworkTokenPool proxy', networkTokenPool.initialize); const pendingWithdrawals = await createProxy( admin, contracts.PendingWithdrawals, + [], networkSettings.address, networkTokenPool.address ); - await execute('Initialize PendingWithdrawals proxy', pendingWithdrawals.initialize); - const collection = await createProxy(admin, contracts.LiquidityPoolCollection, networkSettings.address); + const collection = await createProxy( + admin, + contracts.LiquidityPoolCollection, + 'skipInit', + networkSettings.address + ); - await execute('Initialize Network proxy', bancorNetwork.initialize, pendingWithdrawals.address); + await execute('Initialize BancorNetwork', bancorNetwork.initialize, pendingWithdrawals.address); return { ...initialState, From 85016458573ff115e76dda91719348c65efb250e Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 27 Jul 2021 11:27:04 +0200 Subject: [PATCH 020/164] Typos + quick fixes --- packages/v3/migration/README.md | 6 +++--- packages/v3/migration/engine/executions.ts | 2 +- packages/v3/migration/engine/task.ts | 12 +++++++----- packages/v3/package.json | 3 ++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 78cdd61d3..bb16efc90 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -53,7 +53,7 @@ It also expose tasks and subtasks. Migrate the system from point A to point B. -`yarn hh migrate --help` for more info on params. +`yarn migrate --help` for more info on params. ### Subtasks @@ -61,7 +61,7 @@ Migrate the system from point A to point B. Create a migration file based from a template. -`yarn hh create-migration --help` for more info on params. +`yarn create-migration --help` for more info on params. # Getting started @@ -93,7 +93,7 @@ To do so you have to execute the command by specifying the network in which you In order for this to work you need to have in your `config.json` at the root of the `v3` repo in the `urls` object the url for the corresponding FORK value. Example: `"mainnet": "https://eth-mainnet.alchemyapi.io/v2/supersecretcode"` if you are forking mainnet, i.e: `FORK=mainnet yarn hh migrate`. -## What does a basic migration file looks like +## What does a basic migration file looks like ? ```ts import { deployedContract, Migration } from 'migration/engine/types'; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index e17c0c747..12380482b 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -14,7 +14,7 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e ): Promise> => { const contract = await factory.deploy(...([...args, overrides] as any)); - log.executingTx(`Deploying contract \${${factory.contractName}}`); + log.executingTx(`Deploying contract \${${factory.contractName}}. Params: ${args}`); log.normal(`Tx: `, contract.deployTransaction.hash); log.greyed(`Waiting to be mined...`); diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts index c434fbcac..7d0caf3c1 100644 --- a/packages/v3/migration/engine/task.ts +++ b/packages/v3/migration/engine/task.ts @@ -7,7 +7,7 @@ import Contracts from 'components/Contracts'; import { BigNumberish, Signer } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { NETWORK_NAME } from 'migration/config'; +import { MIGRATION_CONFIG } from 'migration/config'; export type defaultParamTask = { ledger: boolean; @@ -28,8 +28,8 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def // Overrides check const overrides: executeOverride = {}; - if (!args.gasPrice && NETWORK_NAME === 'mainnet') { - throw new Error("Gas Price shouldn't be equal to 0 for mainnet use. Aborting"); + if (!args.gasPrice && !MIGRATION_CONFIG.isFork) { + throw new Error(`Gas Price shouldn't be equal to 0 for ${MIGRATION_CONFIG.networkName} use. Aborting`); } overrides.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); @@ -38,8 +38,10 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def confirmationToWait: args.confirmationToWait }; - if (executionConfig.confirmationToWait <= 1 && NETWORK_NAME === 'mainnet') { - throw new Error("Transaction confirmation wasn't defined. Aborting"); + if (executionConfig.confirmationToWait <= 1 && !MIGRATION_CONFIG.isFork) { + throw new Error( + `Transaction confirmation should be defined or higher than 1 for ${MIGRATION_CONFIG.networkName} use. Aborting` + ); } const contracts = Contracts.connect(signer); diff --git a/packages/v3/package.json b/packages/v3/package.json index 0c386b33f..a12c6aa63 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -20,7 +20,8 @@ ], "scripts": { "hh": "hardhat", - "migrate": "hardhat migrate", + "migrate": "hh migrate", + "create-migration": "hh create-migration", "build": "hardhat compile", "rebuild": "yarn clean && yarn build", "test": "hardhat test", From a20d5d900a15743fb62c725c809aa45ffe747620 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 27 Jul 2021 14:18:00 +0200 Subject: [PATCH 021/164] few typos + readme.md updates --- packages/v3/migration/README.md | 14 ++++++-------- packages/v3/migration/engine/executions.ts | 3 ++- .../engine/tasks/subtasks/createMigration.ts | 17 ++++++++++------- packages/v3/package.json | 4 ++-- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index bb16efc90..4869e0593 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -99,22 +99,20 @@ In order for this to work you need to have in your `config.json` at the root of import { deployedContract, Migration } from 'migration/engine/types'; export type InitialState = {}; -export type NextState = InitialState & { - ProxyAdmin: deployedContract; +export type State = { + BNT: deployedContract; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { - const ProxyAdmin = await deploy('ProxyAdmin', contracts.ProxyAdmin.deploy); + up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + const BNT = await deploy(contracts.TestERC20Token, 'BNT', 'BNT', 1000000); return { ...initialState, - ProxyAdmin: ProxyAdmin.address + BNT: BNT.address }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + healthCheck: async (signer, contracts, state: State, { deploy, execute }) => { return true; } }; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index 12380482b..9cdd63f1a 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -14,7 +14,8 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e ): Promise> => { const contract = await factory.deploy(...([...args, overrides] as any)); - log.executingTx(`Deploying contract \${${factory.contractName}}. Params: ${args}`); + log.executingTx(`Deploying contract \${${factory.contractName}}`); + log.executingTx(`Params: [${args}]`); log.normal(`Tx: `, contract.deployTransaction.hash); log.greyed(`Waiting to be mined...`); diff --git a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts index 82fbcb5c8..e52df63b7 100644 --- a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts +++ b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts @@ -15,29 +15,32 @@ export type State = { }; const migration: Migration = { - up: async (signer, contracts, V2State: InitialState, { deploy, execute }): Promise => { - const BNT = await deploy('BNTContract', contracts.TestERC20Token.deploy, 'BNT', 'BNT', 1000000); - + up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + const BNT = await deploy(contracts.TestERC20Token, 'BNT', 'BNT', 1000000); + return { + ...initialState, + BNT: BNT.address }; }, - + healthCheck: async (signer, contracts, state: State, { deploy, execute }) => { return true; } }; - + export default migration; + `; if (args.migrationName === '') { throw new Error('File name cannot be empty'); } - const migrationId = Date.now(); + const migrationTimestamp = Date.now(); - const fileName = `${migrationId}_${args.migrationName}.ts`; + const fileName = `${migrationTimestamp}_${args.migrationName}.ts`; const pathToNewMigrationFile = path.join(hre.config.paths.root, MIGRATION_FOLDER, fileName); fs.writeFileSync(pathToNewMigrationFile, templateMigrationFile); diff --git a/packages/v3/package.json b/packages/v3/package.json index a12c6aa63..7a24c9458 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -20,8 +20,8 @@ ], "scripts": { "hh": "hardhat", - "migrate": "hh migrate", - "create-migration": "hh create-migration", + "migrate": "hardhat migrate", + "create-migration": "hardhat create-migration", "build": "hardhat compile", "rebuild": "yarn clean && yarn build", "test": "hardhat test", From 1e418c48a5a17ce5a38fa8a253a56ce0fa195007 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 27 Jul 2021 15:40:18 +0200 Subject: [PATCH 022/164] typos --- packages/v3/migration/engine/tasks/migrate.ts | 4 +- .../migrations/0_deploy_proxyAdmin.ts | 4 +- .../migrations/1_deploy_initial_contracts.ts | 64 ------------------- packages/v3/tsconfig.json | 3 +- 4 files changed, 5 insertions(+), 70 deletions(-) delete mode 100644 packages/v3/migration/migrations/1_deploy_initial_contracts.ts diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index bd093bd44..c6f9ba30c 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -37,13 +37,13 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => // if health check doesn't pass if (!(await migration.healthCheck(signer, contracts, currentNetworkState, executionTools))) { - log.error('Healthcheck failed'); + log.error('Health check failed'); // @TODO revert the migration here return; } log.success('Health check success ✨ '); - // if healthcheck passed, update the state and write it to the system + // if health check passed, update the state and write it to the system state = { migrationState: { latestMigration: migrationData.migrationTimestamp }, networkState: currentNetworkState diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts index 40ac46c77..f44afd5d4 100644 --- a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts @@ -11,12 +11,12 @@ export type NextState = InitialState & { const migration: Migration = { up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { - const ProxyAdmin = await deploy(contracts.ProxyAdmin); + const proxyAdmin = await deploy(contracts.ProxyAdmin); return { ...initialState, - ProxyAdmin: ProxyAdmin.address + ProxyAdmin: proxyAdmin.address }; }, diff --git a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts b/packages/v3/migration/migrations/1_deploy_initial_contracts.ts deleted file mode 100644 index ef2790a1a..000000000 --- a/packages/v3/migration/migrations/1_deploy_initial_contracts.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { NextState as InitialState } from './0_deploy_proxyAdmin'; -import { deployedProxy, Migration } from 'migration/engine/types'; - -export type NextState = InitialState & { - networkSettings: deployedProxy; - bancorNetwork: deployedProxy; - vault: deployedProxy; - networkTokenPool: deployedProxy; - pendingWithdrawals: deployedProxy; - collection: deployedProxy; -}; - -const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { - const admin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - - const networkSettings = await createProxy(admin, contracts.NetworkSettings, []); - - const bancorNetwork = await createProxy(admin, contracts.BancorNetwork, 'skipInit', networkSettings.address); - - const vault = await createProxy(admin, contracts.BancorVault, [], initialState.BNT.token); - - const networkTokenPool = await createProxy( - admin, - contracts.NetworkTokenPool, - [], - networkSettings.address, - vault.address - ); - - const pendingWithdrawals = await createProxy( - admin, - contracts.PendingWithdrawals, - [], - networkSettings.address, - networkTokenPool.address - ); - - const collection = await createProxy( - admin, - contracts.LiquidityPoolCollection, - 'skipInit', - networkSettings.address - ); - - await execute('Initialize BancorNetwork', bancorNetwork.initialize, pendingWithdrawals.address); - - return { - ...initialState, - - networkSettings: networkSettings.address, - bancorNetwork: bancorNetwork.address, - vault: vault.address, - networkTokenPool: networkTokenPool.address, - pendingWithdrawals: pendingWithdrawals.address, - collection: collection.address - }; - }, - - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - return true; - } -}; -export default migration; diff --git a/packages/v3/tsconfig.json b/packages/v3/tsconfig.json index 20ee6dfee..9faf62fdc 100644 --- a/packages/v3/tsconfig.json +++ b/packages/v3/tsconfig.json @@ -4,6 +4,5 @@ "baseUrl": "./" }, "include": ["./test", "./tasks", "./components", "./migration"], - "files": ["./hardhat.config.ts"], - "references": [{ "path": "../v2" }] + "files": ["./hardhat.config.ts"] } From 7366b93a4731b1b53126316108e2a568f90e49ab Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 27 Jul 2021 15:40:52 +0200 Subject: [PATCH 023/164] separate initial contract migration to several ones --- .../migrations/1_deploy_networkSettings.ts | 29 ++++++++++++++++ .../migration/migrations/2_deploy_network.ts | 34 +++++++++++++++++++ .../v3/migration/migrations/3_deploy_vault.ts | 29 ++++++++++++++++ .../migrations/4_deploy_networkTokenPool.ts | 34 +++++++++++++++++++ .../migrations/5_deploy_pendingWithdrawals.ts | 34 +++++++++++++++++++ .../6_deploy_liquidityPoolCollection copy.ts | 33 ++++++++++++++++++ .../7_deploy_initializeBancorNetwork.ts | 23 +++++++++++++ 7 files changed, 216 insertions(+) create mode 100644 packages/v3/migration/migrations/1_deploy_networkSettings.ts create mode 100644 packages/v3/migration/migrations/2_deploy_network.ts create mode 100644 packages/v3/migration/migrations/3_deploy_vault.ts create mode 100644 packages/v3/migration/migrations/4_deploy_networkTokenPool.ts create mode 100644 packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts create mode 100644 packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts create mode 100644 packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts diff --git a/packages/v3/migration/migrations/1_deploy_networkSettings.ts b/packages/v3/migration/migrations/1_deploy_networkSettings.ts new file mode 100644 index 000000000..9beb3b4f1 --- /dev/null +++ b/packages/v3/migration/migrations/1_deploy_networkSettings.ts @@ -0,0 +1,29 @@ +import { NextState as InitialState } from './0_deploy_proxyAdmin'; +import { deployedContract, Migration } from 'migration/engine/types'; + +export type NextState = InitialState & { + NetworkSettings: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); + + const networkSettings = await createProxy(proxyAdmin, contracts.NetworkSettings, []); + + return { + ...initialState, + + NetworkSettings: networkSettings.address + }; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/2_deploy_network.ts b/packages/v3/migration/migrations/2_deploy_network.ts new file mode 100644 index 000000000..2aff27d4e --- /dev/null +++ b/packages/v3/migration/migrations/2_deploy_network.ts @@ -0,0 +1,34 @@ +import { NextState as InitialState } from './1_deploy_networkSettings'; +import { deployedContract, Migration } from 'migration/engine/types'; + +export type NextState = InitialState & { + BancorNetwork: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); + + const bancorNetwork = await createProxy( + proxyAdmin, + contracts.BancorNetwork, + 'skipInit', + initialState.NetworkSettings + ); + + return { + ...initialState, + + BancorNetwork: bancorNetwork.address + }; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/3_deploy_vault.ts b/packages/v3/migration/migrations/3_deploy_vault.ts new file mode 100644 index 000000000..531032d3b --- /dev/null +++ b/packages/v3/migration/migrations/3_deploy_vault.ts @@ -0,0 +1,29 @@ +import { NextState as InitialState } from './2_deploy_network'; +import { deployedContract, Migration } from 'migration/engine/types'; + +export type NextState = InitialState & { + Vault: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); + + const vault = await createProxy(proxyAdmin, contracts.BancorVault, [], initialState.BNT.token); + + return { + ...initialState, + + Vault: vault.address + }; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts new file mode 100644 index 000000000..f1a576b14 --- /dev/null +++ b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts @@ -0,0 +1,34 @@ +import { NextState as InitialState } from './3_deploy_vault'; +import { deployedContract, Migration } from 'migration/engine/types'; + +export type NextState = InitialState & { + NetworkTokenPool: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); + + const networkTokenPool = await createProxy( + proxyAdmin, + contracts.NetworkTokenPool, + [], + initialState.NetworkSettings, + initialState.Vault + ); + return { + ...initialState, + + NetworkTokenPool: networkTokenPool.address + }; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts new file mode 100644 index 000000000..bbb737d38 --- /dev/null +++ b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts @@ -0,0 +1,34 @@ +import { NextState as InitialState } from './4_deploy_networkTokenPool'; +import { deployedContract, Migration } from 'migration/engine/types'; + +export type NextState = InitialState & { + PendingWithdrawals: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); + + const pendingWithdrawals = await createProxy( + proxyAdmin, + contracts.PendingWithdrawals, + [], + initialState.NetworkSettings, + initialState.NetworkTokenPool + ); + return { + ...initialState, + + PendingWithdrawals: pendingWithdrawals.address + }; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts new file mode 100644 index 000000000..147013c48 --- /dev/null +++ b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts @@ -0,0 +1,33 @@ +import { NextState as InitialState } from './5_deploy_pendingWithdrawals'; +import { deployedContract, Migration } from 'migration/engine/types'; + +export type NextState = InitialState & { + LiquidityPoolCollection: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); + + const liquidityPoolCollection = await createProxy( + proxyAdmin, + contracts.LiquidityPoolCollection, + 'skipInit', + initialState.NetworkSettings + ); + return { + ...initialState, + + LiquidityPoolCollection: liquidityPoolCollection.address + }; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts new file mode 100644 index 000000000..45789f797 --- /dev/null +++ b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts @@ -0,0 +1,23 @@ +import { NextState as InitialState } from './6_deploy_liquidityPoolCollection copy'; +import { Migration } from 'migration/engine/types'; + +export type NextState = InitialState; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + const bancorNetwork = await contracts.BancorNetwork.attach(initialState.BancorNetwork); + + await execute('Initialize BancorNetwork', bancorNetwork.initialize, initialState.PendingWithdrawals); + + return initialState; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + + if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; From a4ce37a0cd74dbe56898ac3113f94abaced63a36 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 28 Jul 2021 09:35:36 +0200 Subject: [PATCH 024/164] Add healthcheck for each migration --- packages/v3/migration/migrations/0_deploy_proxyAdmin.ts | 4 ++-- .../v3/migration/migrations/1_deploy_networkSettings.ts | 4 ++-- packages/v3/migration/migrations/2_deploy_network.ts | 4 ---- packages/v3/migration/migrations/3_deploy_vault.ts | 8 ++++---- .../v3/migration/migrations/4_deploy_networkTokenPool.ts | 4 ---- .../migration/migrations/5_deploy_pendingWithdrawals.ts | 4 ++-- .../migrations/6_deploy_liquidityPoolCollection copy.ts | 4 ++-- .../migrations/7_deploy_initializeBancorNetwork.ts | 4 ++-- 8 files changed, 14 insertions(+), 22 deletions(-) diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts index f44afd5d4..06c0cd3a1 100644 --- a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts @@ -21,9 +21,9 @@ const migration: Migration = { }, healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + const proxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + if ((await proxyAdmin.owner()) !== (await signer.getAddress())) return false; return true; } diff --git a/packages/v3/migration/migrations/1_deploy_networkSettings.ts b/packages/v3/migration/migrations/1_deploy_networkSettings.ts index 9beb3b4f1..39827b823 100644 --- a/packages/v3/migration/migrations/1_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/1_deploy_networkSettings.ts @@ -19,9 +19,9 @@ const migration: Migration = { }, healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + const networkSettings = await contracts.NetworkSettings.attach(state.NetworkSettings); - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + if ((await networkSettings.owner()) !== (await signer.getAddress())) return false; return true; } diff --git a/packages/v3/migration/migrations/2_deploy_network.ts b/packages/v3/migration/migrations/2_deploy_network.ts index 2aff27d4e..ee1c262e9 100644 --- a/packages/v3/migration/migrations/2_deploy_network.ts +++ b/packages/v3/migration/migrations/2_deploy_network.ts @@ -24,10 +24,6 @@ const migration: Migration = { }, healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); - - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; - return true; } }; diff --git a/packages/v3/migration/migrations/3_deploy_vault.ts b/packages/v3/migration/migrations/3_deploy_vault.ts index 531032d3b..f4a2413d3 100644 --- a/packages/v3/migration/migrations/3_deploy_vault.ts +++ b/packages/v3/migration/migrations/3_deploy_vault.ts @@ -9,19 +9,19 @@ const migration: Migration = { up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - const vault = await createProxy(proxyAdmin, contracts.BancorVault, [], initialState.BNT.token); + const bancorVault = await createProxy(proxyAdmin, contracts.BancorVault, [], initialState.BNT.token); return { ...initialState, - Vault: vault.address + Vault: bancorVault.address }; }, healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + const bancorVault = await contracts.BancorVault.attach(state.Vault); - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) return false; return true; } diff --git a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts index f1a576b14..cdf507927 100644 --- a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts @@ -24,10 +24,6 @@ const migration: Migration = { }, healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); - - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; - return true; } }; diff --git a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts index bbb737d38..a357fe137 100644 --- a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts @@ -24,9 +24,9 @@ const migration: Migration = { }, healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.PendingWithdrawals); - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) return false; return true; } diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts index 147013c48..3ac66efba 100644 --- a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts +++ b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts @@ -23,9 +23,9 @@ const migration: Migration = { }, healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + const liquidityPoolCollection = await contracts.LiquidityPoolCollection.attach(state.LiquidityPoolCollection); - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + if ((await liquidityPoolCollection.owner()) !== (await signer.getAddress())) return false; return true; } diff --git a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts index 45789f797..82e96a585 100644 --- a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts @@ -13,9 +13,9 @@ const migration: Migration = { }, healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const ProxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); + const bancorNetwork = await contracts.BancorNetwork.attach(state.BancorNetwork); - if ((await ProxyAdmin.owner()) !== (await signer.getAddress())) return false; + if ((await bancorNetwork.owner()) !== (await signer.getAddress())) return false; return true; } From 05da0c8b9045e04bcc2fe875e6596ce62ffc0957 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 29 Jul 2021 01:39:15 +0200 Subject: [PATCH 025/164] fix typos filename --- .../6_deploy_liquidityPoolCollection copy.ts | 33 ------------------- .../7_deploy_initializeBancorNetwork.ts | 2 +- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts deleted file mode 100644 index 3ac66efba..000000000 --- a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection copy.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { NextState as InitialState } from './5_deploy_pendingWithdrawals'; -import { deployedContract, Migration } from 'migration/engine/types'; - -export type NextState = InitialState & { - LiquidityPoolCollection: deployedContract; -}; - -const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { - const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - - const liquidityPoolCollection = await createProxy( - proxyAdmin, - contracts.LiquidityPoolCollection, - 'skipInit', - initialState.NetworkSettings - ); - return { - ...initialState, - - LiquidityPoolCollection: liquidityPoolCollection.address - }; - }, - - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - const liquidityPoolCollection = await contracts.LiquidityPoolCollection.attach(state.LiquidityPoolCollection); - - if ((await liquidityPoolCollection.owner()) !== (await signer.getAddress())) return false; - - return true; - } -}; -export default migration; diff --git a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts index 82e96a585..c58b0b705 100644 --- a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts @@ -1,4 +1,4 @@ -import { NextState as InitialState } from './6_deploy_liquidityPoolCollection copy'; +import { NextState as InitialState } from './6_deploy_liquidityPoolCollection'; import { Migration } from 'migration/engine/types'; export type NextState = InitialState; From 935a3928c85ef77cc217dd6d519ab4fe9c2f5aa7 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 29 Jul 2021 01:39:35 +0200 Subject: [PATCH 026/164] fix typos filename --- .../6_deploy_liquidityPoolCollection.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts new file mode 100644 index 000000000..b3b15afc0 --- /dev/null +++ b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts @@ -0,0 +1,26 @@ +import { NextState as InitialState } from './5_deploy_pendingWithdrawals'; +import { deployedContract, Migration } from 'migration/engine/types'; + +export type NextState = InitialState & { + LiquidityPoolCollection: deployedContract; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + const liquidityPoolCollection = await deploy(contracts.LiquidityPoolCollection, initialState.NetworkSettings); + return { + ...initialState, + + LiquidityPoolCollection: liquidityPoolCollection.address + }; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const liquidityPoolCollection = await contracts.LiquidityPoolCollection.attach(state.LiquidityPoolCollection); + + if ((await liquidityPoolCollection.owner()) !== (await signer.getAddress())) return false; + + return true; + } +}; +export default migration; From dc7af3312b0abb1152df43272d6b624ad539a1b9 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 29 Jul 2021 12:30:15 +0200 Subject: [PATCH 027/164] fix migration + optimization + update hh typechain --- packages/v3/migration/engine/executions.ts | 4 ++-- .../6_deploy_liquidityPoolCollection.ts | 2 +- packages/v3/package.json | 4 ++-- yarn.lock | 15 +++++++++++---- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index 9cdd63f1a..13d4d6c7f 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -8,10 +8,10 @@ import { ContractFactory } from 'ethers'; export type deployExecuteType = ReturnType; export const initDeployExecute = (executionConfig: executionConfig, overrides: executeOverride) => { - const deploy = async Promise>>( + const deploy = async ( factory: ContractBuilder, ...args: Parameters['deploy']> - ): Promise> => { + ): Promise['deploy']>> => { const contract = await factory.deploy(...([...args, overrides] as any)); log.executingTx(`Deploying contract \${${factory.contractName}}`); diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts index b3b15afc0..2e7a59f80 100644 --- a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts @@ -7,7 +7,7 @@ export type NextState = InitialState & { const migration: Migration = { up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { - const liquidityPoolCollection = await deploy(contracts.LiquidityPoolCollection, initialState.NetworkSettings); + const liquidityPoolCollection = await deploy(contracts.LiquidityPoolCollection, initialState.BancorNetwork); return { ...initialState, diff --git a/packages/v3/package.json b/packages/v3/package.json index 6fa043771..cb669828f 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -49,8 +49,8 @@ "@openzeppelin/contracts": "3.4.1-solc-0.7-2", "@openzeppelin/contracts-upgradeable": "3.4.1-solc-0.7-2", "@trivago/prettier-plugin-sort-imports": "^2.0.2", - "@typechain/ethers-v5": "^7.0.1", - "@typechain/hardhat": "^2.1.2", + "@typechain/ethers-v5": "7.0.1", + "@typechain/hardhat": "2.2.0", "@types/chai": "^4.2.21", "@types/mocha": "^8.2.3", "@types/node": "^16.3.3", diff --git a/yarn.lock b/yarn.lock index ff0994be0..7293add2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2366,6 +2366,11 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.1.tgz#a6ca6a9a0ff366af433f42f5f0e124794ff6b8f1" integrity sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA== +"@typechain/ethers-v5@7.0.1", "@typechain/ethers-v5@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-7.0.1.tgz#f9ae60ae5bd9e8ea8a996f66244147e8e74034ae" + integrity sha512-mXEJ7LG0pOYO+MRPkHtbf30Ey9X2KAsU0wkeoVvjQIn7iAY6tB3k3s+82bbmJAUMyENbQ04RDOZit36CgSG6Gg== + "@typechain/ethers-v5@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz#cd3ca1590240d587ca301f4c029b67bfccd08810" @@ -2373,10 +2378,12 @@ dependencies: ethers "^5.0.2" -"@typechain/ethers-v5@^7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-7.0.1.tgz#f9ae60ae5bd9e8ea8a996f66244147e8e74034ae" - integrity sha512-mXEJ7LG0pOYO+MRPkHtbf30Ey9X2KAsU0wkeoVvjQIn7iAY6tB3k3s+82bbmJAUMyENbQ04RDOZit36CgSG6Gg== +"@typechain/hardhat@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-2.2.0.tgz#a3e99b49c215c364c375c554bdce626bb21ecc47" + integrity sha512-ICZdbc5QA/bSZEvdAHsEL3/u260ZPIK7WZLNnoGywQNo6A98w7VKQW4DR7hPPMHe1FaSI1LTuIesRQvCUVyT3A== + dependencies: + fs-extra "^9.1.0" "@typechain/hardhat@^2.1.2": version "2.1.2" From 417bb1810de415895a71337d4386befc0b3eb0ff Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 29 Jul 2021 18:05:46 +0200 Subject: [PATCH 028/164] add migration errors + typos --- packages/v3/migration/README.md | 6 ++---- packages/v3/migration/engine/errors/errors.ts | 12 ++++++++++++ packages/v3/migration/engine/logger/logger.ts | 15 ++++++++++----- packages/v3/migration/engine/task.ts | 5 +---- packages/v3/migration/engine/tasks/migrate.ts | 9 +++++---- .../engine/tasks/subtasks/createMigration.ts | 4 +--- packages/v3/migration/engine/types.ts | 2 +- .../migration/migrations/0_deploy_proxyAdmin.ts | 5 ++--- .../migrations/1_deploy_networkSettings.ts | 5 ++--- .../v3/migration/migrations/2_deploy_network.ts | 4 +--- .../v3/migration/migrations/3_deploy_vault.ts | 6 +++--- .../migrations/4_deploy_networkTokenPool.ts | 5 ++--- .../migrations/5_deploy_pendingWithdrawals.ts | 5 ++--- .../6_deploy_liquidityPoolCollection.ts | 5 ++--- .../7_deploy_initializeBancorNetwork.ts | 5 ++--- 15 files changed, 48 insertions(+), 45 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 4869e0593..425f40d78 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -37,7 +37,7 @@ export interface Migration { contracts: Contracts, newState: any, { deploy, execute }: deployExecuteType - ) => Promise; + ) => Promise; } ``` @@ -112,9 +112,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: State, { deploy, execute }) => { - return true; - } + healthCheck: async (signer, contracts, state: State, { deploy, execute }) => {} }; export default migration; ``` diff --git a/packages/v3/migration/engine/errors/errors.ts b/packages/v3/migration/engine/errors/errors.ts index 17ad7f4a4..5a9b71db6 100644 --- a/packages/v3/migration/engine/errors/errors.ts +++ b/packages/v3/migration/engine/errors/errors.ts @@ -10,3 +10,15 @@ export class ExecutionError extends Error { this.tx = tx; } } + +export class MigrationError extends Error { + constructor(msg: string) { + super('Migration Error: ' + msg); + } +} + +export class OwnerNotSetOrCorrect extends MigrationError { + constructor() { + super('Owner not set or correct'); + } +} diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger/logger.ts index 2dc09587d..6db09976d 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger/logger.ts @@ -19,13 +19,18 @@ export const log = { error: (...str: string[]) => console.log(chalk.red(`⛔️ ${str}`)), // Specific logging - defaultParams: (signerAddress: string, overrides: executeOverride, executionConfig: executionConfig) => { - palette.yellow(`********************`); - palette.yellow(`** Default Params **`); - palette.yellow(`********************`); + migrationConfig: ( + signerAddress: string, + isLedger: boolean, + overrides: executeOverride, + executionConfig: executionConfig + ) => { + palette.yellow(`**********************`); + palette.yellow(`** Migration Config **`); + palette.yellow(`**********************`); palette.yellow(`Basic info`); - palette.white(` Signer: ${signerAddress}`); + palette.white(` Signer: ${signerAddress} ${isLedger ? '(ledger)' : ''}`); palette.yellow(`Overrides:`); palette.white(` GasPrice: ${overrides.gasPrice} (gwei)`); palette.yellow(`Execution Config:`); diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts index 7d0caf3c1..864d63bee 100644 --- a/packages/v3/migration/engine/task.ts +++ b/packages/v3/migration/engine/task.ts @@ -20,12 +20,10 @@ export type executeOverride = { gasPrice?: BigNumberish }; export type executionConfig = { confirmationToWait: number }; export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: defaultParamTask) => { - // Signer check const signer = args.ledger ? new LedgerSigner(hre.ethers.provider, 'hid', args.ledgerPath) : (await hre.ethers.getSigners())[0]; - // Overrides check const overrides: executeOverride = {}; if (!args.gasPrice && !MIGRATION_CONFIG.isFork) { @@ -33,7 +31,6 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def } overrides.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); - // Execution config let executionConfig: executionConfig = { confirmationToWait: args.confirmationToWait }; @@ -51,7 +48,7 @@ export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: def const executionTools: executionTools = { ...deployExecute, ...proxy }; - log.defaultParams(await signer.getAddress(), overrides, executionConfig); + log.migrationConfig(await signer.getAddress(), args.ledger, overrides, executionConfig); return { signer, contracts, diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index c6f9ba30c..bd11209df 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -35,13 +35,14 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => try { currentNetworkState = await migration.up(signer, contracts, currentNetworkState, executionTools); - // if health check doesn't pass - if (!(await migration.healthCheck(signer, contracts, currentNetworkState, executionTools))) { - log.error('Health check failed'); + try { + await migration.healthCheck(signer, contracts, currentNetworkState, executionTools); + log.success('Health check success ✨ '); + } catch (e) { + log.error('Health check failed: ' + e); // @TODO revert the migration here return; } - log.success('Health check success ✨ '); // if health check passed, update the state and write it to the system state = { diff --git a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts index e52df63b7..b5e640784 100644 --- a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts +++ b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts @@ -25,9 +25,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: State, { deploy, execute }) => { - return true; - } + healthCheck: async (signer, contracts, state: State, { deploy, execute }) => {} }; export default migration; diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 525362b47..1b6512a95 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -28,5 +28,5 @@ export interface Migration { contracts: Contracts, newState: any, { deploy, execute, createProxy }: executionTools - ) => Promise; + ) => Promise; } diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts index 06c0cd3a1..e18f44a34 100644 --- a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts @@ -1,3 +1,4 @@ +import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; import { deployedContract, Migration } from 'migration/engine/types'; export type InitialState = { @@ -23,9 +24,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); - if ((await proxyAdmin.owner()) !== (await signer.getAddress())) return false; - - return true; + if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); } }; export default migration; diff --git a/packages/v3/migration/migrations/1_deploy_networkSettings.ts b/packages/v3/migration/migrations/1_deploy_networkSettings.ts index 39827b823..caf565a90 100644 --- a/packages/v3/migration/migrations/1_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/1_deploy_networkSettings.ts @@ -1,4 +1,5 @@ import { NextState as InitialState } from './0_deploy_proxyAdmin'; +import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; import { deployedContract, Migration } from 'migration/engine/types'; export type NextState = InitialState & { @@ -21,9 +22,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const networkSettings = await contracts.NetworkSettings.attach(state.NetworkSettings); - if ((await networkSettings.owner()) !== (await signer.getAddress())) return false; - - return true; + if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); } }; export default migration; diff --git a/packages/v3/migration/migrations/2_deploy_network.ts b/packages/v3/migration/migrations/2_deploy_network.ts index ee1c262e9..4644238d8 100644 --- a/packages/v3/migration/migrations/2_deploy_network.ts +++ b/packages/v3/migration/migrations/2_deploy_network.ts @@ -23,8 +23,6 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - return true; - } + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => {} }; export default migration; diff --git a/packages/v3/migration/migrations/3_deploy_vault.ts b/packages/v3/migration/migrations/3_deploy_vault.ts index f4a2413d3..37130840a 100644 --- a/packages/v3/migration/migrations/3_deploy_vault.ts +++ b/packages/v3/migration/migrations/3_deploy_vault.ts @@ -1,4 +1,5 @@ import { NextState as InitialState } from './2_deploy_network'; +import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; import { deployedContract, Migration } from 'migration/engine/types'; export type NextState = InitialState & { @@ -21,9 +22,8 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const bancorVault = await contracts.BancorVault.attach(state.Vault); - if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) return false; - - return true; + if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) + throw new OwnerNotSetOrCorrect(); } }; export default migration; diff --git a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts index cdf507927..75e0e00c7 100644 --- a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts @@ -1,4 +1,5 @@ import { NextState as InitialState } from './3_deploy_vault'; +import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; import { deployedContract, Migration } from 'migration/engine/types'; export type NextState = InitialState & { @@ -23,8 +24,6 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { - return true; - } + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => {} }; export default migration; diff --git a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts index a357fe137..a55c98292 100644 --- a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts @@ -1,4 +1,5 @@ import { NextState as InitialState } from './4_deploy_networkTokenPool'; +import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; import { deployedContract, Migration } from 'migration/engine/types'; export type NextState = InitialState & { @@ -26,9 +27,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.PendingWithdrawals); - if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) return false; - - return true; + if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); } }; export default migration; diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts index 2e7a59f80..d23e24549 100644 --- a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts @@ -1,4 +1,5 @@ import { NextState as InitialState } from './5_deploy_pendingWithdrawals'; +import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; import { deployedContract, Migration } from 'migration/engine/types'; export type NextState = InitialState & { @@ -18,9 +19,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const liquidityPoolCollection = await contracts.LiquidityPoolCollection.attach(state.LiquidityPoolCollection); - if ((await liquidityPoolCollection.owner()) !== (await signer.getAddress())) return false; - - return true; + if ((await liquidityPoolCollection.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); } }; export default migration; diff --git a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts index c58b0b705..7fc8afd0f 100644 --- a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts @@ -1,4 +1,5 @@ import { NextState as InitialState } from './6_deploy_liquidityPoolCollection'; +import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; import { Migration } from 'migration/engine/types'; export type NextState = InitialState; @@ -15,9 +16,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const bancorNetwork = await contracts.BancorNetwork.attach(state.BancorNetwork); - if ((await bancorNetwork.owner()) !== (await signer.getAddress())) return false; - - return true; + if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); } }; export default migration; From 454c0c35a7ab4c40ff3a9d6d94a4915a813f1f97 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 30 Jul 2021 17:37:09 +0200 Subject: [PATCH 029/164] improve code architecture --- packages/v3/hardhat.config.ts | 2 +- packages/v3/migration/README.md | 4 +- packages/v3/migration/engine/Proxy.ts | 36 ------ packages/v3/migration/{ => engine}/config.ts | 0 packages/v3/migration/engine/executions.ts | 45 ++++++-- .../v3/migration/engine/initialization.ts | 63 +++++++++++ packages/v3/migration/engine/logger/logger.ts | 13 +-- packages/v3/migration/engine/task.ts | 59 ---------- packages/v3/migration/engine/tasks/migrate.ts | 28 ++--- .../migration/engine/tasks/migrate_utils.ts | 104 ++++++++++++++++++ .../engine/tasks/subtasks/createMigration.ts | 4 +- packages/v3/migration/engine/types.ts | 10 +- packages/v3/migration/{engine => }/index.ts | 6 +- .../migrations/1_deploy_networkSettings.ts | 4 +- .../migration/migrations/2_deploy_network.ts | 4 +- .../v3/migration/migrations/3_deploy_vault.ts | 4 +- .../migrations/4_deploy_networkTokenPool.ts | 4 +- .../migrations/5_deploy_pendingWithdrawals.ts | 4 +- .../6_deploy_liquidityPoolCollection.ts | 2 +- .../7_deploy_initializeBancorNetwork.ts | 2 +- 20 files changed, 246 insertions(+), 152 deletions(-) delete mode 100644 packages/v3/migration/engine/Proxy.ts rename packages/v3/migration/{ => engine}/config.ts (100%) create mode 100644 packages/v3/migration/engine/initialization.ts delete mode 100644 packages/v3/migration/engine/task.ts create mode 100644 packages/v3/migration/engine/tasks/migrate_utils.ts rename packages/v3/migration/{engine => }/index.ts (84%) diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index bf22d5c97..ec6d492f1 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -1,4 +1,4 @@ -import './migration/engine'; +import './migration'; import { log } from './migration/engine/logger/logger'; import { customChai } from './test/matchers'; import '@nomiclabs/hardhat-ethers'; diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 425f40d78..238616d7a 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -30,13 +30,13 @@ export interface Migration { signer: Signer, contracts: Contracts, initialState: any, - { deploy, execute }: deployExecuteType + { deploy, execute, deployProxy }: executionFunctions ) => Promise<{}>; healthCheck: ( signer: Signer, contracts: Contracts, newState: any, - { deploy, execute }: deployExecuteType + { deploy, execute, deployProxy }: executionFunctions ) => Promise; } ``` diff --git a/packages/v3/migration/engine/Proxy.ts b/packages/v3/migration/engine/Proxy.ts deleted file mode 100644 index d768f804d..000000000 --- a/packages/v3/migration/engine/Proxy.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { deployExecuteType } from './executions'; -import Contracts, { Contract, ContractBuilder } from 'components/Contracts'; -import { BaseContract, ContractFactory } from 'ethers'; -import { ProxyAdmin, TransparentUpgradeableProxy } from 'typechain'; - -export type proxyType = ReturnType; - -export type initializeArgs = Parameters | 'skipInit'; - -export const initProxy = (contracts: typeof Contracts, { deploy }: deployExecuteType) => { - const createTransparentProxy = async ( - admin: BaseContract, - logicContract: BaseContract, - initializeArgs: initializeArgs = [] - ) => { - const data = - initializeArgs === 'skipInit' - ? [] - : logicContract.interface.encodeFunctionData('initialize', initializeArgs); - - return await deploy(contracts.TransparentUpgradeableProxy, logicContract.address, admin.address, data); - }; - - const createProxy = async ( - admin: ProxyAdmin, - logicContractToDeploy: ContractBuilder, - initializeArgs: initializeArgs, - ...ctorArgs: Parameters - ): Promise> => { - const logicContract = await deploy(logicContractToDeploy, ...ctorArgs); - const proxy = await createTransparentProxy(admin, logicContract, initializeArgs); - return await logicContractToDeploy.attach(proxy.address); - }; - - return { createProxy }; -}; diff --git a/packages/v3/migration/config.ts b/packages/v3/migration/engine/config.ts similarity index 100% rename from packages/v3/migration/config.ts rename to packages/v3/migration/engine/config.ts diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index 13d4d6c7f..ed5ebeda4 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -1,13 +1,16 @@ import { ExecutionError } from './errors/errors'; +import { executionSettings } from './initialization'; import { log } from './logger/logger'; -import { executeOverride, executionConfig } from './task'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -import { ContractBuilder, Contract } from 'components/Contracts'; -import { ContractFactory } from 'ethers'; +import Contracts, { ContractBuilder, Contract } from 'components/Contracts'; +import { BaseContract, ContractFactory, Overrides } from 'ethers'; +import { ProxyAdmin } from 'typechain'; -export type deployExecuteType = ReturnType; +export const initExecutionFunctions = (contracts: typeof Contracts, executionSettings: executionSettings) => { + const overrides: Overrides = { + gasPrice: executionSettings.gasPrice + }; -export const initDeployExecute = (executionConfig: executionConfig, overrides: executeOverride) => { const deploy = async ( factory: ContractBuilder, ...args: Parameters['deploy']> @@ -19,7 +22,7 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e log.normal(`Tx: `, contract.deployTransaction.hash); log.greyed(`Waiting to be mined...`); - const receipt = await contract.deployTransaction.wait(executionConfig.confirmationToWait); + const receipt = await contract.deployTransaction.wait(executionSettings.confirmationToWait); if (receipt.status !== 1) { log.error(`Error while executing`); @@ -39,7 +42,7 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e log.normal(executionInstruction); log.normal(`Executing tx: `, tx.hash); - const receipt = await tx.wait(executionConfig.confirmationToWait); + const receipt = await tx.wait(executionSettings.confirmationToWait); if (receipt.status !== 1) { log.error(`Error while executing`); throw new ExecutionError(tx, receipt); @@ -49,8 +52,34 @@ export const initDeployExecute = (executionConfig: executionConfig, overrides: e return receipt; }; + type initializeArgs = Parameters | 'skipInit'; + const deployProxy = async ( + admin: ProxyAdmin, + logicContractToDeploy: ContractBuilder, + initializeArgs: initializeArgs, + ...ctorArgs: Parameters + ): Promise> => { + const createTransparentProxy = async ( + admin: BaseContract, + logicContract: BaseContract, + initializeArgs: initializeArgs = [] + ) => { + const data = + initializeArgs === 'skipInit' + ? [] + : logicContract.interface.encodeFunctionData('initialize', initializeArgs); + + return await deploy(contracts.TransparentUpgradeableProxy, logicContract.address, admin.address, data); + }; + + const logicContract = await deploy(logicContractToDeploy, ...ctorArgs); + const proxy = await createTransparentProxy(admin, logicContract, initializeArgs); + return await logicContractToDeploy.attach(proxy.address); + }; + return { deploy, - execute + execute, + deployProxy }; }; diff --git a/packages/v3/migration/engine/initialization.ts b/packages/v3/migration/engine/initialization.ts new file mode 100644 index 000000000..e0c458f12 --- /dev/null +++ b/packages/v3/migration/engine/initialization.ts @@ -0,0 +1,63 @@ +import { initExecutionFunctions } from './executions'; +import { log } from './logger/logger'; +import { LedgerSigner } from '@ethersproject/hardware-wallets'; +import Contracts from 'components/Contracts'; +import { BigNumberish } from 'ethers'; +import { parseUnits } from 'ethers/lib/utils'; +import { ethers, network } from 'hardhat'; +import { FORK_CONFIG, FORK_PREFIX } from 'hardhat.config'; + +export type defaultMigrationArgs = { + ledger: boolean; + ledgerPath: string; + gasPrice: number; + confirmationToWait: number; +}; + +export type executionSettings = { gasPrice?: BigNumberish; confirmationToWait: number }; + +export const initMigration = async (args: defaultMigrationArgs) => { + // init networking + const networkName = FORK_CONFIG ? FORK_CONFIG.networkName : network.name; + const migrationNetworkConfig = { + isFork: networkName.startsWith(FORK_PREFIX), + originalNetwork: networkName.substring(FORK_PREFIX.length), + networkName: networkName + }; + + // init signer + const signer = args.ledger + ? new LedgerSigner(ethers.provider, 'hid', args.ledgerPath) + : (await ethers.getSigners())[0]; + + // init execution settings + const executionSettings: executionSettings = { + confirmationToWait: args.confirmationToWait + }; + + if (executionSettings.confirmationToWait <= 1 && !migrationNetworkConfig.isFork) { + throw new Error( + `Transaction confirmation should be defined or higher than 1 for ${migrationNetworkConfig.networkName} use. Aborting` + ); + } + + if (!args.gasPrice && !migrationNetworkConfig.isFork) { + throw new Error(`Gas Price shouldn't be equal to 0 for ${migrationNetworkConfig.networkName} use. Aborting`); + } + executionSettings.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); + + // init contracts + const contracts = Contracts.connect(signer); + + // init execution functions + const executionFunctions = initExecutionFunctions(contracts, executionSettings); + + log.migrationConfig(await signer.getAddress(), args.ledger, executionSettings); + + return { + signer, + contracts, + executionSettings, + executionFunctions + }; +}; diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger/logger.ts index 6db09976d..8cbccb850 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger/logger.ts @@ -1,4 +1,4 @@ -import { executeOverride, executionConfig } from '../task'; +import { executionSettings } from '../initialization'; import chalk from 'chalk'; export const palette = { @@ -19,12 +19,7 @@ export const log = { error: (...str: string[]) => console.log(chalk.red(`⛔️ ${str}`)), // Specific logging - migrationConfig: ( - signerAddress: string, - isLedger: boolean, - overrides: executeOverride, - executionConfig: executionConfig - ) => { + migrationConfig: (signerAddress: string, isLedger: boolean, executionSettings: executionSettings) => { palette.yellow(`**********************`); palette.yellow(`** Migration Config **`); palette.yellow(`**********************`); @@ -32,9 +27,9 @@ export const log = { palette.yellow(`Basic info`); palette.white(` Signer: ${signerAddress} ${isLedger ? '(ledger)' : ''}`); palette.yellow(`Overrides:`); - palette.white(` GasPrice: ${overrides.gasPrice} (gwei)`); + palette.white(` GasPrice: ${executionSettings.gasPrice} (gwei)`); palette.yellow(`Execution Config:`); - palette.white(` Confirmation to wait: ${executionConfig.confirmationToWait}`); + palette.white(` Confirmation to wait: ${executionSettings.confirmationToWait}`); palette.yellow(`********************`); } }; diff --git a/packages/v3/migration/engine/task.ts b/packages/v3/migration/engine/task.ts deleted file mode 100644 index 864d63bee..000000000 --- a/packages/v3/migration/engine/task.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { initDeployExecute } from './executions'; -import { log } from './logger/logger'; -import { initProxy } from './proxy'; -import { executionTools } from './types'; -import { LedgerSigner } from '@ethersproject/hardware-wallets'; -import Contracts from 'components/Contracts'; -import { BigNumberish, Signer } from 'ethers'; -import { parseUnits } from 'ethers/lib/utils'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { MIGRATION_CONFIG } from 'migration/config'; - -export type defaultParamTask = { - ledger: boolean; - ledgerPath: string; - gasPrice: number; - confirmationToWait: number; -}; - -export type executeOverride = { gasPrice?: BigNumberish }; -export type executionConfig = { confirmationToWait: number }; - -export const getDefaultParams = async (hre: HardhatRuntimeEnvironment, args: defaultParamTask) => { - const signer = args.ledger - ? new LedgerSigner(hre.ethers.provider, 'hid', args.ledgerPath) - : (await hre.ethers.getSigners())[0]; - - const overrides: executeOverride = {}; - - if (!args.gasPrice && !MIGRATION_CONFIG.isFork) { - throw new Error(`Gas Price shouldn't be equal to 0 for ${MIGRATION_CONFIG.networkName} use. Aborting`); - } - overrides.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); - - let executionConfig: executionConfig = { - confirmationToWait: args.confirmationToWait - }; - - if (executionConfig.confirmationToWait <= 1 && !MIGRATION_CONFIG.isFork) { - throw new Error( - `Transaction confirmation should be defined or higher than 1 for ${MIGRATION_CONFIG.networkName} use. Aborting` - ); - } - - const contracts = Contracts.connect(signer); - - const deployExecute = initDeployExecute(executionConfig, overrides); - const proxy = initProxy(contracts, deployExecute); - - const executionTools: executionTools = { ...deployExecute, ...proxy }; - - log.migrationConfig(await signer.getAddress(), args.ledger, overrides, executionConfig); - return { - signer, - contracts, - overrides, - executionConfig, - executionTools - }; -}; diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/engine/tasks/migrate.ts index bd11209df..d43f668d3 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/engine/tasks/migrate.ts @@ -1,16 +1,16 @@ -import { migrateParamTask } from '..'; -import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../../config'; +import { migrateParamTask } from '../..'; +import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../config'; +import { initMigration } from '../initialization'; import { log } from '../logger/logger'; import { Migration } from '../types'; import { importCsjOrEsModule } from 'components/TaskUtils'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { getDefaultParams } from 'migration/engine/task'; import { SystemState } from 'migration/engine/types'; import path from 'path'; export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { - const { signer, contracts, migrationsData, initialState, writeState, executionTools } = await getMigrateParams( + const { signer, contracts, migrationsData, initialState, writeState, executionFunctions } = await initMigrate( hre, args ); @@ -33,10 +33,10 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => const oldState = currentNetworkState; try { - currentNetworkState = await migration.up(signer, contracts, currentNetworkState, executionTools); + currentNetworkState = await migration.up(signer, contracts, currentNetworkState, executionFunctions); try { - await migration.healthCheck(signer, contracts, currentNetworkState, executionTools); + await migration.healthCheck(signer, contracts, currentNetworkState, executionFunctions); log.success('Health check success ✨ '); } catch (e) { log.error('Health check failed: ' + e); @@ -60,13 +60,13 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => log.done(`Migration(s) complete ⚡️`); }; -export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { - const { signer, contracts, overrides, executionConfig, executionTools } = await getDefaultParams(hre, args); +export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { + const { signer, contracts, executionSettings, executionFunctions } = await initMigration(args); const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); + // If reset, delete all the files in the corresponding network folder if (args.reset) { - // If reset, delete all the files in the corresponding network folder log.info(`Resetting ${NETWORK_NAME} migratation folder`); fs.rmSync(pathToState, { recursive: true, @@ -118,7 +118,7 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig } const initialState = fetchState(pathToState); - // Migration files + // Generate migration files const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); @@ -139,6 +139,7 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig }); } } + // Even if migrations should be automatically sorted by the dir fetching, sort again just in case migrationsData.sort((a, b) => a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 @@ -147,11 +148,10 @@ export const getMigrateParams = async (hre: HardhatRuntimeEnvironment, args: mig return { signer, contracts, + executionFunctions, + executionSettings, initialState, - executionTools, writeState, - migrationsData, - executionConfig, - overrides + migrationsData }; }; diff --git a/packages/v3/migration/engine/tasks/migrate_utils.ts b/packages/v3/migration/engine/tasks/migrate_utils.ts new file mode 100644 index 000000000..72640d3ef --- /dev/null +++ b/packages/v3/migration/engine/tasks/migrate_utils.ts @@ -0,0 +1,104 @@ +import { migrateParamTask } from '../..'; +import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../config'; +import { initMigration } from '../initialization'; +import { log } from '../logger/logger'; +import fs from 'fs'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { SystemState } from 'migration/engine/types'; +import path from 'path'; + +export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { + const { signer, contracts, executionSettings, executionFunctions } = await initMigration(args); + + const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); + + // If reset, delete all the files in the corresponding network folder + if (args.reset) { + log.info(`Resetting ${NETWORK_NAME} migratation folder`); + fs.rmSync(pathToState, { + recursive: true, + force: true + }); + } + + // If network folder doesn't exist, create it + if (!fs.existsSync(pathToState)) { + fs.mkdirSync(pathToState); + } + + // Read all files into the folder and fetch any state file + const pathToStateFolder = fs.readdirSync(pathToState); + const stateFile = pathToStateFolder.find((fileName: string) => fileName === 'state.json'); + + const writeState = async (state: SystemState) => { + fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); + }; + const fetchState = (pathToState: string) => { + return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; + }; + + let state = { + migrationState: { + latestMigration: -1 + }, + networkState: {} + }; + + // If network is a fork fetch info from original network + if (args.reset && MIGRATION_CONFIG.isFork) { + try { + log.info(`Fetching initial state from ${MIGRATION_CONFIG.originalNetwork}`); + state = fetchState( + path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, MIGRATION_CONFIG.originalNetwork) + ); + } catch (e) { + log.error( + `${MIGRATION_CONFIG.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` + ); + process.exit(); + } + } + + // If there is no state file in the network's folder, create an empty one + if (!stateFile) { + writeState(state); + } + const initialState = fetchState(pathToState); + + // Generate migration files + const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); + const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); + const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); + const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); + const migrationsData: { + fullPath: string; + fileName: string; + migrationTimestamp: number; + }[] = []; + for (const migrationFilePath of migrationFilesPath) { + const fileName = path.basename(migrationFilePath); + const migrationId = Number(fileName.split('_')[0]); + if (migrationId > initialState.migrationState.latestMigration) { + migrationsData.push({ + fullPath: migrationFilePath, + fileName: fileName, + migrationTimestamp: migrationId + }); + } + } + + // Even if migrations should be automatically sorted by the dir fetching, sort again just in case + migrationsData.sort((a, b) => + a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 + ); + + return { + signer, + contracts, + executionFunctions, + executionSettings, + initialState, + writeState, + migrationsData + }; +}; diff --git a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts index b5e640784..115ad0e8d 100644 --- a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts +++ b/packages/v3/migration/engine/tasks/subtasks/createMigration.ts @@ -1,7 +1,7 @@ import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { MIGRATION_FOLDER } from 'migration/config'; -import { createMigrationParamTask } from 'migration/engine'; +import { createMigrationParamTask } from 'migration'; +import { MIGRATION_FOLDER } from 'migration/engine/config'; import { log } from 'migration/engine/logger/logger'; import path from 'path'; diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 1b6512a95..ca6715d55 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,5 +1,4 @@ -import { deployExecuteType } from './executions'; -import { proxyType } from './proxy'; +import { initExecutionFunctions } from './executions'; import { Contracts } from 'components/Contracts'; import { Signer } from 'ethers'; @@ -11,22 +10,21 @@ export type SystemState = { }; export type deployedContract = string; - export type deployedProxy = deployedContract; -export type executionTools = deployExecuteType & proxyType; +export type executionFunctions = ReturnType; export interface Migration { up: ( signer: Signer, contracts: Contracts, initialState: any, - { deploy, execute, createProxy }: executionTools + { deploy, execute, deployProxy }: executionFunctions ) => Promise<{}>; healthCheck: ( signer: Signer, contracts: Contracts, newState: any, - { deploy, execute, createProxy }: executionTools + { deploy, execute, deployProxy }: executionFunctions ) => Promise; } diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/index.ts similarity index 84% rename from packages/v3/migration/engine/index.ts rename to packages/v3/migration/index.ts index c22177506..9b83f036d 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/index.ts @@ -1,12 +1,12 @@ -import { lazyAction } from '../../components/TaskUtils'; -import { defaultParamTask } from './task'; +import { lazyAction } from '../components/TaskUtils'; +import { defaultMigrationArgs } from './engine/initialization'; import { task, types } from 'hardhat/config'; import path from 'path'; export const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks'; export const PATH_TO_ENGINE_SUBTASKS_FOLDER = 'migration/engine/tasks/subtasks'; -export type migrateParamTask = defaultParamTask & { +export type migrateParamTask = defaultMigrationArgs & { reset: boolean; }; task('migrate', 'Migrate the network') diff --git a/packages/v3/migration/migrations/1_deploy_networkSettings.ts b/packages/v3/migration/migrations/1_deploy_networkSettings.ts index caf565a90..94fad12b0 100644 --- a/packages/v3/migration/migrations/1_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/1_deploy_networkSettings.ts @@ -7,10 +7,10 @@ export type NextState = InitialState & { }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - const networkSettings = await createProxy(proxyAdmin, contracts.NetworkSettings, []); + const networkSettings = await deployProxy(proxyAdmin, contracts.NetworkSettings, []); return { ...initialState, diff --git a/packages/v3/migration/migrations/2_deploy_network.ts b/packages/v3/migration/migrations/2_deploy_network.ts index 4644238d8..5eb497ee6 100644 --- a/packages/v3/migration/migrations/2_deploy_network.ts +++ b/packages/v3/migration/migrations/2_deploy_network.ts @@ -6,10 +6,10 @@ export type NextState = InitialState & { }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - const bancorNetwork = await createProxy( + const bancorNetwork = await deployProxy( proxyAdmin, contracts.BancorNetwork, 'skipInit', diff --git a/packages/v3/migration/migrations/3_deploy_vault.ts b/packages/v3/migration/migrations/3_deploy_vault.ts index 37130840a..5c72b74b5 100644 --- a/packages/v3/migration/migrations/3_deploy_vault.ts +++ b/packages/v3/migration/migrations/3_deploy_vault.ts @@ -7,10 +7,10 @@ export type NextState = InitialState & { }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - const bancorVault = await createProxy(proxyAdmin, contracts.BancorVault, [], initialState.BNT.token); + const bancorVault = await deployProxy(proxyAdmin, contracts.BancorVault, [], initialState.BNT.token); return { ...initialState, diff --git a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts index 75e0e00c7..1f720b35a 100644 --- a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts @@ -7,10 +7,10 @@ export type NextState = InitialState & { }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - const networkTokenPool = await createProxy( + const networkTokenPool = await deployProxy( proxyAdmin, contracts.NetworkTokenPool, [], diff --git a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts index a55c98292..500f91ecb 100644 --- a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts @@ -7,10 +7,10 @@ export type NextState = InitialState & { }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.ProxyAdmin); - const pendingWithdrawals = await createProxy( + const pendingWithdrawals = await deployProxy( proxyAdmin, contracts.PendingWithdrawals, [], diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts index d23e24549..2b3798fbc 100644 --- a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts @@ -7,7 +7,7 @@ export type NextState = InitialState & { }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { const liquidityPoolCollection = await deploy(contracts.LiquidityPoolCollection, initialState.BancorNetwork); return { ...initialState, diff --git a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts index 7fc8afd0f..1f967855f 100644 --- a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts @@ -5,7 +5,7 @@ import { Migration } from 'migration/engine/types'; export type NextState = InitialState; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, createProxy }): Promise => { + up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { const bancorNetwork = await contracts.BancorNetwork.attach(initialState.BancorNetwork); await execute('Initialize BancorNetwork', bancorNetwork.initialize, initialState.PendingWithdrawals); From 5719a9050dc90a6800d0d88cc6dab3f993733c39 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 30 Jul 2021 17:50:25 +0200 Subject: [PATCH 030/164] re-architecture + put tasks in specific folder outside engine --- .../migration/engine/tasks/migrate_utils.ts | 104 ------------------ packages/v3/migration/index.ts | 7 +- .../subtasks => tasks}/createMigration.ts | 0 .../migration/{engine => }/tasks/migrate.ts | 10 +- 4 files changed, 8 insertions(+), 113 deletions(-) delete mode 100644 packages/v3/migration/engine/tasks/migrate_utils.ts rename packages/v3/migration/{engine/tasks/subtasks => tasks}/createMigration.ts (100%) rename packages/v3/migration/{engine => }/tasks/migrate.ts (96%) diff --git a/packages/v3/migration/engine/tasks/migrate_utils.ts b/packages/v3/migration/engine/tasks/migrate_utils.ts deleted file mode 100644 index 72640d3ef..000000000 --- a/packages/v3/migration/engine/tasks/migrate_utils.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { migrateParamTask } from '../..'; -import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../config'; -import { initMigration } from '../initialization'; -import { log } from '../logger/logger'; -import fs from 'fs'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { SystemState } from 'migration/engine/types'; -import path from 'path'; - -export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { - const { signer, contracts, executionSettings, executionFunctions } = await initMigration(args); - - const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); - - // If reset, delete all the files in the corresponding network folder - if (args.reset) { - log.info(`Resetting ${NETWORK_NAME} migratation folder`); - fs.rmSync(pathToState, { - recursive: true, - force: true - }); - } - - // If network folder doesn't exist, create it - if (!fs.existsSync(pathToState)) { - fs.mkdirSync(pathToState); - } - - // Read all files into the folder and fetch any state file - const pathToStateFolder = fs.readdirSync(pathToState); - const stateFile = pathToStateFolder.find((fileName: string) => fileName === 'state.json'); - - const writeState = async (state: SystemState) => { - fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); - }; - const fetchState = (pathToState: string) => { - return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; - }; - - let state = { - migrationState: { - latestMigration: -1 - }, - networkState: {} - }; - - // If network is a fork fetch info from original network - if (args.reset && MIGRATION_CONFIG.isFork) { - try { - log.info(`Fetching initial state from ${MIGRATION_CONFIG.originalNetwork}`); - state = fetchState( - path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, MIGRATION_CONFIG.originalNetwork) - ); - } catch (e) { - log.error( - `${MIGRATION_CONFIG.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` - ); - process.exit(); - } - } - - // If there is no state file in the network's folder, create an empty one - if (!stateFile) { - writeState(state); - } - const initialState = fetchState(pathToState); - - // Generate migration files - const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); - const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); - const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); - const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); - const migrationsData: { - fullPath: string; - fileName: string; - migrationTimestamp: number; - }[] = []; - for (const migrationFilePath of migrationFilesPath) { - const fileName = path.basename(migrationFilePath); - const migrationId = Number(fileName.split('_')[0]); - if (migrationId > initialState.migrationState.latestMigration) { - migrationsData.push({ - fullPath: migrationFilePath, - fileName: fileName, - migrationTimestamp: migrationId - }); - } - } - - // Even if migrations should be automatically sorted by the dir fetching, sort again just in case - migrationsData.sort((a, b) => - a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 - ); - - return { - signer, - contracts, - executionFunctions, - executionSettings, - initialState, - writeState, - migrationsData - }; -}; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index 9b83f036d..a56dba7b0 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -3,8 +3,7 @@ import { defaultMigrationArgs } from './engine/initialization'; import { task, types } from 'hardhat/config'; import path from 'path'; -export const PATH_TO_ENGINE_TASKS_FOLDER = 'migration/engine/tasks'; -export const PATH_TO_ENGINE_SUBTASKS_FOLDER = 'migration/engine/tasks/subtasks'; +export const PATH_TO_TASKS_FOLDER = 'migration/tasks'; export type migrateParamTask = defaultMigrationArgs & { reset: boolean; @@ -15,11 +14,11 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(lazyAction(path.join(PATH_TO_ENGINE_TASKS_FOLDER, 'migrate.ts'))); + .setAction(lazyAction(path.join(PATH_TO_TASKS_FOLDER, 'migrate.ts'))); export type createMigrationParamTask = { migrationName: string; }; task('create-migration', 'Create a migration file') .addPositionalParam('migrationName', 'Name of the migration name') - .setAction(lazyAction(path.join(PATH_TO_ENGINE_SUBTASKS_FOLDER, 'createMigration.ts'))); + .setAction(lazyAction(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); diff --git a/packages/v3/migration/engine/tasks/subtasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts similarity index 100% rename from packages/v3/migration/engine/tasks/subtasks/createMigration.ts rename to packages/v3/migration/tasks/createMigration.ts diff --git a/packages/v3/migration/engine/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts similarity index 96% rename from packages/v3/migration/engine/tasks/migrate.ts rename to packages/v3/migration/tasks/migrate.ts index d43f668d3..73ef0a302 100644 --- a/packages/v3/migration/engine/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -1,8 +1,8 @@ -import { migrateParamTask } from '../..'; -import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../config'; -import { initMigration } from '../initialization'; -import { log } from '../logger/logger'; -import { Migration } from '../types'; +import { migrateParamTask } from '..'; +import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../engine/config'; +import { initMigration } from '../engine/initialization'; +import { log } from '../engine/logger/logger'; +import { Migration } from '../engine/types'; import { importCsjOrEsModule } from 'components/TaskUtils'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; From 11959ccf3cc31a32c4fd394544086761ce3d0773 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 30 Jul 2021 18:00:29 +0200 Subject: [PATCH 031/164] typos fix --- packages/v3/components/Contracts.ts | 5 ++++- packages/v3/migration/README.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 1949b760f..a744f715e 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -75,7 +75,10 @@ const getContracts = (signer?: Signer) => ({ TestBancorNetwork: deployOrAttach('TestBancorNetwork', signer), TestERC20Token: deployOrAttach('TestERC20Token', signer), TestERC20Burnable: deployOrAttach('TestERC20Burnable', signer), - TestLiquidityPoolCollection: deployOrAttach('TestLiquidityPoolCollection', signer), + TestLiquidityPoolCollection: deployOrAttach( + 'TestLiquidityPoolCollection', + signer + ), TestMathEx: deployOrAttach('TestMathEx', signer), TestOwnedUpgradeable: deployOrAttach('TestOwnedUpgradeable', signer), TestReserveToken: deployOrAttach('TestReserveToken', signer), diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 238616d7a..b69ddb335 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -20,7 +20,7 @@ In each network folder there is a `state.json` file. It represents the migration ## Migrations -The `migration` folder is home for all migrations file. +The `migrations` folder is home for all migrations file. A migration file is a typescript file that expose a particular object respecting a strict interface: From 7e3b068d3ecd8e138d7d839c3522ab0df9543bec Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 30 Jul 2021 18:21:14 +0200 Subject: [PATCH 032/164] Add down to migration --- packages/v3/migration/engine/types.ts | 7 +++++++ .../v3/migration/migrations/0_deploy_proxyAdmin.ts | 10 ++++++++++ .../migration/migrations/1_deploy_networkSettings.ts | 10 ++++++++++ packages/v3/migration/migrations/2_deploy_network.ts | 12 +++++++++++- packages/v3/migration/migrations/3_deploy_vault.ts | 10 ++++++++++ .../migrations/4_deploy_networkTokenPool.ts | 12 +++++++++++- .../migrations/5_deploy_pendingWithdrawals.ts | 10 ++++++++++ .../migrations/6_deploy_liquidityPoolCollection.ts | 10 ++++++++++ .../migrations/7_deploy_initializeBancorNetwork.ts | 10 ++++++++++ 9 files changed, 89 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index ca6715d55..4ea0faa87 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -27,4 +27,11 @@ export interface Migration { newState: any, { deploy, execute, deployProxy }: executionFunctions ) => Promise; + down: ( + signer: Signer, + contracts: Contracts, + initialState: any, + newState: any, + { deploy, execute, deployProxy }: executionFunctions + ) => Promise<{}>; } diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts index e18f44a34..996c1512e 100644 --- a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts @@ -25,6 +25,16 @@ const migration: Migration = { const proxyAdmin = await contracts.ProxyAdmin.attach(state.ProxyAdmin); if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + }, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; } }; export default migration; diff --git a/packages/v3/migration/migrations/1_deploy_networkSettings.ts b/packages/v3/migration/migrations/1_deploy_networkSettings.ts index 94fad12b0..a2ef5e33c 100644 --- a/packages/v3/migration/migrations/1_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/1_deploy_networkSettings.ts @@ -23,6 +23,16 @@ const migration: Migration = { const networkSettings = await contracts.NetworkSettings.attach(state.NetworkSettings); if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + }, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; } }; export default migration; diff --git a/packages/v3/migration/migrations/2_deploy_network.ts b/packages/v3/migration/migrations/2_deploy_network.ts index 5eb497ee6..c5101c26f 100644 --- a/packages/v3/migration/migrations/2_deploy_network.ts +++ b/packages/v3/migration/migrations/2_deploy_network.ts @@ -23,6 +23,16 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => {} + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => {}, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; + } }; export default migration; diff --git a/packages/v3/migration/migrations/3_deploy_vault.ts b/packages/v3/migration/migrations/3_deploy_vault.ts index 5c72b74b5..d693cbaa0 100644 --- a/packages/v3/migration/migrations/3_deploy_vault.ts +++ b/packages/v3/migration/migrations/3_deploy_vault.ts @@ -24,6 +24,16 @@ const migration: Migration = { if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) throw new OwnerNotSetOrCorrect(); + }, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; } }; export default migration; diff --git a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts index 1f720b35a..c55dd9d07 100644 --- a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts @@ -24,6 +24,16 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => {} + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => {}, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; + } }; export default migration; diff --git a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts index 500f91ecb..b8ffb3097 100644 --- a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts @@ -28,6 +28,16 @@ const migration: Migration = { const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.PendingWithdrawals); if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + }, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; } }; export default migration; diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts index 2b3798fbc..a15ffa370 100644 --- a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts @@ -20,6 +20,16 @@ const migration: Migration = { const liquidityPoolCollection = await contracts.LiquidityPoolCollection.attach(state.LiquidityPoolCollection); if ((await liquidityPoolCollection.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + }, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; } }; export default migration; diff --git a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts index 1f967855f..d679457ea 100644 --- a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts @@ -17,6 +17,16 @@ const migration: Migration = { const bancorNetwork = await contracts.BancorNetwork.attach(state.BancorNetwork); if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + }, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; } }; export default migration; From f80df8013f7d93fed01e84daf4e7cd41a3d337b9 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 30 Jul 2021 19:00:42 +0200 Subject: [PATCH 033/164] few updates --- packages/v3/migration/tasks/migrate.ts | 44 +++++++++++++++----------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index 73ef0a302..6cb8148a6 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -15,7 +15,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => args ); - let state = initialState; + let currentState = initialState; // if there is no migration to run, exit if (migrationsData.length === 0) { @@ -23,43 +23,53 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => return; } - let currentNetworkState: any = state.networkState; - for (const migrationData of migrationsData) { + for (let index = 0; index < migrationsData.length; index++) { + const migrationData = migrationsData[index]; + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); // Save oldState - const oldState = currentNetworkState; - + const oldState = currentState; try { - currentNetworkState = await migration.up(signer, contracts, currentNetworkState, executionFunctions); + currentState.networkState = await migration.up( + signer, + contracts, + currentState.networkState, + executionFunctions + ); try { - await migration.healthCheck(signer, contracts, currentNetworkState, executionFunctions); + await migration.healthCheck(signer, contracts, currentState.networkState, executionFunctions); log.success('Health check success ✨ '); } catch (e) { log.error('Health check failed: ' + e); - // @TODO revert the migration here + // @TODO revert process here return; } // if health check passed, update the state and write it to the system - state = { + currentState = { migrationState: { latestMigration: migrationData.migrationTimestamp }, - networkState: currentNetworkState + networkState: currentState.networkState }; - writeState(state); + writeState(currentState); } catch (e) { - log.error('Migration execution failed'); - log.error(e); - // @TODO revert the migration here + log.error('Migration execution failed: ' + e); + log.error('Aborting ...'); return; } } + log.done(`Migration(s) complete ⚡️`); }; +type migrationData = { + fullPath: string; + fileName: string; + migrationTimestamp: number; +}; export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { const { signer, contracts, executionSettings, executionFunctions } = await initMigration(args); @@ -123,11 +133,7 @@ export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateP const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); - const migrationsData: { - fullPath: string; - fileName: string; - migrationTimestamp: number; - }[] = []; + const migrationsData: migrationData[] = []; for (const migrationFilePath of migrationFilesPath) { const fileName = path.basename(migrationFilePath); const migrationId = Number(fileName.split('_')[0]); From 831f67a025bdd98014ca0a5029ab66b5010976c9 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Sun, 8 Aug 2021 18:38:33 +0200 Subject: [PATCH 034/164] update yarn.lock --- yarn.lock | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yarn.lock b/yarn.lock index efa3b77b9..d45fbe272 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1810,6 +1810,11 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.4.1-solc-0.7-2.tgz#8d46f2310560d3756bd5235e20f4e50caa947e92" integrity sha512-hGbNTTlkcsRhMdJ+IMAWKn5uI1IK9yvJamZpQou1aOjgr+VOFo7eqdiqs+Dwv8fGzN7L/Wdg4XqiW3vGqTHk3g== +"@openzeppelin/contracts@3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.2.0.tgz#3e6b3a7662d8ed64271ade96ef42655db983fd9d" + integrity sha512-bUOmkSoPkjnUyMiKo6RYnb0VHBk5D9KKDAgNLzF41aqAM3TeE0yGdFF5dVRcV60pZdJLlyFT/jjXIZCWyyEzAQ== + "@openzeppelin/contracts@3.4.0": version "3.4.0" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.0.tgz#9a1669ad5f9fdfb6e273bb5a4fed10cb4cc35eb0" From 602cfb39bb71b9f81af6a6df9b7467ab71aae871 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Sun, 8 Aug 2021 18:51:11 +0200 Subject: [PATCH 035/164] WIP: fix errors due to typechain --- packages/v3/package.json | 2 +- packages/v3/tsconfig.json | 5 ++++- yarn.lock | 7 +++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/v3/package.json b/packages/v3/package.json index 9a989c2f9..a46b5c15d 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -50,7 +50,7 @@ "@openzeppelin/contracts-upgradeable": "3.4.1-solc-0.7-2", "@trivago/prettier-plugin-sort-imports": "^2.0.2", "@typechain/ethers-v5": "^7.0.1", - "@typechain/hardhat": "^2.2.0", + "@typechain/hardhat": "2.3.0", "@types/chai": "^4.2.21", "@types/mocha": "^9.0.0", "@types/node": "^16.4.10", diff --git a/packages/v3/tsconfig.json b/packages/v3/tsconfig.json index 9faf62fdc..682720bd5 100644 --- a/packages/v3/tsconfig.json +++ b/packages/v3/tsconfig.json @@ -1,7 +1,10 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "baseUrl": "./" + "baseUrl": "./", + "paths": { + "*": ["node_modules/*"] + } }, "include": ["./test", "./tasks", "./components", "./migration"], "files": ["./hardhat.config.ts"] diff --git a/yarn.lock b/yarn.lock index d45fbe272..16ad6da80 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2356,6 +2356,13 @@ resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-7.0.1.tgz#f9ae60ae5bd9e8ea8a996f66244147e8e74034ae" integrity sha512-mXEJ7LG0pOYO+MRPkHtbf30Ey9X2KAsU0wkeoVvjQIn7iAY6tB3k3s+82bbmJAUMyENbQ04RDOZit36CgSG6Gg== +"@typechain/hardhat@2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-2.3.0.tgz#dc7f29281637b38b77c7c046ae82700703395d0f" + integrity sha512-zERrtNol86L4DX60ktnXxP7Cq8rSZHPaQvsChyiQQVuvVs2FTLm24Yi+MYnfsIdbUBIXZG7SxDWhtCF5I0tJNQ== + dependencies: + fs-extra "^9.1.0" + "@typechain/hardhat@^2.2.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-2.2.0.tgz#a3e99b49c215c364c375c554bdce626bb21ecc47" From 7b1a041776179ab51e2ab28cadd9098e3ede8ecc Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 10 Aug 2021 14:06:00 +0200 Subject: [PATCH 036/164] add deploy basics contracts migration + update mainnet state + add tokenGovernance + add Contracts capability to have external contracts fully typed --- packages/v3/components/Contracts.ts | 45 +- packages/v3/migration/data/mainnet/state.json | 2 +- packages/v3/migration/engine/config.ts | 2 +- packages/v3/migration/engine/executions.ts | 4 +- .../v3/migration/engine/initialization.ts | 11 +- packages/v3/migration/engine/types.ts | 2 +- .../migration/migrations/0_deploy_basics.ts | 64 ++ ...y_proxyAdmin.ts => 1_deploy_proxyAdmin.ts} | 10 +- ...ettings.ts => 2_deploy_networkSettings.ts} | 6 +- ..._deploy_network.ts => 3_deploy_network.ts} | 4 +- .../{3_deploy_vault.ts => 4_deploy_vault.ts} | 6 +- ...enPool.ts => 5_deploy_networkTokenPool.ts} | 6 +- ...wals.ts => 6_deploy_pendingWithdrawals.ts} | 6 +- ...ts => 7_deploy_liquidityPoolCollection.ts} | 6 +- ...ts => 8_deploy_initializeBancorNetwork.ts} | 6 +- .../v3/migration/tasks/createMigration.ts | 6 +- packages/v3/migration/tasks/migrate.ts | 4 +- packages/v3/package.json | 4 +- yarn.lock | 844 +++++++++--------- 19 files changed, 589 insertions(+), 449 deletions(-) create mode 100644 packages/v3/migration/migrations/0_deploy_basics.ts rename packages/v3/migration/migrations/{0_deploy_proxyAdmin.ts => 1_deploy_proxyAdmin.ts} (74%) rename packages/v3/migration/migrations/{1_deploy_networkSettings.ts => 2_deploy_networkSettings.ts} (84%) rename packages/v3/migration/migrations/{2_deploy_network.ts => 3_deploy_network.ts} (88%) rename packages/v3/migration/migrations/{3_deploy_vault.ts => 4_deploy_vault.ts} (84%) rename packages/v3/migration/migrations/{4_deploy_networkTokenPool.ts => 5_deploy_networkTokenPool.ts} (90%) rename packages/v3/migration/migrations/{5_deploy_pendingWithdrawals.ts => 6_deploy_pendingWithdrawals.ts} (85%) rename packages/v3/migration/migrations/{6_deploy_liquidityPoolCollection.ts => 7_deploy_liquidityPoolCollection.ts} (83%) rename packages/v3/migration/migrations/{7_deploy_initializeBancorNetwork.ts => 8_deploy_initializeBancorNetwork.ts} (84%) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index a54e85979..8ed77ea36 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -1,6 +1,3 @@ -import { Signer } from '@ethersproject/abstract-signer'; -import { ContractFactory } from '@ethersproject/contracts'; -import { ethers } from 'hardhat'; import { BancorNetwork__factory, BancorVault__factory, @@ -24,6 +21,10 @@ import { TokenHolderUpgradeable__factory, TransparentUpgradeableProxy__factory } from '../typechain'; +import { TokenGovernance__factory } from '@bancor/token-governance/typechain'; +import { Signer } from '@ethersproject/abstract-signer'; +import { ContractFactory } from '@ethersproject/contracts'; +import { ethers } from 'hardhat'; type AsyncReturnType any> = T extends (...args: any) => Promise ? U @@ -49,7 +50,7 @@ const deployOrAttach = (contractName: string, passedS ...(args || []) ) as Contract; }, - attach: attachOnly(contractName).attach + attach: attachOnly(contractName, passedSigner).attach }; }; @@ -62,6 +63,37 @@ const attachOnly = (contractName: string, passedSigne }; }; +const deployOrAttachExternal = ( + contractName: string, + // @TODO: needs to replace with correctly typed params but it doesn't work properly for some reason https://github.com/microsoft/TypeScript/issues/31278 + factoryConstructor: { new (signer?: Signer): F }, + passedSigner?: Signer +): ContractBuilder => { + // const factory = new factoryConstructor(passedSigner); + + return { + contractName, + deploy: async (...args: Parameters): Promise> => { + let defaultSigner = passedSigner ? passedSigner : (await ethers.getSigners())[0]; + + return new factoryConstructor(defaultSigner).deploy(...(args || [])) as Contract; + }, + attach: attachOnlyExternal(factoryConstructor, passedSigner).attach + }; +}; + +const attachOnlyExternal = ( + factoryConstructor: { new (signer?: Signer): F }, + passedSigner?: Signer +) => { + return { + attach: async (address: string, signer?: Signer): Promise> => { + let defaultSigner = passedSigner ? passedSigner : (await ethers.getSigners())[0]; + return new factoryConstructor(signer || defaultSigner).attach(address) as Contract; + } + }; +}; + const getContracts = (signer?: Signer) => ({ connect: (signer: Signer) => getContracts(signer), @@ -88,7 +120,10 @@ const getContracts = (signer?: Signer) => ({ TransparentUpgradeableProxy: deployOrAttach( 'TransparentUpgradeableProxy', signer - ) + ), + + // external contracts + TokenGovernance: deployOrAttachExternal('TokenGovernance', TokenGovernance__factory, signer) }); export type Contracts = ReturnType; diff --git a/packages/v3/migration/data/mainnet/state.json b/packages/v3/migration/data/mainnet/state.json index b5061ee03..e368a4322 100644 --- a/packages/v3/migration/data/mainnet/state.json +++ b/packages/v3/migration/data/mainnet/state.json @@ -1,6 +1,6 @@ { "migrationState": { - "latestMigration": -1 + "latestMigration": 0 }, "networkState": { "BNT": { diff --git a/packages/v3/migration/engine/config.ts b/packages/v3/migration/engine/config.ts index 74fc87369..890dd8def 100644 --- a/packages/v3/migration/engine/config.ts +++ b/packages/v3/migration/engine/config.ts @@ -1,5 +1,5 @@ +import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.config'; import { network } from 'hardhat'; -import { FORK_CONFIG, FORK_PREFIX } from 'hardhat.config'; export const MIGRATION_FOLDER = 'migration/migrations'; export const MIGRATION_DATA_FOLDER = 'migration/data'; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index ed5ebeda4..c0e755e8b 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -1,10 +1,10 @@ +import Contracts, { ContractBuilder, Contract } from '../../components/Contracts'; +import { ProxyAdmin } from '../../typechain'; import { ExecutionError } from './errors/errors'; import { executionSettings } from './initialization'; import { log } from './logger/logger'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -import Contracts, { ContractBuilder, Contract } from 'components/Contracts'; import { BaseContract, ContractFactory, Overrides } from 'ethers'; -import { ProxyAdmin } from 'typechain'; export const initExecutionFunctions = (contracts: typeof Contracts, executionSettings: executionSettings) => { const overrides: Overrides = { diff --git a/packages/v3/migration/engine/initialization.ts b/packages/v3/migration/engine/initialization.ts index e0c458f12..072f088e2 100644 --- a/packages/v3/migration/engine/initialization.ts +++ b/packages/v3/migration/engine/initialization.ts @@ -1,11 +1,11 @@ +import Contracts from '../../components/Contracts'; +import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.config'; import { initExecutionFunctions } from './executions'; import { log } from './logger/logger'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; -import Contracts from 'components/Contracts'; import { BigNumberish } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; import { ethers, network } from 'hardhat'; -import { FORK_CONFIG, FORK_PREFIX } from 'hardhat.config'; export type defaultMigrationArgs = { ledger: boolean; @@ -35,13 +35,16 @@ export const initMigration = async (args: defaultMigrationArgs) => { confirmationToWait: args.confirmationToWait }; - if (executionSettings.confirmationToWait <= 1 && !migrationNetworkConfig.isFork) { + if ( + executionSettings.confirmationToWait <= 1 && + !(migrationNetworkConfig.isFork || migrationNetworkConfig.networkName === 'hardhat') + ) { throw new Error( `Transaction confirmation should be defined or higher than 1 for ${migrationNetworkConfig.networkName} use. Aborting` ); } - if (!args.gasPrice && !migrationNetworkConfig.isFork) { + if (!args.gasPrice && !(migrationNetworkConfig.isFork || migrationNetworkConfig.networkName === 'hardhat')) { throw new Error(`Gas Price shouldn't be equal to 0 for ${migrationNetworkConfig.networkName} use. Aborting`); } executionSettings.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 4ea0faa87..e417bbfcf 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,5 +1,5 @@ +import { Contracts } from '../../components/Contracts'; import { initExecutionFunctions } from './executions'; -import { Contracts } from 'components/Contracts'; import { Signer } from 'ethers'; export type SystemState = { diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts new file mode 100644 index 000000000..d3e179523 --- /dev/null +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -0,0 +1,64 @@ +import { OwnerNotSetOrCorrect } from '../../migration/engine/errors/errors'; +import { deployedContract, Migration } from '../../migration/engine/types'; + +export type InitialState = {}; + +export type NextState = InitialState & { + BNT: { token: deployedContract; governance: deployedContract }; + vBNT: { token: deployedContract; governance: deployedContract }; +}; + +const migration: Migration = { + up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + const BNTToken = await deploy( + contracts.TestERC20Token, + 'Bancor Network Token', + 'BNT', + '100000000000000000000000000' + ); + + const vBNTToken = await deploy( + contracts.TestERC20Token, + 'Bancor Governance Token', + 'vBNT', + '100000000000000000000000000' + ); + + const BNTGovernance = await deploy(contracts.TokenGovernance, BNTToken.address); + const vBNTGovernance = await deploy(contracts.TokenGovernance, vBNTToken.address); + + return { + ...initialState, + + BNT: { + token: BNTToken.address, + governance: BNTGovernance.address + }, + vBNT: { + token: vBNTToken.address, + governance: vBNTGovernance.address + } + }; + }, + + healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); + const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); + + if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) + throw new OwnerNotSetOrCorrect(); + if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) + throw new OwnerNotSetOrCorrect(); + }, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts similarity index 74% rename from packages/v3/migration/migrations/0_deploy_proxyAdmin.ts rename to packages/v3/migration/migrations/1_deploy_proxyAdmin.ts index 1225c17d3..c0e3551ae 100644 --- a/packages/v3/migration/migrations/0_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts @@ -1,10 +1,6 @@ -import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; -import { deployedContract, Migration } from 'migration/engine/types'; - -export type InitialState = { - BNT: { token: deployedContract; governance: deployedContract }; - vBNT: { token: deployedContract; governance: deployedContract }; -}; +import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { deployedContract, Migration } from '../engine/types'; +import { NextState as InitialState } from './0_deploy_basics'; export type NextState = InitialState & { proxyAdmin: deployedContract; diff --git a/packages/v3/migration/migrations/1_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts similarity index 84% rename from packages/v3/migration/migrations/1_deploy_networkSettings.ts rename to packages/v3/migration/migrations/2_deploy_networkSettings.ts index d243a5683..44d104923 100644 --- a/packages/v3/migration/migrations/1_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -1,6 +1,6 @@ -import { NextState as InitialState } from './0_deploy_proxyAdmin'; -import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; -import { deployedContract, Migration } from 'migration/engine/types'; +import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { deployedContract, Migration } from '../engine/types'; +import { NextState as InitialState } from './1_deploy_proxyAdmin'; export type NextState = InitialState & { networkSettings: deployedContract; diff --git a/packages/v3/migration/migrations/2_deploy_network.ts b/packages/v3/migration/migrations/3_deploy_network.ts similarity index 88% rename from packages/v3/migration/migrations/2_deploy_network.ts rename to packages/v3/migration/migrations/3_deploy_network.ts index 47f2b1a2a..96b19c301 100644 --- a/packages/v3/migration/migrations/2_deploy_network.ts +++ b/packages/v3/migration/migrations/3_deploy_network.ts @@ -1,5 +1,5 @@ -import { NextState as InitialState } from './1_deploy_networkSettings'; -import { deployedContract, Migration } from 'migration/engine/types'; +import { deployedContract, Migration } from '../engine/types'; +import { NextState as InitialState } from './2_deploy_networkSettings'; export type NextState = InitialState & { bancorNetwork: deployedContract; diff --git a/packages/v3/migration/migrations/3_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts similarity index 84% rename from packages/v3/migration/migrations/3_deploy_vault.ts rename to packages/v3/migration/migrations/4_deploy_vault.ts index 2ea736578..7c652ffb4 100644 --- a/packages/v3/migration/migrations/3_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -1,6 +1,6 @@ -import { NextState as InitialState } from './2_deploy_network'; -import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; -import { deployedContract, Migration } from 'migration/engine/types'; +import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { deployedContract, Migration } from '../engine/types'; +import { NextState as InitialState } from './3_deploy_network'; export type NextState = InitialState & { vault: deployedContract; diff --git a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts similarity index 90% rename from packages/v3/migration/migrations/4_deploy_networkTokenPool.ts rename to packages/v3/migration/migrations/5_deploy_networkTokenPool.ts index 23f023b13..ecc529474 100644 --- a/packages/v3/migration/migrations/4_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts @@ -1,6 +1,6 @@ -import { NextState as InitialState } from './3_deploy_vault'; -import { deployedContract, Migration } from 'migration/engine/types'; -import { NETWORK_TOKEN_POOL_TOKEN_NAME, NETWORK_TOKEN_POOL_TOKEN_SYMBOL } from 'test/helpers/Constants'; +import { NETWORK_TOKEN_POOL_TOKEN_NAME, NETWORK_TOKEN_POOL_TOKEN_SYMBOL } from '../../test/helpers/Constants'; +import { deployedContract, Migration } from '../engine/types'; +import { NextState as InitialState } from './4_deploy_vault'; export type NextState = InitialState & { networkTokenPool: deployedContract; diff --git a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts similarity index 85% rename from packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts rename to packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index dc1defefb..32385f35e 100644 --- a/packages/v3/migration/migrations/5_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -1,6 +1,6 @@ -import { NextState as InitialState } from './4_deploy_networkTokenPool'; -import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; -import { deployedContract, Migration } from 'migration/engine/types'; +import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { deployedContract, Migration } from '../engine/types'; +import { NextState as InitialState } from './5_deploy_networkTokenPool'; export type NextState = InitialState & { pendingWithdrawals: deployedContract; diff --git a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts similarity index 83% rename from packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts rename to packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index b1bf0c210..11d32da34 100644 --- a/packages/v3/migration/migrations/6_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -1,6 +1,6 @@ -import { NextState as InitialState } from './5_deploy_pendingWithdrawals'; -import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; -import { deployedContract, Migration } from 'migration/engine/types'; +import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { deployedContract, Migration } from '../engine/types'; +import { NextState as InitialState } from './6_deploy_pendingWithdrawals'; export type NextState = InitialState & { poolCollection: deployedContract; diff --git a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts similarity index 84% rename from packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts rename to packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index 5d73d2298..a228062ef 100644 --- a/packages/v3/migration/migrations/7_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -1,6 +1,6 @@ -import { NextState as InitialState } from './6_deploy_liquidityPoolCollection'; -import { OwnerNotSetOrCorrect } from 'migration/engine/errors/errors'; -import { Migration } from 'migration/engine/types'; +import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { Migration } from '../engine/types'; +import { NextState as InitialState } from './7_deploy_liquidityPoolCollection'; export type NextState = InitialState; diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts index 115ad0e8d..01dffc884 100644 --- a/packages/v3/migration/tasks/createMigration.ts +++ b/packages/v3/migration/tasks/createMigration.ts @@ -1,8 +1,8 @@ +import { createMigrationParamTask } from '../../migration'; +import { MIGRATION_FOLDER } from '../../migration/engine/config'; +import { log } from '../../migration/engine/logger/logger'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { createMigrationParamTask } from 'migration'; -import { MIGRATION_FOLDER } from 'migration/engine/config'; -import { log } from 'migration/engine/logger/logger'; import path from 'path'; export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index 6cb8148a6..ff4fabef1 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -1,12 +1,12 @@ import { migrateParamTask } from '..'; +import { importCsjOrEsModule } from '../../components/TaskUtils'; +import { SystemState } from '../../migration/engine/types'; import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../engine/config'; import { initMigration } from '../engine/initialization'; import { log } from '../engine/logger/logger'; import { Migration } from '../engine/types'; -import { importCsjOrEsModule } from 'components/TaskUtils'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { SystemState } from 'migration/engine/types'; import path from 'path'; export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { diff --git a/packages/v3/package.json b/packages/v3/package.json index 8e1c26c36..453f98e7c 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -41,7 +41,7 @@ "hardhat": "2.5.0" }, "devDependencies": { - "@bancor/token-governance": "bancorprotocol/token-governance", + "@bancor/token-governance": "^0.1.1", "@ethersproject/hardware-wallets": "^5.4.0", "@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-etherscan": "^2.1.4", @@ -60,7 +60,7 @@ "eth-sig-util": "^3.0.1", "ethereum-waffle": "^3.4.0", "ethereumjs-util": "^7.1.0", - "ethers": "^5.4.3", + "ethers": "^5.4.4", "hardhat-abi-exporter": "^2.2.1", "hardhat-contract-sizer": "^2.0.3", "hardhat-dependency-compiler": "^1.1.1", diff --git a/yarn.lock b/yarn.lock index e46a10ef0..c05b86474 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,10 +23,10 @@ dependencies: "@babel/highlight" "^7.14.5" -"@babel/compat-data@^7.14.5": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.9.tgz#ac7996ceaafcf8f410119c8af0d1db4cf914a210" - integrity sha512-p3QjZmMGHDGdpcwEYYWu7i7oJShJvtgMjJeb0W95PPhSm++3lm8YXYOh45Y6iCN9PkZLTZ7CIX5nFrp7pw7TXw== +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== "@babel/core@7.13.10": version "7.13.10" @@ -59,21 +59,21 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.13.0", "@babel/generator@^7.13.9", "@babel/generator@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.9.tgz#23b19c597d38b4f7dc2e3fe42a69c88d9ecfaa16" - integrity sha512-4yoHbhDYzFa0GLfCzLp5GxH7vPPMAHdZjyE7M/OajM9037zhx0rf+iNsJwp4PT0MSFpwjG7BsHEbPkBQpZ6cYA== +"@babel/generator@^7.13.0", "@babel/generator@^7.13.9", "@babel/generator@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15" + integrity sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ== dependencies: - "@babel/types" "^7.14.9" + "@babel/types" "^7.15.0" jsesc "^2.5.1" source-map "^0.5.0" "@babel/helper-compilation-targets@^7.13.10": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz#7a99c5d0967911e972fe2c3411f7d5b498498ecf" - integrity sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw== + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818" + integrity sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A== dependencies: - "@babel/compat-data" "^7.14.5" + "@babel/compat-data" "^7.15.0" "@babel/helper-validator-option" "^7.14.5" browserslist "^4.16.6" semver "^6.3.0" @@ -101,12 +101,12 @@ dependencies: "@babel/types" "^7.14.5" -"@babel/helper-member-expression-to-functions@^7.14.5": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.7.tgz#97e56244beb94211fe277bd818e3a329c66f7970" - integrity sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA== +"@babel/helper-member-expression-to-functions@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b" + integrity sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.15.0" "@babel/helper-module-imports@^7.14.5": version "7.14.5" @@ -116,18 +116,18 @@ "@babel/types" "^7.14.5" "@babel/helper-module-transforms@^7.13.0": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.8.tgz#d4279f7e3fd5f4d5d342d833af36d4dd87d7dc49" - integrity sha512-RyE+NFOjXn5A9YU1dkpeBaduagTlZ0+fccnIcAGbv1KGUlReBj7utF7oEth8IdIBQPcux0DDgW5MFBH2xu9KcA== + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08" + integrity sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg== dependencies: "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.0" "@babel/helper-simple-access" "^7.14.8" "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/helper-validator-identifier" "^7.14.8" + "@babel/helper-validator-identifier" "^7.14.9" "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.8" - "@babel/types" "^7.14.8" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" "@babel/helper-optimise-call-expression@^7.14.5": version "7.14.5" @@ -136,15 +136,15 @@ dependencies: "@babel/types" "^7.14.5" -"@babel/helper-replace-supers@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz#0ecc0b03c41cd567b4024ea016134c28414abb94" - integrity sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow== +"@babel/helper-replace-supers@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4" + integrity sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA== dependencies: - "@babel/helper-member-expression-to-functions" "^7.14.5" + "@babel/helper-member-expression-to-functions" "^7.15.0" "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" "@babel/helper-simple-access@^7.14.8": version "7.14.8" @@ -160,7 +160,7 @@ dependencies: "@babel/types" "^7.14.5" -"@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.8", "@babel/helper-validator-identifier@^7.14.9": +"@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": version "7.14.9" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== @@ -193,10 +193,10 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.10.tgz#8f8f9bf7b3afa3eabd061f7a5bcdf4fec3c48409" integrity sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ== -"@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.14.5", "@babel/parser@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.9.tgz#596c1ad67608070058ebf8df50c1eaf65db895a4" - integrity sha512-RdUTOseXJ8POjjOeEBEvNMIZU/nm4yu2rufRkcibzkkg7DmQvXU8v3M4Xk9G7uuI86CDGkKcuDWgioqZm+mScQ== +"@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.14.5", "@babel/parser@^7.15.0": + version "7.15.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.2.tgz#08d4ffcf90d211bf77e7cc7154c6f02d468d2b1d" + integrity sha512-bMJXql1Ss8lFnvr11TZDH4ArtwlAS5NG9qBmdiFW2UHHm6MVoR+GDc5XE2b9K938cyjc9O6/+vjjcffLDtfuDg== "@babel/template@^7.12.13", "@babel/template@^7.14.5": version "7.14.5" @@ -222,18 +222,18 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.14.8": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.9.tgz#016126b331210bf06fff29d52971eef8383e556f" - integrity sha512-bldh6dtB49L8q9bUyB7bC20UKgU+EFDwKJylwl234Kv+ySZeMD31Xeht6URyueQ6LrRRpF2tmkfcZooZR9/e8g== +"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.8", "@babel/traverse@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.0.tgz#4cca838fd1b2a03283c1f38e141f639d60b3fc98" + integrity sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw== dependencies: "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.14.9" + "@babel/generator" "^7.15.0" "@babel/helper-function-name" "^7.14.5" "@babel/helper-hoist-variables" "^7.14.5" "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/parser" "^7.14.9" - "@babel/types" "^7.14.9" + "@babel/parser" "^7.15.0" + "@babel/types" "^7.15.0" debug "^4.1.0" globals "^11.1.0" @@ -246,19 +246,34 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@babel/types@^7.13.0", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.9.tgz#f2b19c3f2f77c5708d67fe8f6046e9cea2b5036d" - integrity sha512-u0bLTnv3DFHeaQLYzb7oRJ1JHr1sv/SYDM7JSqHFFLwXG1wTZRughxFI5NCP8qBEo1rVVsn7Yg2Lvw49nne/Ow== +"@babel/types@^7.13.0", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" + integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== dependencies: "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" +"@bancor/token-governance@^0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.1.tgz#6bb04050774bc225058c5956b5c895a13d4f6a67" + integrity sha512-/tScBoOF98BtCCXwe0xrjaITDQxaoC4cLuuT+ic33B3dIB0T4/Ezz9/qcgvbM8qirNQr4rfBLxwgH/eSZmupOw== + "@bancor/token-governance@bancorprotocol/token-governance": - version "0.1.0" - resolved "https://codeload.github.com/bancorprotocol/token-governance/tar.gz/72c40f70149cbd4b294556ee253bb0afd9620098" + version "0.1.1" + resolved "https://codeload.github.com/bancorprotocol/token-governance/tar.gz/e32d79c9a5b1c225b71c25932e8b20ba2ee9c36d" + +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.6.1.tgz#118511f316e2e87ee4294761868e254d3da47960" + integrity sha512-DX3Z+T5dt1ockmPdobJS/FAsQPW4V4SrWEhD2iYQT2Cb2tQsiMnYxrcUH9By/Z3B+v0S5LMBkQtV/XOBbpLEOg== dependencies: - "@openzeppelin/contracts" "3.2.0" + "@cspotcode/source-map-consumer" "0.8.0" "@deepcode/dcignore@^1.0.2": version "1.0.2" @@ -401,9 +416,9 @@ ethereumjs-util "^7.1.0" "@ethereumjs/vm@^5.5.0": - version "5.5.1" - resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.5.1.tgz#77e64a0b3fa2b25139388410fea2c038dddb32eb" - integrity sha512-Qo4jiDQFKRUN4ATtZV5DucMtAvBmEF0PWMABT9M021JA43Ni1yf9gdb4y1Wa+LZHASZjZR203xH0y2VIUwJCFA== + version "5.5.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.5.2.tgz#918a2c1000aaa9fdbe6007a4fdc2c62833122adf" + integrity sha512-AydZ4wfvZAsBuFzs3xVSA2iU0hxhL8anXco3UW3oh9maVC34kTEytOfjHf06LTEfN0MF9LDQ4ciLa7If6ZN/sg== dependencies: "@ethereumjs/block" "^3.4.0" "@ethereumjs/blockchain" "^5.4.0" @@ -464,10 +479,10 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/abstract-provider@5.4.0", "@ethersproject/abstract-provider@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.0.tgz#415331031b0f678388971e1987305244edc04e1d" - integrity sha512-vPBR7HKUBY0lpdllIn7tLIzNN7DrVnhCLKSzY0l8WAwxz686m/aL7ASDzrVxV93GJtIub6N2t4dfZ29CkPOxgA== +"@ethersproject/abstract-provider@5.4.1", "@ethersproject/abstract-provider@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz#e404309a29f771bd4d28dbafadcaa184668c2a6e" + integrity sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ== dependencies: "@ethersproject/bignumber" "^5.4.0" "@ethersproject/bytes" "^5.4.0" @@ -629,10 +644,10 @@ resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.0.tgz#f39adadf62ad610c420bcd156fd41270e91b3ca9" integrity sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ== -"@ethersproject/networks@5.4.1", "@ethersproject/networks@^5.4.0": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.1.tgz#2ce83b8e42aa85216e5d277a7952d97b6ce8d852" - integrity sha512-8SvowCKz9Uf4xC5DTKI8+il8lWqOr78kmiqAVLYT9lzB8aSmJHQMD1GSuJI0CW4hMAnzocpGpZLgiMdzsNSPig== +"@ethersproject/networks@5.4.2", "@ethersproject/networks@^5.4.0": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.2.tgz#2247d977626e97e2c3b8ee73cd2457babde0ce35" + integrity sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw== dependencies: "@ethersproject/logger" "^5.4.0" @@ -1729,10 +1744,10 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^9.3.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-9.3.0.tgz#160347858d727527901c6aae7f7d5c2414cc1f2e" - integrity sha512-oz60hhL+mDsiOWhEwrj5aWXTOMVtQgcvP+sRzX4C3cH7WOK9QSAoEtjWh0HdOf6V3qpdgAmUMxnQPluzDWR7Fw== +"@octokit/openapi-types@^9.4.0": + version "9.4.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-9.4.0.tgz#31a76fb4c0f2e15af300edd880cedf4f75be212b" + integrity sha512-rKRkXikOJgDNImPl49IJuECLVXjj+t4qOXHhl8SBjMQCGGp1w4m5Ud/0kfdUx+zCpTvBN8vaOUDF4nnboZoOtQ== "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" @@ -1751,12 +1766,12 @@ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== -"@octokit/plugin-rest-endpoint-methods@5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.6.0.tgz#c28833b88d0f07bf94093405d02d43d73c7de99b" - integrity sha512-2G7lIPwjG9XnTlNhe/TRnpI8yS9K2l68W4RP/ki3wqw2+sVeTK8hItPxkqEI30VeH0UwnzpuksMU/yHxiVVctw== +"@octokit/plugin-rest-endpoint-methods@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.7.0.tgz#80b69452c17597738d4692c79829b72d9e72ccec" + integrity sha512-G7sgccWRYQMwcHJXkDY/sDxbXeKiZkFQqUtzBCwmrzCNj2GQf3VygQ4T/BFL2crLVpIbenkE/c0ErhYOte2MPw== dependencies: - "@octokit/types" "^6.23.0" + "@octokit/types" "^6.24.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": @@ -1781,21 +1796,21 @@ universal-user-agent "^6.0.0" "@octokit/rest@^18.1.0": - version "18.8.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.8.0.tgz#ba24f7ba554f015a7ae2b7cc2aecef5386ddfea5" - integrity sha512-lsuNRhgzGnLMn/NmQTNCit/6jplFWiTUlPXhqN0zCMLwf2/9pseHzsnTW+Cjlp4bLMEJJNPa5JOzSLbSCOahKw== + version "18.9.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.9.0.tgz#e5cc23fa199a2bdeea9efbe6096f81d7d6156fe9" + integrity sha512-VrmrE8gjpuOoDAGjrQq2j9ZhOE6LxaqxaQg0yMrrEnnQZy2ZcAnr5qbVfKsMF0up/48PRV/VFS/2GSMhA7nTdA== dependencies: "@octokit/core" "^3.5.0" "@octokit/plugin-paginate-rest" "^2.6.2" "@octokit/plugin-request-log" "^1.0.2" - "@octokit/plugin-rest-endpoint-methods" "5.6.0" + "@octokit/plugin-rest-endpoint-methods" "5.7.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.23.0": - version "6.23.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.23.0.tgz#b39f242b20036e89fa8f34f7962b4e9b7ff8f65b" - integrity sha512-eG3clC31GSS7K3oBK6C6o7wyXPrkP+mu++eus8CSZdpRytJ5PNszYxudOQ0spWZQ3S9KAtoTG6v1WK5prJcJrA== +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.23.0", "@octokit/types@^6.24.0": + version "6.24.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.24.0.tgz#d7858ceae8ac29256da85dcfcb9acbae28e6ba22" + integrity sha512-MfEimJeQ8AV1T2nI5kOfHqsqPHaAnG0Dw3MVoHSEsEq6iLKx2N91o+k2uAgXhPYeSE76LVBqjgTShnFFgNwe0A== dependencies: - "@octokit/openapi-types" "^9.3.0" + "@octokit/openapi-types" "^9.4.0" "@open-policy-agent/opa-wasm@^1.2.0": version "1.2.0" @@ -1810,11 +1825,6 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.4.1-solc-0.7-2.tgz#8d46f2310560d3756bd5235e20f4e50caa947e92" integrity sha512-hGbNTTlkcsRhMdJ+IMAWKn5uI1IK9yvJamZpQou1aOjgr+VOFo7eqdiqs+Dwv8fGzN7L/Wdg4XqiW3vGqTHk3g== -"@openzeppelin/contracts@3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.2.0.tgz#3e6b3a7662d8ed64271ade96ef42655db983fd9d" - integrity sha512-bUOmkSoPkjnUyMiKo6RYnb0VHBk5D9KKDAgNLzF41aqAM3TeE0yGdFF5dVRcV60pZdJLlyFT/jjXIZCWyyEzAQ== - "@openzeppelin/contracts@3.4.0": version "3.4.0" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.0.tgz#9a1669ad5f9fdfb6e273bb5a4fed10cb4cc35eb0" @@ -2306,23 +2316,23 @@ resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.14.tgz#59683b5407bede7bddf16d80dc5592f9c5e5fa05" integrity sha512-utJx+SZYoMqk8wldQG4gCVKhV8GwMJbWY7sLXFT/D8wWZTnE2peX7URFJh/cxkjTRCO328z1s2qewkhyVsu2HA== -"@truffle/interface-adapter@^0.5.3": - version "0.5.3" - resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.3.tgz#9fa9b177d11ce57182797439ea2bc658bc706a49" - integrity sha512-LCwOKlIMZqRNbncJG3Q+BS+aFg2bXU95jjgLNwFK+K//eoj4QhdxQPq2bTejRg4ag0UOr8MqJQbYFzkJxJBujQ== +"@truffle/interface-adapter@^0.5.4": + version "0.5.4" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.4.tgz#66cbbb2f359160b651169e573613bbd91d36730c" + integrity sha512-4wlaYWrt6eBMoWWtyljeDQU+MwCfWyXu14L/jAYiTjiW/uhkY3kp8QWVR5fkntBq2rJXjjeDNj8Ez+VWO4+8sw== dependencies: bn.js "^5.1.3" ethers "^4.0.32" - web3 "1.5.0" + web3 "1.5.1" "@truffle/provider@^0.2.24": - version "0.2.35" - resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.35.tgz#206373d97c911f2ce53ceb56d4bd15f73739a336" - integrity sha512-50go3TQOcfNVN8srUfHb7OIKFi6oEOFyybzZneDwSG6z6yD0A0Oc2Vk7/CeYiEkto7qrXXbIcVOP5zb++t3Q+g== + version "0.2.36" + resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.36.tgz#e1b77308f091a9f21cd78ee5cf5a8fd185c3decd" + integrity sha512-A9UzX7WXM1cOl/uKqcXV/UzsoqDEgkPW/4ql6n6CwhY1U+Q8XiCJYFo9kW99aYNsy7TGVVan6Ihn1Zx/xCmpcA== dependencies: "@truffle/error" "^0.0.14" - "@truffle/interface-adapter" "^0.5.3" - web3 "1.5.0" + "@truffle/interface-adapter" "^0.5.4" + web3 "1.5.1" "@tsconfig/node10@^1.0.7": version "1.0.8" @@ -2339,7 +2349,7 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== -"@tsconfig/node16@^1.0.1": +"@tsconfig/node16@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== @@ -2356,20 +2366,13 @@ resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-7.0.1.tgz#f9ae60ae5bd9e8ea8a996f66244147e8e74034ae" integrity sha512-mXEJ7LG0pOYO+MRPkHtbf30Ey9X2KAsU0wkeoVvjQIn7iAY6tB3k3s+82bbmJAUMyENbQ04RDOZit36CgSG6Gg== -"@typechain/hardhat@2.3.0": +"@typechain/hardhat@2.3.0", "@typechain/hardhat@^2.2.0": version "2.3.0" resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-2.3.0.tgz#dc7f29281637b38b77c7c046ae82700703395d0f" integrity sha512-zERrtNol86L4DX60ktnXxP7Cq8rSZHPaQvsChyiQQVuvVs2FTLm24Yi+MYnfsIdbUBIXZG7SxDWhtCF5I0tJNQ== dependencies: fs-extra "^9.1.0" -"@typechain/hardhat@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-2.2.0.tgz#a3e99b49c215c364c375c554bdce626bb21ecc47" - integrity sha512-ICZdbc5QA/bSZEvdAHsEL3/u260ZPIK7WZLNnoGywQNo6A98w7VKQW4DR7hPPMHe1FaSI1LTuIesRQvCUVyT3A== - dependencies: - fs-extra "^9.1.0" - "@types/abstract-leveldown@*": version "5.0.2" resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-5.0.2.tgz#ee81917fe38f770e29eec8139b6f16ee4a8b0a5f" @@ -2558,9 +2561,9 @@ form-data "^3.0.0" "@types/node@*", "@types/node@^16.4.10", "@types/node@^16.4.3": - version "16.4.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.10.tgz#e57e2a54fc6da58da94b3571b1cb456d39f88597" - integrity sha512-TmVHsm43br64js9BqHWqiDZA+xMtbUpI1MBIA0EyiBmoV9pcEYFOSdj5fr6enZNfh4fChh+AGOLIzGwJnkshyQ== + version "16.4.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.13.tgz#7dfd9c14661edc65cccd43a29eb454174642370d" + integrity sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg== "@types/node@^10.0.3": version "10.17.60" @@ -2568,9 +2571,9 @@ integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/node@^12.12.6": - version "12.20.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.18.tgz#37a0aab0560d1186da54ee5d62ff6a78cacb8c75" - integrity sha512-YoTiIwdKxM3VLiY2sM05x4iGuTveYiCcDaUVmo1L5ndrXxPGW/NEoZu+pGcBirziomizcZsnsQoemikKcB2fRA== + version "12.20.19" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.19.tgz#538e61fc220f77ae4a4663c3d8c3cb391365c209" + integrity sha512-niAuZrwrjKck4+XhoCw6AAVQBENHftpXw9F4ryk66fTgYaKQ53R4FI7c9vUGGw5vQis1HKBHDR1gcYI/Bq1xvw== "@types/node@^13.7.0": version "13.13.52" @@ -2868,6 +2871,11 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== +acorn-walk@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" + integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== + acorn@^6.0.7: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" @@ -2878,6 +2886,11 @@ acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -3256,9 +3269,9 @@ async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1: lodash "^4.17.14" async@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" - integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== + version "3.2.1" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.1.tgz#d3274ec66d107a47476a4c49136aacdb00665fc8" + integrity sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg== asynckit@^0.4.0: version "0.4.0" @@ -3280,7 +3293,7 @@ author-regex@^1.0.0: resolved "https://registry.yarnpkg.com/author-regex/-/author-regex-1.0.0.tgz#d08885be6b9bbf9439fe087c76287245f0a81450" integrity sha1-0IiFvmubv5Q5/gh8dihyRfCoFFA= -available-typed-arrays@^1.0.2: +available-typed-arrays@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== @@ -4332,9 +4345,9 @@ camelcase@^6.0.0, camelcase@^6.2.0: integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001248: - version "1.0.30001248" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001248.tgz#26ab45e340f155ea5da2920dadb76a533cb8ebce" - integrity sha512-NwlQbJkxUFJ8nMErnGtT0QTM2TJ33xgz4KXJSMIrjXIbDVdaYueGyjOrLKRtJC+rTiWfi6j5cnZN1NBiSBJGNw== + version "1.0.30001249" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001249.tgz#90a330057f8ff75bfe97a94d047d5e14fabb2ee8" + integrity sha512-vcX4U8lwVXPdqzPWi6cAJ3FnQaqXbBqy/GZseKNQzRj37J7qZdGcBtxq/QLFNLLlfsoXLUdHw8Iwenri86Tagw== caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" @@ -4467,7 +4480,7 @@ chokidar@3.5.2, chokidar@^3.4.0: optionalDependencies: fsevents "~2.3.2" -chownr@^1.1.1: +chownr@^1.1.1, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -4936,9 +4949,9 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js-pure@^3.0.1: - version "3.16.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.16.0.tgz#218e07add3f1844e53fab195c47871fc5ba18de8" - integrity sha512-wzlhZNepF/QA9yvx3ePDgNGudU5KDB8lu/TRPKelYA/QtSnkS/cLl2W+TIdEX1FAFcBr0YpY7tPDlcmXJ7AyiQ== + version "3.16.1" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.16.1.tgz#b997df2669c957a5b29f06e95813a171f993592e" + integrity sha512-TyofCdMzx0KMhi84mVRS8rL1XsRk2SPUNz2azmth53iRN0/08Uim9fdhQTaZTG1LqaXHYVci4RDHka6WrXfnvg== core-js@^2.4.0, core-js@^2.5.0: version "2.6.12" @@ -4946,9 +4959,9 @@ core-js@^2.4.0, core-js@^2.5.0: integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-js@^3.6.5: - version "3.16.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.0.tgz#1d46fb33720bc1fa7f90d20431f36a5540858986" - integrity sha512-5+5VxRFmSf97nM8Jr2wzOwLqRo6zphH2aX+7KsAUONObyzakDNq2G/bgbhinxB4PoV9L3aXQYhiDKyIKWd2c8g== + version "3.16.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.1.tgz#f4485ce5c9f3c6a7cb18fa80488e08d362097249" + integrity sha512-AAkP8i35EbefU+JddyWi12AWE9f2N/qr/pwnDtWz4nyUIBGMJPX99ANFFRSw6FefM374lDujdtLDyhN2A/btHw== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -5543,9 +5556,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.47, electron-to-chromium@^1.3.793: - version "1.3.793" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.793.tgz#c10dff5f3126238004de344db458f1da3641d554" - integrity sha512-l9NrGV6Mr4ov5mayYPvIWcwklNw5ROmy6rllzz9dCACw9nKE5y+s5uQk+CBJMetxrWZ6QJFsvEfG6WDcH2IGUg== + version "1.3.801" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.801.tgz#f41c588e408ad1a4f794f91f38aa94a89c492f51" + integrity sha512-xapG8ekC+IAHtJrGBMQSImNuN+dm+zl7UP1YbhvTkwQn8zf/yYuoxfTSAEiJ9VDD+kjvXaAhNDPSxJ+VImtAJA== elfy@^1.0.0: version "1.0.0" @@ -5680,7 +5693,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: +es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2, es-abstract@^1.18.5: version "1.18.5" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.5.tgz#9b10de7d4c206a3581fd5b2124233e04db49ae19" integrity sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA== @@ -5790,18 +5803,18 @@ eslint-config-standard@^16.0.2: resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516" integrity sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg== -eslint-import-resolver-node@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" - integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== +eslint-import-resolver-node@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.5.tgz#939bbb0f74e179e757ca87f7a4a890dabed18ac4" + integrity sha512-XMoPKjSpXbkeJ7ZZ9icLnJMTY5Mc1kZbCakHquaFsXPpyWOwK0TK6CODO+0ca54UoM9LKOxyUNnoVZRl8TeaAg== dependencies: - debug "^2.6.9" - resolve "^1.13.1" + debug "^3.2.7" + resolve "^1.20.0" -eslint-module-utils@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" - integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== +eslint-module-utils@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534" + integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q== dependencies: debug "^3.2.7" pkg-dir "^2.0.0" @@ -5815,16 +5828,16 @@ eslint-plugin-es@^3.0.0: regexpp "^3.0.0" eslint-plugin-import@^2.23.2: - version "2.23.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" - integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== + version "2.24.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz#697ffd263e24da5e84e03b282f5fb62251777177" + integrity sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg== dependencies: array-includes "^3.1.3" array.prototype.flat "^1.2.4" debug "^2.6.9" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.1" + eslint-import-resolver-node "^0.3.5" + eslint-module-utils "^2.6.2" find-up "^2.0.0" has "^1.0.3" is-core-module "^2.4.0" @@ -6502,13 +6515,13 @@ ethers@^4.0.32, ethers@^4.0.40: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.0.0, ethers@^5.0.1, ethers@^5.0.2, ethers@^5.4.0, ethers@^5.4.2, ethers@^5.4.3: - version "5.4.3" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.3.tgz#9469e7f353285caac4114467eb2618f755a3f7d0" - integrity sha512-esWqdrFZObpyZyhH6VLHCz5vRA/YJrEmQO77sALWSWFjFtJr5ITIRwJ448N+mxIrvnqjZGQ2Jx2zC3xt5lc64g== +ethers@^5.0.0, ethers@^5.0.1, ethers@^5.0.2, ethers@^5.4.0, ethers@^5.4.2, ethers@^5.4.4: + version "5.4.4" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.4.tgz#35cce530505b84c699da944162195cfb3f894947" + integrity sha512-zaTs8yaDjfb0Zyj8tT6a+/hEkC+kWAA350MWRp6yP5W7NdGcURRPMOpOU+6GtkfxV9wyJEShWesqhE/TjdqpMA== dependencies: "@ethersproject/abi" "5.4.0" - "@ethersproject/abstract-provider" "5.4.0" + "@ethersproject/abstract-provider" "5.4.1" "@ethersproject/abstract-signer" "5.4.1" "@ethersproject/address" "5.4.0" "@ethersproject/base64" "5.4.0" @@ -6522,7 +6535,7 @@ ethers@^5.0.0, ethers@^5.0.1, ethers@^5.0.2, ethers@^5.4.0, ethers@^5.4.2, ether "@ethersproject/json-wallets" "5.4.0" "@ethersproject/keccak256" "5.4.0" "@ethersproject/logger" "5.4.0" - "@ethersproject/networks" "5.4.1" + "@ethersproject/networks" "5.4.2" "@ethersproject/pbkdf2" "5.4.0" "@ethersproject/properties" "5.4.0" "@ethersproject/providers" "5.4.3" @@ -7120,7 +7133,7 @@ fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== @@ -7562,9 +7575,9 @@ got@^7.1.0: url-to-options "^1.0.1" graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3, graceful-fs@^4.2.4: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== grapheme-splitter@^1.0.4: version "1.0.4" @@ -7768,6 +7781,13 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -8242,11 +8262,12 @@ is-accessor-descriptor@^1.0.0: kind-of "^6.0.0" is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" @@ -8254,9 +8275,9 @@ is-arrayish@^0.2.1: integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-bigint@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" - integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.3.tgz#fc9d9e364210480675653ddaea0518528d49a581" + integrity sha512-ZU538ajmYJmzysE5yU4Y7uIrPQ2j704u+hXFiIPQExpqzzUbpe5jCPdTfmz7jXRxZdvjY3KZ3ZNenoXQovX+Dg== is-binary-path@~2.1.0: version "2.1.0" @@ -8266,11 +8287,12 @@ is-binary-path@~2.1.0: binary-extensions "^2.0.0" is-boolean-object@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" - integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== dependencies: call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-buffer@^1.1.5: version "1.1.6" @@ -8283,9 +8305,9 @@ is-buffer@~2.0.3: integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" - integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== is-ci@^2.0.0: version "2.0.0" @@ -8316,9 +8338,11 @@ is-data-descriptor@^1.0.0: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" - integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A== + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" is-deflate@^1.0.0: version "1.0.0" @@ -8403,9 +8427,11 @@ is-function@^1.0.1: integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== is-generator-function@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c" - integrity sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A== + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" @@ -8453,9 +8479,11 @@ is-npm@^5.0.0: integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== is-number-object@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" - integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" is-number@^3.0.0: version "3.0.0" @@ -8512,12 +8540,12 @@ is-plain-object@^5.0.0: integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== is-regex@^1.0.4, is-regex@^1.1.3, is-regex@~1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" - integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== dependencies: call-bind "^1.0.2" - has-symbols "^1.0.2" + has-tostringtag "^1.0.0" is-retry-allowed@^1.0.0: version "1.2.0" @@ -8542,9 +8570,11 @@ is-stream@^2.0.0: integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== is-string@^1.0.5, is-string@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" - integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" @@ -8560,16 +8590,16 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typed-array@^1.1.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.5.tgz#f32e6e096455e329eb7b423862456aa213f0eb4e" - integrity sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug== +is-typed-array@^1.1.3, is-typed-array@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.7.tgz#881ddc660b13cb8423b2090fa88c0fe37a83eb2f" + integrity sha512-VxlpTBGknhQ3o7YiVjIhdLU6+oD8dPz/79vvvH4F+S/c8608UCVa9fgDpa1kZgFoUST2DCgacc70UszKgzKuvA== dependencies: - available-typed-arrays "^1.0.2" + available-typed-arrays "^1.0.4" call-bind "^1.0.2" - es-abstract "^1.18.0-next.2" + es-abstract "^1.18.5" foreach "^2.0.5" - has-symbols "^1.0.1" + has-tostringtag "^1.0.0" is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" @@ -8868,7 +8898,7 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jszip@3.7.0, jszip@^3.7.0: +jszip@3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.0.tgz#9b8b995a4e7c9024653ce743e902076a82fdf4e6" integrity sha512-Y2OlFIzrDOPWUnpU0LORIcDn2xN7rC9yKffFM/7pGhQuhO+SUhfm2trkJ/S5amjFvem0Y+1EALz/MEPkvHXVNw== @@ -8878,6 +8908,16 @@ jszip@3.7.0, jszip@^3.7.0: readable-stream "~2.3.6" set-immediate-shim "~1.0.1" +jszip@^3.7.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9" + integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + set-immediate-shim "~1.0.1" + keccak@3.0.1, keccak@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" @@ -10120,7 +10160,7 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -10135,7 +10175,7 @@ minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: dependencies: yallist "^4.0.0" -minizlib@^1.2.1: +minizlib@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== @@ -10184,7 +10224,7 @@ mkdirp@*, mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@0.5.5, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@0.5.5, mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -10360,9 +10400,9 @@ mute-stream@0.0.8, mute-stream@~0.0.4: integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nan@^2.14.0: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== + version "2.15.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" + integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== nano-json-stream-parser@^0.1.2: version "0.1.2" @@ -11214,9 +11254,9 @@ parse-cache-control@^1.0.1: integrity sha1-juqz5U+laSD+Fro493+iGqzC104= parse-headers@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" - integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== + version "2.0.4" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.4.tgz#9eaf2d02bed2d1eff494331ce3df36d7924760bf" + integrity sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw== parse-json@^2.2.0: version "2.2.0" @@ -12378,7 +12418,7 @@ resolve@1.17.0: dependencies: path-parse "^1.0.6" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.8.1, resolve@~1.20.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0, resolve@^1.8.1, resolve@~1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -12515,7 +12555,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -12874,9 +12914,9 @@ slide@^1.1.6: integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= smart-buffer@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" - integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== snapdragon-node@^2.0.1: version "2.1.1" @@ -13095,17 +13135,17 @@ snyk-poetry-lockfile-parser@^1.1.6: toml "^3.0.0" tslib "^2.0.0" -snyk-policy@1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/snyk-policy/-/snyk-policy-1.19.0.tgz#0cbc442d9503970fb3afea938f57d57993a914ad" - integrity sha512-XYjhOTRPFA7NfDUsH6uH1fbML2OgSFsqdUPbud7x01urNP9CHXgUgAD4NhKMi3dVQK+7IdYadWt0wrFWw4y+qg== +snyk-policy@1.22.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/snyk-policy/-/snyk-policy-1.22.0.tgz#6c9c82cf474f31af749c08d82b0d179a4bcc2a48" + integrity sha512-torzlNhDWcoMQLcX2xsTbCXfKXE614+5YvLHxEefQPwC1JNkbCN5u3/pU0c+2RfC2cPCa1AKEBqIx5gvr6mNyQ== dependencies: debug "^4.1.1" email-validator "^2.0.4" js-yaml "^3.13.1" lodash.clonedeep "^4.5.0" promise-fs "^2.1.1" - semver "^6.0.0" + semver "^7.3.4" snyk-module "^3.0.0" snyk-resolve "^1.1.0" snyk-try-require "^2.0.0" @@ -13186,9 +13226,9 @@ snyk-try-require@^2.0.0: lru-cache "^5.1.1" snyk@^1.658.0, snyk@^1.675.0: - version "1.675.0" - resolved "https://registry.yarnpkg.com/snyk/-/snyk-1.675.0.tgz#fb89421fbd5d3d25f813589ad4bd4396a2a04484" - integrity sha512-J5ZvEiaAIRdyFrIjS1OnfQs5vKLG0SNPJmeg/GuTA9z8L/gqtTXUsnCrnmpQ8Y2y7L3LRyjh9VXx7G0QC9rlWA== + version "1.677.0" + resolved "https://registry.yarnpkg.com/snyk/-/snyk-1.677.0.tgz#5142042101ca13de734470cfb03d79e9407c3759" + integrity sha512-2CALWUc+gOmOmpK9ehsJiaU0SYJEEmpJYalVw1Gh8pk4S/8bZWx5OdaQyD3ep29ZX5BCVSDQvOE22NPtTs8X7g== dependencies: "@open-policy-agent/opa-wasm" "^1.2.0" "@snyk/cli-interface" "2.11.0" @@ -13247,7 +13287,7 @@ snyk@^1.658.0, snyk@^1.675.0: snyk-nodejs-lockfile-parser "1.35.0" snyk-nuget-plugin "1.22.0" snyk-php-plugin "1.9.2" - snyk-policy "1.19.0" + snyk-policy "1.22.0" snyk-python-plugin "1.19.11" snyk-resolve "1.1.0" snyk-resolve-deps "4.7.2" @@ -13436,7 +13476,7 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.11, source-map-support@^0.5.13, source-map-support@^0.5.16, source-map-support@^0.5.17, source-map-support@^0.5.7: +source-map-support@^0.5.11, source-map-support@^0.5.13, source-map-support@^0.5.16, source-map-support@^0.5.7: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -13488,9 +13528,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz#8a595135def9592bda69709474f1cbeea7c2467f" - integrity sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ== + version "3.0.10" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== split-ca@^1.0.1: version "1.0.1" @@ -13950,22 +13990,22 @@ tar-stream@^2.0.1, tar-stream@^2.1.0, tar-stream@^2.1.4, tar-stream@^2.2.0: readable-stream "^3.1.1" tar@^4.0.2, tar@^4.4.12: - version "4.4.15" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" - integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== + version "4.4.16" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.16.tgz#4a48b3c025e77d9d0c788f038a09b91c594d326d" + integrity sha512-gOVUT/KWPkGFZQmCRDVFNUWBl7niIo/PRR7lzrIqtZpit+st54lGROuVjc6zEQM9FhH+dJfQIl+9F0k8GNXg5g== dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" tar@^6.0.2, tar@^6.1.0, tar@^6.1.2: - version "6.1.3" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.3.tgz#e44b97ee7d6cc7a4c574e8b01174614538291825" - integrity sha512-3rUqwucgVZXTeyJyL2jqtUau8/8r54SioM1xj3AmTX3HnWQdj2AydfJ2qYYayPyIIznSplcvU9mhBb7dR2XF3w== + version "6.1.7" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.7.tgz#c566d1107d38b09e92983a68db5534fc7f6cab42" + integrity sha512-PBoRkOJU0X3lejJ8GaRCsobjXTgFofRDSPdSUhRSdlwJfifRlQBwGXitDItdGFu0/h0XDMCkig0RN1iT7DBxhA== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" @@ -14232,19 +14272,21 @@ ts-generator@^0.1.1: ts-essentials "^1.0.0" ts-node@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.1.0.tgz#e656d8ad3b61106938a867f69c39a8ba6efc966e" - integrity sha512-6szn3+J9WyG2hE+5W8e0ruZrzyk1uFLYye6IGMBadnOzDh8aP7t8CbFpsfCiEx2+wMixAhjFt7lOZC4+l+WbEA== + version "10.2.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.0.tgz#f1e88249a00e26aa95e9a93c50f70241a8a1c4bb" + integrity sha512-FstYHtQz6isj8rBtYMN4bZdnXN1vq4HCbqn9vdNQcInRqtB86PePJQIxE6es0PhxKWhj2PHuwbG40H+bxkZPmg== dependencies: + "@cspotcode/source-map-support" "0.6.1" "@tsconfig/node10" "^1.0.7" "@tsconfig/node12" "^1.0.7" "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.1" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" arg "^4.1.0" create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" - source-map-support "^0.5.17" yn "3.1.1" tsconfig-paths@^3.9.0: @@ -14788,10 +14830,10 @@ web3-bzz@1.4.0: swarm-js "^0.1.40" underscore "1.12.1" -web3-bzz@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.5.0.tgz#fed3f0895b4c51392eed4557235c1aaf79e0810b" - integrity sha512-IqlecWpwTMO/O5qa0XZZubQh4GwAtO/CR+e2FQ/7oB5eXQyre3DZ/MYu8s5HCLxCR33Fcqda9q2dbNtm1wSQYw== +web3-bzz@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.5.1.tgz#e7f3cab584cfa363d1cf42457e2ece13f9e75617" + integrity sha512-Xi3H1PFHZ7d8FJypEuQzOA7y1O00lSgAQxFyMgSyP4RKq+kLxpb7Z4lRxZ4N7EXVdKmS0S23iDAPa1GCnyJJpQ== dependencies: "@types/node" "^12.12.6" got "9.6.0" @@ -14815,13 +14857,13 @@ web3-core-helpers@1.4.0: web3-eth-iban "1.4.0" web3-utils "1.4.0" -web3-core-helpers@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.5.0.tgz#bca7645aaf2f22910df15d6d359e7f466b5d65ca" - integrity sha512-7s5SrJbG5O0C0Oi9mqKLYchco72djZhk59B7kTla5vUorAxMc99SY7k9BoDgwbFl2dlZon2GtFUEW2RXUNkb1g== +web3-core-helpers@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.5.1.tgz#bfb656e33f4b296c654688764385c0b2606237cf" + integrity sha512-7K4hykJLMaUEtVztPhQ9JDNjMPwDynky15nqCaph/ozOU9q57BaCJJorhmpRrh1bM9Rx6dJz4nGruE4KfZbk0w== dependencies: - web3-eth-iban "1.5.0" - web3-utils "1.5.0" + web3-eth-iban "1.5.1" + web3-utils "1.5.1" web3-core-method@1.2.11: version "1.2.11" @@ -14847,16 +14889,17 @@ web3-core-method@1.4.0: web3-core-subscriptions "1.4.0" web3-utils "1.4.0" -web3-core-method@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.5.0.tgz#1940e4da7def63d00f9141b84c4d0d66d25428a7" - integrity sha512-izPhpjbn9jVBjMeFcsU7a5+/nqni9hS5oU+d00HJGTVbp8KV6zplhYw4GjkRqyy6OQzooO8Gx2MMUyRdv5x1wg== +web3-core-method@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.5.1.tgz#ab27efd53e0cedfde8e4ae69bb664a24247695f3" + integrity sha512-qNGmI/nRywpV4aRQPm1JqdE9fGtvJE3YOTcS+Ju7FVA3HT+/z0wwhjMwcVkkDeFryB6rGdKtUfnLvwm0O1/66A== dependencies: + "@ethereumjs/common" "^2.4.0" "@ethersproject/transactions" "^5.0.0-beta.135" - web3-core-helpers "1.5.0" - web3-core-promievent "1.5.0" - web3-core-subscriptions "1.5.0" - web3-utils "1.5.0" + web3-core-helpers "1.5.1" + web3-core-promievent "1.5.1" + web3-core-subscriptions "1.5.1" + web3-utils "1.5.1" web3-core-promievent@1.2.11: version "1.2.11" @@ -14872,10 +14915,10 @@ web3-core-promievent@1.4.0: dependencies: eventemitter3 "4.0.4" -web3-core-promievent@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.5.0.tgz#fab9fe72520e46d8fee73ccf8d2f15243e4bc4fd" - integrity sha512-7GkbOIMtcp1qN8LRMMmwIhulzEldT+3Mu7ii2WgAcFFKT1yzUl6Gmycf8mmoEKpAuADAQ9Qeyk0PskTR6rTYlQ== +web3-core-promievent@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.5.1.tgz#4edc19a37d84fc63e18b27dcaa817342c3d23e87" + integrity sha512-IElKxtZaUS3+T9TXO6mz1SUaEwOt9D3ng2B8HtPA1gcJ6bC4gIIE9g52CDVT2hgtC9QHX2hsvvEVvFJC4IMvJQ== dependencies: eventemitter3 "4.0.4" @@ -14902,16 +14945,16 @@ web3-core-requestmanager@1.4.0: web3-providers-ipc "1.4.0" web3-providers-ws "1.4.0" -web3-core-requestmanager@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.5.0.tgz#126427fb29efe15bbac090d3aad09b3842c6dbf6" - integrity sha512-Sr5T2JuXOAsINJ2tf7Rgi2a+Dy2suBDKT8eMc1pcspPmaBhvTKOQfM9XdsO4yjJKYw6tt/Tagw4GKZm4IOx7mw== +web3-core-requestmanager@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.5.1.tgz#00b6c0740f5ce41f0bf069ee7b8acef7b11e7a4c" + integrity sha512-AniBbDmcsm4somBkUQvAk7p3wzKYsea9ZP8oj4S34bYauVW0CFGiOyS9yRNmSwj36NVbwtYL3npVoc4+W8Lusg== dependencies: util "^0.12.0" - web3-core-helpers "1.5.0" - web3-providers-http "1.5.0" - web3-providers-ipc "1.5.0" - web3-providers-ws "1.5.0" + web3-core-helpers "1.5.1" + web3-providers-http "1.5.1" + web3-providers-ipc "1.5.1" + web3-providers-ws "1.5.1" web3-core-subscriptions@1.2.11: version "1.2.11" @@ -14931,13 +14974,13 @@ web3-core-subscriptions@1.4.0: underscore "1.12.1" web3-core-helpers "1.4.0" -web3-core-subscriptions@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.5.0.tgz#c7f77fc0db061cd9290987b08540f91e9d4b8bca" - integrity sha512-dx9P1mZvJkQRiYpSo9SvFhYNzy5E9GHeLOc3uqxPaDxKU7Cu9fJnFHo/P6+wfD6ZhGIP23ZLK/uyor5UpdTqDQ== +web3-core-subscriptions@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.5.1.tgz#bceff03c05350bfc3df22da1c68cbb5a3a94b831" + integrity sha512-CYinu+uU6DI938Tk13N7o1cJQpUHCU74AWIYVN9x5dJ1m1L+yxpuQ3cmDxuXsTMKAJGcj+ok+sk9zmpsNLq66w== dependencies: eventemitter3 "4.0.4" - web3-core-helpers "1.5.0" + web3-core-helpers "1.5.1" web3-core@1.2.11: version "1.2.11" @@ -14965,18 +15008,18 @@ web3-core@1.4.0: web3-core-requestmanager "1.4.0" web3-utils "1.4.0" -web3-core@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.5.0.tgz#46c09283bcfe197df0c543dbe751650cea157a7f" - integrity sha512-1o/etaPSK8tFOWTA6df3t9J6ez4epeyzlNmyh/gx8uHasfa16XLKD8//A9T+O/TmvyQAaA4hWAsQcvlRcuaZ8Q== +web3-core@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.5.1.tgz#df511e6bbae5aac18561aa5c64aa68fb16eef608" + integrity sha512-k+X1yDnoVmbTHTcACZfpC+dkZTVt/+Lr6N8a3Y/6CXM8d7Oq9APfin4ZlU8kRE4DMMQsWJSU2tdBzQfxtmwXkA== dependencies: "@types/bn.js" "^4.11.5" "@types/node" "^12.12.6" bignumber.js "^9.0.0" - web3-core-helpers "1.5.0" - web3-core-method "1.5.0" - web3-core-requestmanager "1.5.0" - web3-utils "1.5.0" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-core-requestmanager "1.5.1" + web3-utils "1.5.1" web3-eth-abi@1.2.11: version "1.2.11" @@ -14996,13 +15039,13 @@ web3-eth-abi@1.4.0: underscore "1.12.1" web3-utils "1.4.0" -web3-eth-abi@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.5.0.tgz#10a4bf11ec2302c6cf313b5de4e2e12d9620d648" - integrity sha512-rfT/SvfZY9+SNJRzTHxLFaebQRBhS67tGqUqLxlyy6EsAcEmIs/g4mAUH5atYwPE9bOQeiVoLKLbwJEBIcw86w== +web3-eth-abi@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.5.1.tgz#9e8f108db9025ce0611c19fb2777f7d49148cf51" + integrity sha512-D+WjeVYW8mxL0GpuJVWc8FLfmHMaiJQesu2Lagx/Ul9A+VxnXrjGIzve/QY+YIINKrljUE1KiN0OV6EyLAd5Hw== dependencies: "@ethersproject/abi" "5.0.7" - web3-utils "1.5.0" + web3-utils "1.5.1" web3-eth-accounts@1.2.11: version "1.2.11" @@ -15039,10 +15082,10 @@ web3-eth-accounts@1.4.0: web3-core-method "1.4.0" web3-utils "1.4.0" -web3-eth-accounts@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.5.0.tgz#1a71e12758440884450f4939290569ff82976cc3" - integrity sha512-tqvF2bKECaS6jDux8h1dkdsrfb5SHIVVA6hu2lJmZNlTBqFIq2A8rfOkqcanie6Vh5n5U7Dnc2LUoN9rxgaSSg== +web3-eth-accounts@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.5.1.tgz#1beb1d66dead8a9008c4e14e50e1ad1ba4498554" + integrity sha512-TuHdMKHMfIWVEF18dvuS8VmgMRasGylTwjVlrxQm1aVoZ7g9PKNJY5fCUKq8ymj8na/YzCE4iYZr/CylGchzWg== dependencies: "@ethereumjs/common" "^2.3.0" "@ethereumjs/tx" "^3.2.1" @@ -15051,10 +15094,10 @@ web3-eth-accounts@1.5.0: ethereumjs-util "^7.0.10" scrypt-js "^3.0.1" uuid "3.3.2" - web3-core "1.5.0" - web3-core-helpers "1.5.0" - web3-core-method "1.5.0" - web3-utils "1.5.0" + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-utils "1.5.1" web3-eth-contract@1.2.11: version "1.2.11" @@ -15086,19 +15129,19 @@ web3-eth-contract@1.4.0: web3-eth-abi "1.4.0" web3-utils "1.4.0" -web3-eth-contract@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.5.0.tgz#f584a083316424110af95c3ad00c1c3a8a1796d2" - integrity sha512-v4laiJRzdcoDwvqaMCzJH1BUosbTVsd01Qp+9v05Q94KycjkdeahPRXX6PEcUNW/ZF8N006iExUweGjajTZnTA== +web3-eth-contract@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.5.1.tgz#4c59abe3e575920e83e8f8c1bc0bf8a18f975623" + integrity sha512-LRzFnogxeZagxHVpJ9cDK5Y8oQFUNtNL8s5w4IjvZ/JDoBQXPJuwhySwjftL3Hlk3znziMFqAH6snoxjvHnoag== dependencies: "@types/bn.js" "^4.11.5" - web3-core "1.5.0" - web3-core-helpers "1.5.0" - web3-core-method "1.5.0" - web3-core-promievent "1.5.0" - web3-core-subscriptions "1.5.0" - web3-eth-abi "1.5.0" - web3-utils "1.5.0" + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-core-promievent "1.5.1" + web3-core-subscriptions "1.5.1" + web3-eth-abi "1.5.1" + web3-utils "1.5.1" web3-eth-ens@1.2.11: version "1.2.11" @@ -15130,19 +15173,19 @@ web3-eth-ens@1.4.0: web3-eth-contract "1.4.0" web3-utils "1.4.0" -web3-eth-ens@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.5.0.tgz#f92ce19a541e42a0da4b8b04f7161d7a20ad3e86" - integrity sha512-NiaGfOnsCqP+3hOCeP3Q9IrlV/1ZCDiv8VmN1yF5Ya6n6YeO4TJU9MKP8i5038RFETjLIfGtXr5fthbsob30hA== +web3-eth-ens@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.5.1.tgz#bedc65487835d3ca43a18ca573627d764492e554" + integrity sha512-SFK1HpXAiBWlsAuuia8G02MCJfaE16NZkOL7lpVhOvXmJeSDUxQLI8+PKSKJvP3+yyTKhnyYDu5B5TGEZDCVtg== dependencies: content-hash "^2.5.2" eth-ens-namehash "2.0.8" - web3-core "1.5.0" - web3-core-helpers "1.5.0" - web3-core-promievent "1.5.0" - web3-eth-abi "1.5.0" - web3-eth-contract "1.5.0" - web3-utils "1.5.0" + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-promievent "1.5.1" + web3-eth-abi "1.5.1" + web3-eth-contract "1.5.1" + web3-utils "1.5.1" web3-eth-iban@1.2.11: version "1.2.11" @@ -15160,13 +15203,13 @@ web3-eth-iban@1.4.0: bn.js "^4.11.9" web3-utils "1.4.0" -web3-eth-iban@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.5.0.tgz#8c3a1aa7aeed4080ba7d077612ce17025eb0d67d" - integrity sha512-cFfiPA8xs4lemMJjDb9KfXzPvs6rBrRl8y4rgvh/JWlZZgKolzo7KLXq4NR3oFd/C81s0Lslvz2st1EREp5CNA== +web3-eth-iban@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.5.1.tgz#5a8313506bc8bf92511659ae6c0cb29fbf3161a4" + integrity sha512-jPM0L11A8AhywTwpKfbrFYW4lT7+bZ3Jcuy2xw2K2QH/1WjK07OKBAu9rLFnAwRyHO/rDqje3xDf3+jcfA4Yvw== dependencies: bn.js "^4.11.9" - web3-utils "1.5.0" + web3-utils "1.5.1" web3-eth-personal@1.2.11: version "1.2.11" @@ -15192,17 +15235,17 @@ web3-eth-personal@1.4.0: web3-net "1.4.0" web3-utils "1.4.0" -web3-eth-personal@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.5.0.tgz#79e604f38439fbb7a9d4dcb20094359d20d3d388" - integrity sha512-FYBrzMS6q/df8ud1kAN1p6lqdP/pd0szogcuyrVyi++bFQiovnR+QosudFsbn/aAZPDHOEh0UV4P3KVKbLqw9g== +web3-eth-personal@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.5.1.tgz#0202dac4cf4b58648942bc930eb9631e83fec421" + integrity sha512-8mTvRSabsYvYZYRKR9a2lNZNyLE8fnTFLnWhdbgB8Mgp+vAxMvgzUYdR+zHRezkuSxQwRjAexKqo/Do3nK05XQ== dependencies: "@types/node" "^12.12.6" - web3-core "1.5.0" - web3-core-helpers "1.5.0" - web3-core-method "1.5.0" - web3-net "1.5.0" - web3-utils "1.5.0" + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-net "1.5.1" + web3-utils "1.5.1" web3-eth@1.2.11: version "1.2.11" @@ -15242,23 +15285,23 @@ web3-eth@1.4.0: web3-net "1.4.0" web3-utils "1.4.0" -web3-eth@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.5.0.tgz#819466117dfdc191095d6feb58b24023e016cb20" - integrity sha512-31ni3YliTDYLKuWt8naitZ4Ru86whZlqvz6kFzCaBaCR/EumzA9ejzNbcX9okio9zUtKSHH37Bk0+WogfU9Jqg== - dependencies: - web3-core "1.5.0" - web3-core-helpers "1.5.0" - web3-core-method "1.5.0" - web3-core-subscriptions "1.5.0" - web3-eth-abi "1.5.0" - web3-eth-accounts "1.5.0" - web3-eth-contract "1.5.0" - web3-eth-ens "1.5.0" - web3-eth-iban "1.5.0" - web3-eth-personal "1.5.0" - web3-net "1.5.0" - web3-utils "1.5.0" +web3-eth@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.5.1.tgz#2b9ef9427b46cc864d967e619e8020c130b2112f" + integrity sha512-mkYWc5nQwNpweW6FY7ZCfQEB09/Z8Cu+MmDFVPSwdYAAs838LoF+/+1QIqGSP4qBePPwGN225p3ic58LF9QZEA== + dependencies: + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-core-subscriptions "1.5.1" + web3-eth-abi "1.5.1" + web3-eth-accounts "1.5.1" + web3-eth-contract "1.5.1" + web3-eth-ens "1.5.1" + web3-eth-iban "1.5.1" + web3-eth-personal "1.5.1" + web3-net "1.5.1" + web3-utils "1.5.1" web3-net@1.2.11: version "1.2.11" @@ -15278,14 +15321,14 @@ web3-net@1.4.0: web3-core-method "1.4.0" web3-utils "1.4.0" -web3-net@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.5.0.tgz#21ccbe7af3c3065633086b1e82ef100d833944b4" - integrity sha512-oGgEtO2fRtJjAp0K1/fvH247MeeDemFL+5tF+PxII9b/gBxnVe+MzP+oNLr4dTrweromjv34tioR3kUgsqwCWg== +web3-net@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.5.1.tgz#eff1e735874d9106449b30f890d8d8ab56cd5ac9" + integrity sha512-4R5Lb+1QnlrxcL9ex0se/MZcogZ8tMdVd9LPB1mEaIyszTwaEESn2LvPi9WbLrpqxrxwoaj2CNpmxdGyh/gG/g== dependencies: - web3-core "1.5.0" - web3-core-method "1.5.0" - web3-utils "1.5.0" + web3-core "1.5.1" + web3-core-method "1.5.1" + web3-utils "1.5.1" web3-provider-engine@14.2.1: version "14.2.1" @@ -15329,12 +15372,12 @@ web3-providers-http@1.4.0: web3-core-helpers "1.4.0" xhr2-cookies "1.1.0" -web3-providers-http@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.5.0.tgz#47297ac0f058e1c9af7a1528d1dfc2a67d602e93" - integrity sha512-y1RuxsCGrWdsIUyuZBEN+3F8trl3bDZNajwLS2KYBGlB99sWYZHPmvbAsBpaW1d/I12W0fQiWOVzp63L7KPTow== +web3-providers-http@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.5.1.tgz#ddf2038d0308775c02cc4fa5e4e6c817b1ffead9" + integrity sha512-EJetb+XA+fv2Fvl/2+t0DtgL6Fk8+BAcKxSRh+RcgFO83C1xWtKFTLPaTphHylmc1xo9eNtf3DCzLoxljGu4lw== dependencies: - web3-core-helpers "1.5.0" + web3-core-helpers "1.5.1" xhr2-cookies "1.1.0" web3-providers-ipc@1.2.11: @@ -15355,13 +15398,13 @@ web3-providers-ipc@1.4.0: underscore "1.12.1" web3-core-helpers "1.4.0" -web3-providers-ipc@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.5.0.tgz#69d9b3a23f6bfd52f649f3bfbfa6696b159fa80a" - integrity sha512-Hda9wlOaIJC9/qMOVkayK+fbBHDZBmPcoL7TfjQX7hrtZn8V3+gR27ciyRXmuW7QD3hDg7CJfe5uRK8brh3nSA== +web3-providers-ipc@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.5.1.tgz#3667116d58ae1d124b187e154e4d400e4e5e4056" + integrity sha512-NHuyHE3HAuuzb3sEE02zgvA+XTaM0CN9IMbW8U4Bi3tk5/dk1ve4DgsoRA71/NhU2M5Q0BigV0tscZ6jnjVF0Q== dependencies: oboe "2.1.5" - web3-core-helpers "1.5.0" + web3-core-helpers "1.5.1" web3-providers-ws@1.2.11: version "1.2.11" @@ -15383,13 +15426,13 @@ web3-providers-ws@1.4.0: web3-core-helpers "1.4.0" websocket "^1.0.32" -web3-providers-ws@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.5.0.tgz#c78253af17dfdcd4f8a4c3a8ac1a684a73886ae7" - integrity sha512-TCwOhu5WbuQCSUoar+U+7N1NqI4A6MlcdZqsC7AhTogYYtnXOPRWfiHMZtUP7Qw50GKJ37FIH3YDItcHTNHd6A== +web3-providers-ws@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.5.1.tgz#7bad480704edc519a3e10c8045db7fdea85e0865" + integrity sha512-sCnznbJ6lp+dxMBhL9Ksj7+cmD8w+MIqEs3UWpfcJxxx1jLiO6VOIPBoQ2+NNb1L37m3TcLv/pAIf7dDDCGnJg== dependencies: eventemitter3 "4.0.4" - web3-core-helpers "1.5.0" + web3-core-helpers "1.5.1" websocket "^1.0.32" web3-shh@1.2.11: @@ -15412,15 +15455,15 @@ web3-shh@1.4.0: web3-core-subscriptions "1.4.0" web3-net "1.4.0" -web3-shh@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.5.0.tgz#eabf7c346605b107f51dfe5e6df9643a4b5eb7aa" - integrity sha512-TwpcxXNh+fBnyRcCPPqVqaCB4IjSpVL2/5OR2WwCnZwejs1ife+pej8DYVZWm0m1tSzIDRTdNbsJf/DN0cAxYQ== +web3-shh@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.5.1.tgz#ed3fe688d381afd2c9a14096716d7e1bd8e5f90d" + integrity sha512-lu2N5YkffVYBEmMAqoNqRCecBzFXPXEc13meVrS0L0/qLRtwDyZ1nm2x/fYO50bAtw5gLj2AZ6tBe57X9pzvhg== dependencies: - web3-core "1.5.0" - web3-core-method "1.5.0" - web3-core-subscriptions "1.5.0" - web3-net "1.5.0" + web3-core "1.5.1" + web3-core-method "1.5.1" + web3-core-subscriptions "1.5.1" + web3-net "1.5.1" web3-utils@1.2.11: version "1.2.11" @@ -15450,10 +15493,10 @@ web3-utils@1.4.0: underscore "1.12.1" utf8 "3.0.0" -web3-utils@1.5.0, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.5.0.tgz#48c8ba0d95694e73b9a6d473d955880cd4758e4a" - integrity sha512-hNyw7Oxi6TM3ivXmv4hK5Cvyi9ML3UoKtcCYvLF9woPWh5v2dwCCVO1U3Iq5HHK7Dqq28t1d4CxWHqUfOfAkgg== +web3-utils@1.5.1, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.5.1.tgz#d82087b43c0c0777dec5c44d375afcf1424417f4" + integrity sha512-U8ULaMBwjkp9Rn+kRLjUmgAUHwPqDrM5/Q9tPKgvuDKtMWUggTLC33/KF8RY+PyAhSAlnD+lmNGfZnbjmVKBxQ== dependencies: bn.js "^4.11.9" eth-lib "0.2.8" @@ -15489,18 +15532,18 @@ web3@1.4.0: web3-shh "1.4.0" web3-utils "1.4.0" -web3@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.5.0.tgz#2c1d8c910ce9c8c33ca4e5a130c02eda9c0f82bf" - integrity sha512-p6mOU+t11tV5Z0W9ISO2ReZlbB1ICp755ogl3OXOWZ+/oWy12wwnIva+z+ypsZc3P8gaoGaTvEwSfXM9NF164w== +web3@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.5.1.tgz#a69d8913a57f6fcbe13daf15412f83224eb3002e" + integrity sha512-qoXFBcnannngLR/BOgDvRcR1HxeG+fZPXaB2nle9xFUCdT7FjSBQcFG6LxZy+M2vHId7ONlbqSPLd2BbVLWVgA== dependencies: - web3-bzz "1.5.0" - web3-core "1.5.0" - web3-eth "1.5.0" - web3-eth-personal "1.5.0" - web3-net "1.5.0" - web3-shh "1.5.0" - web3-utils "1.5.0" + web3-bzz "1.5.1" + web3-core "1.5.1" + web3-eth "1.5.1" + web3-eth-personal "1.5.1" + web3-net "1.5.1" + web3-shh "1.5.1" + web3-utils "1.5.1" webidl-conversions@^6.1.0: version "6.1.0" @@ -15572,17 +15615,16 @@ which-pm-runs@^1.0.0: integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= which-typed-array@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" - integrity sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA== + version "1.1.6" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.6.tgz#f3713d801da0720a7f26f50c596980a9f5c8b383" + integrity sha512-DdY984dGD5sQ7Tf+x1CkXzdg85b9uEel6nr4UkFg1LoE9OXv3uRuZhe5CoWdawhGACeFpEZXH8fFLQnDhbpm/Q== dependencies: - available-typed-arrays "^1.0.2" - call-bind "^1.0.0" - es-abstract "^1.18.0-next.1" + available-typed-arrays "^1.0.4" + call-bind "^1.0.2" + es-abstract "^1.18.5" foreach "^2.0.5" - function-bind "^1.1.1" - has-symbols "^1.0.1" - is-typed-array "^1.1.3" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.6" which@1.3.1, which@^1.1.1, which@^1.2.9, which@^1.3.1: version "1.3.1" @@ -15859,7 +15901,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== @@ -15979,9 +16021,9 @@ yargs@16.2.0, yargs@^16.2.0: yargs-parser "^20.2.2" yargs@^17.0.1: - version "17.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb" - integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ== + version "17.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.1.0.tgz#0cd9827a0572c9a1795361c4d1530e53ada168cf" + integrity sha512-SQr7qqmQ2sNijjJGHL4u7t8vyDZdZ3Ahkmo4sc1w5xI9TBX0QDdG/g4SFnxtWOsGLjwHQue57eFALfwFCnixgg== dependencies: cliui "^7.0.2" escalade "^3.1.1" From 926c41ec167c104003b366a9587f68cfd5e6c476 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 10 Aug 2021 14:09:02 +0200 Subject: [PATCH 037/164] put comments to the norm --- packages/v3/components/Contracts.ts | 2 -- packages/v3/migration/engine/logger/logger.ts | 4 ++-- packages/v3/migration/tasks/migrate.ts | 16 ++++++++-------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 8ed77ea36..1755430e9 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -69,8 +69,6 @@ const deployOrAttachExternal = ( factoryConstructor: { new (signer?: Signer): F }, passedSigner?: Signer ): ContractBuilder => { - // const factory = new factoryConstructor(passedSigner); - return { contractName, deploy: async (...args: Parameters): Promise> => { diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger/logger.ts index 8cbccb850..dfeb83a2b 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger/logger.ts @@ -8,7 +8,7 @@ export const palette = { }; export const log = { - // Basic logging + // basic logging normal: (...str: string[]) => console.log(...str), info: (...str: string[]) => console.log(chalk.cyanBright(`⚠️ ${str}`)), done: (...str: string[]) => console.log(chalk.yellowBright(`${str}`)), @@ -18,7 +18,7 @@ export const log = { success: (...str: string[]) => console.log(chalk.greenBright(`${str}`)), error: (...str: string[]) => console.log(chalk.red(`⛔️ ${str}`)), - // Specific logging + // specific logging migrationConfig: (signerAddress: string, isLedger: boolean, executionSettings: executionSettings) => { palette.yellow(`**********************`); palette.yellow(`** Migration Config **`); diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index ff4fabef1..aef3bdd99 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -30,7 +30,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - // Save oldState + // save oldState const oldState = currentState; try { currentState.networkState = await migration.up( @@ -75,7 +75,7 @@ export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateP const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); - // If reset, delete all the files in the corresponding network folder + // if reset, delete all the files in the corresponding network folder if (args.reset) { log.info(`Resetting ${NETWORK_NAME} migratation folder`); fs.rmSync(pathToState, { @@ -84,12 +84,12 @@ export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateP }); } - // If network folder doesn't exist, create it + // if network folder doesn't exist, create it if (!fs.existsSync(pathToState)) { fs.mkdirSync(pathToState); } - // Read all files into the folder and fetch any state file + // read all files into the folder and fetch any state file const pathToStateFolder = fs.readdirSync(pathToState); const stateFile = pathToStateFolder.find((fileName: string) => fileName === 'state.json'); @@ -107,7 +107,7 @@ export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateP networkState: {} }; - // If network is a fork fetch info from original network + // if network is a fork fetch info from original network if (args.reset && MIGRATION_CONFIG.isFork) { try { log.info(`Fetching initial state from ${MIGRATION_CONFIG.originalNetwork}`); @@ -122,13 +122,13 @@ export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateP } } - // If there is no state file in the network's folder, create an empty one + // if there is no state file in the network's folder, create an empty one if (!stateFile) { writeState(state); } const initialState = fetchState(pathToState); - // Generate migration files + // generate migration files const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); @@ -146,7 +146,7 @@ export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateP } } - // Even if migrations should be automatically sorted by the dir fetching, sort again just in case + // even if migrations should be automatically sorted by the dir fetching, sort again just in case migrationsData.sort((a, b) => a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 ); From 8fad5f462a7f603488ec01ec5a01cafd76bdef8b Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 11 Aug 2021 15:47:53 +0200 Subject: [PATCH 038/164] fix dependency problem with @bancor/token-governance --- packages/v3/components/Contracts.ts | 2 +- packages/v3/migration/migrations/0_deploy_basics.ts | 1 - packages/v3/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 1755430e9..9abf4eba1 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -21,7 +21,7 @@ import { TokenHolderUpgradeable__factory, TransparentUpgradeableProxy__factory } from '../typechain'; -import { TokenGovernance__factory } from '@bancor/token-governance/typechain'; +import { TokenGovernance__factory } from '@bancor/token-governance'; import { Signer } from '@ethersproject/abstract-signer'; import { ContractFactory } from '@ethersproject/contracts'; import { ethers } from 'hardhat'; diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index d3e179523..70fb8d4be 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -44,7 +44,6 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); - if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) throw new OwnerNotSetOrCorrect(); if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) diff --git a/packages/v3/package.json b/packages/v3/package.json index 453f98e7c..60aed79af 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -41,7 +41,7 @@ "hardhat": "2.5.0" }, "devDependencies": { - "@bancor/token-governance": "^0.1.1", + "@bancor/token-governance": "^0.1.2", "@ethersproject/hardware-wallets": "^5.4.0", "@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-etherscan": "^2.1.4", diff --git a/yarn.lock b/yarn.lock index c05b86474..9ee784ec5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -254,10 +254,10 @@ "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" -"@bancor/token-governance@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.1.tgz#6bb04050774bc225058c5956b5c895a13d4f6a67" - integrity sha512-/tScBoOF98BtCCXwe0xrjaITDQxaoC4cLuuT+ic33B3dIB0T4/Ezz9/qcgvbM8qirNQr4rfBLxwgH/eSZmupOw== +"@bancor/token-governance@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.2.tgz#01f1ff04d422540170ed5d0e0bb9bc386c89a755" + integrity sha512-TMv4VJqQOSJzXyRhg3UsvlccE563n1yb0u+s+SGD/VryWFSPybOkEEXKwKNVZxqYLdpQxls0UqeDlvbpBRqtRw== "@bancor/token-governance@bancorprotocol/token-governance": version "0.1.1" From c626bd19d59e607bac181166623e80964f1fb1a7 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 13 Aug 2021 01:10:14 +0200 Subject: [PATCH 039/164] typos fix + update hh config --- packages/v3/hardhat.config.ts | 22 +++++++++++----------- packages/v3/migration/README.md | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index 3c3b89eba..8678c6890 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -22,7 +22,7 @@ const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(config const loadKey = (keyName: string) => { return configFile.keys ? (configFile.keys[keyName] ? configFile.keys[keyName] : undefined) : undefined; }; -const loadNetworkUrl = (networkName: string) => { +const getNetworkUrl = (networkName: string) => { return configFile.networks ? configFile.networks[networkName] ? configFile.networks[networkName].url @@ -31,7 +31,7 @@ const loadNetworkUrl = (networkName: string) => { : undefined : undefined; }; -const loadENV = (envKeyName: string) => { +const getEnvKey = (envKeyName: string) => { return process.env[envKeyName] as unknown as T; }; @@ -43,18 +43,18 @@ const MAINNET = 'mainnet'; type FORK_NETWORK_SUPPORTED = typeof MAINNET; export const FORK_CONFIG = (() => { - const networkToFork: string = loadENV('FORK'); - const urlNetworkToFork: string = loadNetworkUrl(networkToFork); + const networkToFork: string = getEnvKey('FORK'); + const urlNetworkToFork: string = getNetworkUrl(networkToFork); + + if (!networkToFork) { + return undefined; + } if (networkToFork && !urlNetworkToFork) { log.error(`${networkToFork} config is not present in the config.json file, aborting.`); process.exit(-1); } - if (!networkToFork && !urlNetworkToFork) { - return undefined; - } - let FORKED_NETWORK_NAME: string = ''; if (networkToFork === MAINNET) { FORKED_NETWORK_NAME = FORK_PREFIX + networkToFork; @@ -87,7 +87,7 @@ const hardhatForkedConfig = FORK_CONFIG } : undefined; -const ci = loadENV('CI'); +const ci = getEnvKey('CI'); const config: HardhatUserConfig = { networks: { @@ -142,13 +142,13 @@ const config: HardhatUserConfig = { gasReporter: { currency: 'USD', - enabled: loadENV('PROFILE') + enabled: getEnvKey('PROFILE') }, mocha: { timeout: 600000, color: true, - bail: loadENV('BAIL'), + bail: getEnvKey('BAIL'), grep: ci ? '' : '@stress', invert: ci ? false : true } diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index b69ddb335..cbc5030de 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -16,13 +16,13 @@ In each network folder there is a `state.json` file. It represents the migration ``` `latestMigration`: The timestamp of the latest ran migration. -`networkState`: Data that is passed to the migration file as initial state. +`networkState`: Initial migration state. ## Migrations -The `migrations` folder is home for all migrations file. +The `migrations` folder is home to all migration files. -A migration file is a typescript file that expose a particular object respecting a strict interface: +A migration file is a typescript file that exposes a particular object respecting a strict interface: ```ts export interface Migration { @@ -45,21 +45,21 @@ export interface Migration { The engine is the backbone of the migration system, containing its logic. -It also expose tasks and subtasks. +It also exposes tasks (task is a hardhat concept for CLI scripts). ### Tasks ##### Migrate -Migrate the system from point A to point B. +Migrates the system between different states. -`yarn migrate --help` for more info on params. +Call `yarn migrate --help` for more info on params. ### Subtasks ##### CreateMigration -Create a migration file based from a template. +Creates a migration file based on a template. `yarn create-migration --help` for more info on params. @@ -71,7 +71,7 @@ Create a migration file based from a template. yarn hh create-migration migrationFileName ``` -If you don't use this CLI to generate your migration files, bear in mind that they have to start by a number splitted from the rest of the name by the character '\_', like so: "999_testfile.ts". +If you don't use this CLI to generate your migration files, bear in mind that the format is as follow: "X_testfile.ts" with X representing the timestamp of the migration (i.e its order). ## How to execute a migration on a network? @@ -79,9 +79,9 @@ If you don't use this CLI to generate your migration files, bear in mind that th yarn hh migrate --network mainnet ``` -1. `Migrate` will look for the network data folder. If not it will create one. +1. `Migrate` will look for the network data folder or create one if it doesn't exist. -2. It will run every migration file from latestMigration timestamp to the latest in the migrations folder. +2. Run every migration file in the migrations folder by order of execution starting from the latestMigration timestamp OR the lowest number found. 3. Update the state on the go. From a729a8349413f3404a32f64e4a3d1b5bf83db1ce Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 23 Aug 2021 11:45:03 +0200 Subject: [PATCH 040/164] Update forking description --- packages/v3/migration/README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index cbc5030de..f929e5a37 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -89,9 +89,25 @@ yarn hh migrate --network mainnet Because of current Hardhat limitation it's not practical to launch a fork and run migration on it via the `hardhat.config.ts`. So we had to find a workaround. -To do so you have to execute the command by specifying the network in which you want to fork as an ENV variable. You'll also need to have the original network `state.json` file. Meaning that if you want to test a migration on a fork of the `mainnet` network you'll need to provide the correct state to the `mainnet` network folder. +To fork the network `mainnet` you need to: -In order for this to work you need to have in your `config.json` at the root of the `v3` repo in the `urls` object the url for the corresponding FORK value. Example: `"mainnet": "https://eth-mainnet.alchemyapi.io/v2/supersecretcode"` if you are forking mainnet, i.e: `FORK=mainnet yarn hh migrate`. +- Have in your `config.json` file (at the root of the `v3` package) the url for the `mainnet` network, like so: + +``` +{ + ..., + + "networks": { + "mainnet": { + "url": "https://eth-mainnet.alchemyapi.io/v2/supersecretkey" + } + } +} +``` + +- Provide the `state.json` file to the `mainnet` data folder. + +- Specify the network you want to fork as an ENV variable: `FORK=mainnet yarn hh migrate` ## What does a basic migration file looks like ? From d7a2c5bad9327bfc9772b7ea46b742e95d93166e Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 23 Aug 2021 12:09:58 +0200 Subject: [PATCH 041/164] WIP: typos --- packages/v3/migration/engine/errors/errors.ts | 2 +- packages/v3/migration/engine/executions.ts | 2 +- packages/v3/migration/engine/initialization.ts | 2 +- packages/v3/migration/engine/logger/logger.ts | 2 +- packages/v3/migration/migrations/0_deploy_basics.ts | 6 +++--- packages/v3/migration/migrations/1_deploy_proxyAdmin.ts | 4 ++-- .../v3/migration/migrations/2_deploy_networkSettings.ts | 4 ++-- packages/v3/migration/migrations/4_deploy_vault.ts | 4 ++-- .../v3/migration/migrations/6_deploy_pendingWithdrawals.ts | 4 ++-- .../migrations/7_deploy_liquidityPoolCollection.ts | 4 ++-- .../migrations/8_deploy_initializeBancorNetwork.ts | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/v3/migration/engine/errors/errors.ts b/packages/v3/migration/engine/errors/errors.ts index 5a9b71db6..a477bfe1d 100644 --- a/packages/v3/migration/engine/errors/errors.ts +++ b/packages/v3/migration/engine/errors/errors.ts @@ -17,7 +17,7 @@ export class MigrationError extends Error { } } -export class OwnerNotSetOrCorrect extends MigrationError { +export class InvalidOwner extends MigrationError { constructor() { super('Owner not set or correct'); } diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index c0e755e8b..f4fc13138 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -19,7 +19,7 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet log.executingTx(`Deploying contract \${${factory.contractName}}`); log.executingTx(`Params: [${args}]`); - log.normal(`Tx: `, contract.deployTransaction.hash); + log.normal(`Deployment Tx: `, contract.deployTransaction.hash); log.greyed(`Waiting to be mined...`); const receipt = await contract.deployTransaction.wait(executionSettings.confirmationToWait); diff --git a/packages/v3/migration/engine/initialization.ts b/packages/v3/migration/engine/initialization.ts index 072f088e2..71e31343b 100644 --- a/packages/v3/migration/engine/initialization.ts +++ b/packages/v3/migration/engine/initialization.ts @@ -40,7 +40,7 @@ export const initMigration = async (args: defaultMigrationArgs) => { !(migrationNetworkConfig.isFork || migrationNetworkConfig.networkName === 'hardhat') ) { throw new Error( - `Transaction confirmation should be defined or higher than 1 for ${migrationNetworkConfig.networkName} use. Aborting` + `Transaction confirmation should be higher than 1 for ${migrationNetworkConfig.networkName} use. Aborting` ); } diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger/logger.ts index dfeb83a2b..d2df1ed7a 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger/logger.ts @@ -28,7 +28,7 @@ export const log = { palette.white(` Signer: ${signerAddress} ${isLedger ? '(ledger)' : ''}`); palette.yellow(`Overrides:`); palette.white(` GasPrice: ${executionSettings.gasPrice} (gwei)`); - palette.yellow(`Execution Config:`); + palette.yellow(`Execution Setting:`); palette.white(` Confirmation to wait: ${executionSettings.confirmationToWait}`); palette.yellow(`********************`); } diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index 70fb8d4be..f074d169f 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -1,4 +1,4 @@ -import { OwnerNotSetOrCorrect } from '../../migration/engine/errors/errors'; +import { InvalidOwner } from '../../migration/engine/errors/errors'; import { deployedContract, Migration } from '../../migration/engine/types'; export type InitialState = {}; @@ -45,9 +45,9 @@ const migration: Migration = { const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new OwnerNotSetOrCorrect(); + throw new InvalidOwner(); if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new OwnerNotSetOrCorrect(); + throw new InvalidOwner(); }, down: async ( diff --git a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts index c0e3551ae..18b53e7ea 100644 --- a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts @@ -1,4 +1,4 @@ -import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './0_deploy_basics'; @@ -20,7 +20,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); - if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); }, down: async ( diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts index 44d104923..9bf8954d4 100644 --- a/packages/v3/migration/migrations/2_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -1,4 +1,4 @@ -import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './1_deploy_proxyAdmin'; @@ -22,7 +22,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings); - if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); }, down: async ( diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts index 7c652ffb4..dcb233cee 100644 --- a/packages/v3/migration/migrations/4_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -1,4 +1,4 @@ -import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './3_deploy_network'; @@ -23,7 +23,7 @@ const migration: Migration = { const bancorVault = await contracts.BancorVault.attach(state.vault); if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) - throw new OwnerNotSetOrCorrect(); + throw new InvalidOwner(); }, down: async ( diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index 32385f35e..25bcc57d9 100644 --- a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -1,4 +1,4 @@ -import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './5_deploy_networkTokenPool'; @@ -27,7 +27,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals); - if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); }, down: async ( diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index 11d32da34..87e4a710c 100644 --- a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -1,4 +1,4 @@ -import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './6_deploy_pendingWithdrawals'; @@ -19,7 +19,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const poolCollection = await contracts.PoolCollection.attach(state.poolCollection); - if ((await poolCollection.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + if ((await poolCollection.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); }, down: async ( diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index a228062ef..07638e364 100644 --- a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -1,4 +1,4 @@ -import { OwnerNotSetOrCorrect } from '../engine/errors/errors'; +import { InvalidOwner } from '../engine/errors/errors'; import { Migration } from '../engine/types'; import { NextState as InitialState } from './7_deploy_liquidityPoolCollection'; @@ -16,7 +16,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork); - if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new OwnerNotSetOrCorrect(); + if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); }, down: async ( From 3478a61d17c63f897bcc236b3adbd1861ce1bf61 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 23 Aug 2021 15:26:13 +0200 Subject: [PATCH 042/164] fix typos + add revert logic --- packages/v3/migration/README.md | 12 +++- packages/v3/migration/engine/errors/errors.ts | 10 ++++ packages/v3/migration/engine/types.ts | 1 + .../migration/migrations/0_deploy_basics.ts | 8 +-- .../migrations/1_deploy_proxyAdmin.ts | 2 +- .../migrations/2_deploy_networkSettings.ts | 2 +- .../migration/migrations/3_deploy_network.ts | 3 +- .../v3/migration/migrations/4_deploy_vault.ts | 2 +- .../migrations/5_deploy_networkTokenPool.ts | 2 +- .../migrations/6_deploy_pendingWithdrawals.ts | 2 +- .../7_deploy_liquidityPoolCollection.ts | 2 +- .../8_deploy_initializeBancorNetwork.ts | 2 +- .../v3/migration/tasks/createMigration.ts | 12 +++- packages/v3/migration/tasks/migrate.ts | 56 ++++++++++++++++--- 14 files changed, 93 insertions(+), 23 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index f929e5a37..641769526 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -128,7 +128,17 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: State, { deploy, execute }) => {} + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => {}, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; + } }; export default migration; ``` diff --git a/packages/v3/migration/engine/errors/errors.ts b/packages/v3/migration/engine/errors/errors.ts index a477bfe1d..bbc9d5817 100644 --- a/packages/v3/migration/engine/errors/errors.ts +++ b/packages/v3/migration/engine/errors/errors.ts @@ -8,6 +8,10 @@ export class ExecutionError extends Error { super('Execution Error'); this.receipt = receipt; this.tx = tx; + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ExecutionError); + } } } @@ -17,6 +21,12 @@ export class MigrationError extends Error { } } +export class InvalidRole extends MigrationError { + constructor() { + super('Invalid role'); + } +} + export class InvalidOwner extends MigrationError { constructor() { super('Owner not set or correct'); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index e417bbfcf..bfa8a53cd 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -24,6 +24,7 @@ export interface Migration { healthCheck: ( signer: Signer, contracts: Contracts, + initialState: any, newState: any, { deploy, execute, deployProxy }: executionFunctions ) => Promise; diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index f074d169f..8453b9457 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -1,4 +1,4 @@ -import { InvalidOwner } from '../../migration/engine/errors/errors'; +import { InvalidOwner, InvalidRole } from '../../migration/engine/errors/errors'; import { deployedContract, Migration } from '../../migration/engine/types'; export type InitialState = {}; @@ -41,13 +41,13 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new InvalidOwner(); + throw new InvalidRole(); if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new InvalidOwner(); + throw new InvalidRole(); }, down: async ( diff --git a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts index 18b53e7ea..8090e8423 100644 --- a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts @@ -17,7 +17,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts index 9bf8954d4..8c4f314a2 100644 --- a/packages/v3/migration/migrations/2_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -19,7 +19,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings); if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); diff --git a/packages/v3/migration/migrations/3_deploy_network.ts b/packages/v3/migration/migrations/3_deploy_network.ts index 96b19c301..4956e5d77 100644 --- a/packages/v3/migration/migrations/3_deploy_network.ts +++ b/packages/v3/migration/migrations/3_deploy_network.ts @@ -1,3 +1,4 @@ +import { InvalidRole } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './2_deploy_networkSettings'; @@ -24,7 +25,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => {}, + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => {}, down: async ( signer, diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts index dcb233cee..b563b97ce 100644 --- a/packages/v3/migration/migrations/4_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -19,7 +19,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const bancorVault = await contracts.BancorVault.attach(state.vault); if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) diff --git a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts index ecc529474..0f1cb7080 100644 --- a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts @@ -41,7 +41,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => {}, + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => {}, down: async ( signer, diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index 25bcc57d9..b09e77bd4 100644 --- a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -24,7 +24,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals); if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index 87e4a710c..7daed760a 100644 --- a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -16,7 +16,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const poolCollection = await contracts.PoolCollection.attach(state.poolCollection); if ((await poolCollection.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index 07638e364..fab0e060e 100644 --- a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -13,7 +13,7 @@ const migration: Migration = { return initialState; }, - healthCheck: async (signer, contracts, state: NextState, { deploy, execute }) => { + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork); if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts index 01dffc884..b8773d6ff 100644 --- a/packages/v3/migration/tasks/createMigration.ts +++ b/packages/v3/migration/tasks/createMigration.ts @@ -25,7 +25,17 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, state: State, { deploy, execute }) => {} + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => {}, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; + } }; export default migration; diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index aef3bdd99..52b44bb95 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -23,15 +23,18 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => return; } - for (let index = 0; index < migrationsData.length; index++) { + let index = 0; + let stateSaves: SystemState[] = []; + + for (; index < migrationsData.length; index++) { const migrationData = migrationsData[index]; const migration: Migration = importCsjOrEsModule(migrationData.fullPath); log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - // save oldState - const oldState = currentState; + // save + stateSaves.push(currentState); try { currentState.networkState = await migration.up( signer, @@ -41,12 +44,18 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => ); try { - await migration.healthCheck(signer, contracts, currentState.networkState, executionFunctions); + await migration.healthCheck( + signer, + contracts, + stateSaves[index].networkState, + currentState.networkState, + executionFunctions + ); log.success('Health check success ✨ '); } catch (e) { - log.error('Health check failed: ' + e); - // @TODO revert process here - return; + log.error('Health check failed'); + log.error(e.stack); + break; } // if health check passed, update the state and write it to the system @@ -56,12 +65,41 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => }; writeState(currentState); } catch (e) { - log.error('Migration execution failed: ' + e); - log.error('Aborting ...'); + log.error('Migration execution failed'); + log.error(e.stack); + log.error('Aborting.'); return; } } + // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert + if (index != migrationsData.length) { + log.executing('Reverting migration ...'); + + for (; index >= 0; index--) { + const migrationData = migrationsData[index]; + + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + + log.executing(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + + currentState.networkState = migration.down( + signer, + contracts, + stateSaves[index].networkState, + currentState.networkState, + executionFunctions + ); + + // if revert passed, update the state and write it to the system + currentState = { + migrationState: { latestMigration: stateSaves[index].migrationState.latestMigration }, + networkState: currentState.networkState + }; + writeState(currentState); + } + } + log.done(`Migration(s) complete ⚡️`); }; From 2310399148e52b200c3cc0ad8051079362f0ae03 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 24 Aug 2021 14:15:32 +0200 Subject: [PATCH 043/164] fix revert mechanism --- packages/v3/migration/tasks/migrate.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index 52b44bb95..c49047109 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -23,9 +23,11 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => return; } - let index = 0; let stateSaves: SystemState[] = []; + stateSaves.push({ ...initialState }); + + let index = 0; for (; index < migrationsData.length; index++) { const migrationData = migrationsData[index]; @@ -33,8 +35,6 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - // save - stateSaves.push(currentState); try { currentState.networkState = await migration.up( signer, @@ -63,7 +63,8 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => migrationState: { latestMigration: migrationData.migrationTimestamp }, networkState: currentState.networkState }; - writeState(currentState); + await writeState(currentState); + stateSaves.push({ ...currentState }); } catch (e) { log.error('Migration execution failed'); log.error(e.stack); @@ -75,15 +76,13 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert if (index != migrationsData.length) { log.executing('Reverting migration ...'); - for (; index >= 0; index--) { const migrationData = migrationsData[index]; + log.executing(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - log.executing(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - - currentState.networkState = migration.down( + currentState.networkState = await migration.down( signer, contracts, stateSaves[index].networkState, @@ -96,6 +95,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => migrationState: { latestMigration: stateSaves[index].migrationState.latestMigration }, networkState: currentState.networkState }; + writeState(currentState); } } From 4e8fc90949c137ac71e426e6442a2d5e28a5a4d2 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 26 Aug 2021 15:16:53 +0200 Subject: [PATCH 044/164] fix typos + improve log function --- packages/v3/components/Contracts.ts | 18 +++++++++--------- packages/v3/migration/README.md | 8 ++++++++ packages/v3/migration/engine/logger/logger.ts | 2 +- packages/v3/migration/tasks/migrate.ts | 6 +++--- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 9abf4eba1..d674ac365 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -37,20 +37,20 @@ export type Contract = AsyncReturnType; export interface ContractBuilder { contractName: string; deploy(...args: Parameters): Promise>; - attach(address: string, passedSigner?: Signer): Promise>; + attach(address: string, signer?: Signer): Promise>; } -const deployOrAttach = (contractName: string, passedSigner?: Signer): ContractBuilder => { +const deployOrAttach = (contractName: string, signer?: Signer): ContractBuilder => { return { contractName, deploy: async (...args: Parameters): Promise> => { - let defaultSigner = passedSigner ? passedSigner : (await ethers.getSigners())[0]; + let defaultSigner = signer ? signer : (await ethers.getSigners())[0]; return (await ethers.getContractFactory(contractName, defaultSigner)).deploy( ...(args || []) ) as Contract; }, - attach: attachOnly(contractName, passedSigner).attach + attach: attachOnly(contractName, signer).attach }; }; @@ -67,26 +67,26 @@ const deployOrAttachExternal = ( contractName: string, // @TODO: needs to replace with correctly typed params but it doesn't work properly for some reason https://github.com/microsoft/TypeScript/issues/31278 factoryConstructor: { new (signer?: Signer): F }, - passedSigner?: Signer + initialPassedSigner?: Signer ): ContractBuilder => { return { contractName, deploy: async (...args: Parameters): Promise> => { - let defaultSigner = passedSigner ? passedSigner : (await ethers.getSigners())[0]; + let defaultSigner = initialPassedSigner ? initialPassedSigner : (await ethers.getSigners())[0]; return new factoryConstructor(defaultSigner).deploy(...(args || [])) as Contract; }, - attach: attachOnlyExternal(factoryConstructor, passedSigner).attach + attach: attachOnlyExternal(factoryConstructor, initialPassedSigner).attach }; }; const attachOnlyExternal = ( factoryConstructor: { new (signer?: Signer): F }, - passedSigner?: Signer + initialPassedSigner?: Signer ) => { return { attach: async (address: string, signer?: Signer): Promise> => { - let defaultSigner = passedSigner ? passedSigner : (await ethers.getSigners())[0]; + let defaultSigner = initialPassedSigner ? initialPassedSigner : (await ethers.getSigners())[0]; return new factoryConstructor(signer || defaultSigner).attach(address) as Contract; } }; diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 641769526..2d0f87975 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -35,9 +35,17 @@ export interface Migration { healthCheck: ( signer: Signer, contracts: Contracts, + initialState: any, newState: any, { deploy, execute, deployProxy }: executionFunctions ) => Promise; + down: ( + signer: Signer, + contracts: Contracts, + initialState: any, + newState: any, + { deploy, execute, deployProxy }: executionFunctions + ) => Promise<{}>; } ``` diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger/logger.ts index d2df1ed7a..4da9f634c 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger/logger.ts @@ -12,7 +12,7 @@ export const log = { normal: (...str: string[]) => console.log(...str), info: (...str: string[]) => console.log(chalk.cyanBright(`⚠️ ${str}`)), done: (...str: string[]) => console.log(chalk.yellowBright(`${str}`)), - executing: (...str: string[]) => console.log(chalk.blue(`${str}`)), + processing: (...str: string[]) => console.log(chalk.blue(`${str}`)), executingTx: (...str: string[]) => console.log(chalk.yellow(`${str}`)), greyed: (...str: string[]) => console.log(chalk.grey(`${str}`)), success: (...str: string[]) => console.log(chalk.greenBright(`${str}`)), diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index c49047109..d36545134 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -33,7 +33,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - log.executing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + log.processing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); try { currentState.networkState = await migration.up( @@ -75,10 +75,10 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert if (index != migrationsData.length) { - log.executing('Reverting migration ...'); + log.processing('Reverting migration ...'); for (; index >= 0; index--) { const migrationData = migrationsData[index]; - log.executing(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + log.processing(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); const migration: Migration = importCsjOrEsModule(migrationData.fullPath); From 2594e5b0ae20cd3e6925ae08748ac91ad6ad74e2 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 26 Aug 2021 16:15:32 +0200 Subject: [PATCH 045/164] remove custom errors on migration executions --- .../v3/migration/engine/{errors => }/errors.ts | 18 ------------------ packages/v3/migration/engine/executions.ts | 2 +- .../v3/migration/migrations/0_deploy_basics.ts | 5 ++--- .../migrations/1_deploy_proxyAdmin.ts | 3 +-- .../migrations/2_deploy_networkSettings.ts | 3 +-- .../migration/migrations/3_deploy_network.ts | 1 - .../v3/migration/migrations/4_deploy_vault.ts | 3 +-- .../migrations/6_deploy_pendingWithdrawals.ts | 3 +-- .../7_deploy_liquidityPoolCollection.ts | 3 +-- .../8_deploy_initializeBancorNetwork.ts | 3 +-- 10 files changed, 9 insertions(+), 35 deletions(-) rename packages/v3/migration/engine/{errors => }/errors.ts (56%) diff --git a/packages/v3/migration/engine/errors/errors.ts b/packages/v3/migration/engine/errors.ts similarity index 56% rename from packages/v3/migration/engine/errors/errors.ts rename to packages/v3/migration/engine/errors.ts index bbc9d5817..c5fa3da67 100644 --- a/packages/v3/migration/engine/errors/errors.ts +++ b/packages/v3/migration/engine/errors.ts @@ -14,21 +14,3 @@ export class ExecutionError extends Error { } } } - -export class MigrationError extends Error { - constructor(msg: string) { - super('Migration Error: ' + msg); - } -} - -export class InvalidRole extends MigrationError { - constructor() { - super('Invalid role'); - } -} - -export class InvalidOwner extends MigrationError { - constructor() { - super('Owner not set or correct'); - } -} diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index f4fc13138..a923cf60b 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -1,6 +1,6 @@ import Contracts, { ContractBuilder, Contract } from '../../components/Contracts'; import { ProxyAdmin } from '../../typechain'; -import { ExecutionError } from './errors/errors'; +import { ExecutionError } from './errors'; import { executionSettings } from './initialization'; import { log } from './logger/logger'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index 8453b9457..63f4fc1a5 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -1,4 +1,3 @@ -import { InvalidOwner, InvalidRole } from '../../migration/engine/errors/errors'; import { deployedContract, Migration } from '../../migration/engine/types'; export type InitialState = {}; @@ -45,9 +44,9 @@ const migration: Migration = { const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new InvalidRole(); + throw 'Invalid Role'; if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new InvalidRole(); + throw 'Invalid Role'; }, down: async ( diff --git a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts index 8090e8423..549d5b366 100644 --- a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts @@ -1,4 +1,3 @@ -import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './0_deploy_basics'; @@ -20,7 +19,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); - if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); + if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; }, down: async ( diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts index 8c4f314a2..0ed0c4c71 100644 --- a/packages/v3/migration/migrations/2_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -1,4 +1,3 @@ -import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './1_deploy_proxyAdmin'; @@ -22,7 +21,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings); - if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); + if ((await networkSettings.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; }, down: async ( diff --git a/packages/v3/migration/migrations/3_deploy_network.ts b/packages/v3/migration/migrations/3_deploy_network.ts index 4956e5d77..5bbe2fad0 100644 --- a/packages/v3/migration/migrations/3_deploy_network.ts +++ b/packages/v3/migration/migrations/3_deploy_network.ts @@ -1,4 +1,3 @@ -import { InvalidRole } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './2_deploy_networkSettings'; diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts index b563b97ce..6d301c7da 100644 --- a/packages/v3/migration/migrations/4_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -1,4 +1,3 @@ -import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './3_deploy_network'; @@ -23,7 +22,7 @@ const migration: Migration = { const bancorVault = await contracts.BancorVault.attach(state.vault); if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) - throw new InvalidOwner(); + throw 'Invalid Owner'; }, down: async ( diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index b09e77bd4..fc27b78ed 100644 --- a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -1,4 +1,3 @@ -import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './5_deploy_networkTokenPool'; @@ -27,7 +26,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals); - if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); + if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; }, down: async ( diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index 7daed760a..e581f9ba0 100644 --- a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -1,4 +1,3 @@ -import { InvalidOwner } from '../engine/errors/errors'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './6_deploy_pendingWithdrawals'; @@ -19,7 +18,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const poolCollection = await contracts.PoolCollection.attach(state.poolCollection); - if ((await poolCollection.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); + if ((await poolCollection.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; }, down: async ( diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index fab0e060e..6ce2ad9de 100644 --- a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -1,4 +1,3 @@ -import { InvalidOwner } from '../engine/errors/errors'; import { Migration } from '../engine/types'; import { NextState as InitialState } from './7_deploy_liquidityPoolCollection'; @@ -16,7 +15,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork); - if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new InvalidOwner(); + if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; }, down: async ( From f5411ab0c31bd06799340dac311852f62096a0b5 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 30 Aug 2021 15:19:54 +0200 Subject: [PATCH 046/164] typos --- packages/v3/components/Contracts.ts | 10 +++++----- packages/v3/migration/engine/executions.ts | 2 +- packages/v3/migration/engine/initialization.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index d674ac365..cce367b50 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -67,26 +67,26 @@ const deployOrAttachExternal = ( contractName: string, // @TODO: needs to replace with correctly typed params but it doesn't work properly for some reason https://github.com/microsoft/TypeScript/issues/31278 factoryConstructor: { new (signer?: Signer): F }, - initialPassedSigner?: Signer + initialSigner?: Signer ): ContractBuilder => { return { contractName, deploy: async (...args: Parameters): Promise> => { - let defaultSigner = initialPassedSigner ? initialPassedSigner : (await ethers.getSigners())[0]; + let defaultSigner = initialSigner ? initialSigner : (await ethers.getSigners())[0]; return new factoryConstructor(defaultSigner).deploy(...(args || [])) as Contract; }, - attach: attachOnlyExternal(factoryConstructor, initialPassedSigner).attach + attach: attachOnlyExternal(factoryConstructor, initialSigner).attach }; }; const attachOnlyExternal = ( factoryConstructor: { new (signer?: Signer): F }, - initialPassedSigner?: Signer + initialSigner?: Signer ) => { return { attach: async (address: string, signer?: Signer): Promise> => { - let defaultSigner = initialPassedSigner ? initialPassedSigner : (await ethers.getSigners())[0]; + let defaultSigner = initialSigner ? initialSigner : (await ethers.getSigners())[0]; return new factoryConstructor(signer || defaultSigner).attach(address) as Contract; } }; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index a923cf60b..e0a1b5190 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -17,7 +17,7 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet ): Promise['deploy']>> => { const contract = await factory.deploy(...([...args, overrides] as any)); - log.executingTx(`Deploying contract \${${factory.contractName}}`); + log.executingTx(`Deploying contract ${factory.contractName}`); log.executingTx(`Params: [${args}]`); log.normal(`Deployment Tx: `, contract.deployTransaction.hash); diff --git a/packages/v3/migration/engine/initialization.ts b/packages/v3/migration/engine/initialization.ts index 71e31343b..199dca277 100644 --- a/packages/v3/migration/engine/initialization.ts +++ b/packages/v3/migration/engine/initialization.ts @@ -11,7 +11,7 @@ export type defaultMigrationArgs = { ledger: boolean; ledgerPath: string; gasPrice: number; - confirmationToWait: number; + minBlockConfirmations: number; }; export type executionSettings = { gasPrice?: BigNumberish; confirmationToWait: number }; @@ -32,7 +32,7 @@ export const initMigration = async (args: defaultMigrationArgs) => { // init execution settings const executionSettings: executionSettings = { - confirmationToWait: args.confirmationToWait + confirmationToWait: args.minBlockConfirmations }; if ( From 3cba5a1bbb1276fa14653436f42d46735817c2d1 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 30 Aug 2021 19:55:08 +0200 Subject: [PATCH 047/164] update throw errors + typos + add upgradeProxy --- packages/v3/migration/README.md | 26 +++++++++------ packages/v3/migration/engine/executions.ts | 33 +++++++++++++++++-- .../migration/migrations/0_deploy_basics.ts | 4 +-- .../migrations/1_deploy_proxyAdmin.ts | 2 +- .../migrations/2_deploy_networkSettings.ts | 2 +- .../v3/migration/migrations/4_deploy_vault.ts | 2 +- .../migrations/6_deploy_pendingWithdrawals.ts | 2 +- .../7_deploy_liquidityPoolCollection.ts | 2 +- .../8_deploy_initializeBancorNetwork.ts | 2 +- 9 files changed, 55 insertions(+), 20 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 2d0f87975..3461876e9 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -1,6 +1,12 @@ # Migration -## Data +## Roadmap + +- [x] Ledger support +- [x] Deploy proxy +- [x] Upgrade proxy + +### Data The `data` folder consists of one designated folder per network. @@ -18,7 +24,7 @@ In each network folder there is a `state.json` file. It represents the migration `latestMigration`: The timestamp of the latest ran migration. `networkState`: Initial migration state. -## Migrations +### Migrations The `migrations` folder is home to all migration files. @@ -49,13 +55,13 @@ export interface Migration { } ``` -## Engine +### Engine The engine is the backbone of the migration system, containing its logic. It also exposes tasks (task is a hardhat concept for CLI scripts). -### Tasks +#### Tasks ##### Migrate @@ -63,7 +69,7 @@ Migrates the system between different states. Call `yarn migrate --help` for more info on params. -### Subtasks +#### Subtasks ##### CreateMigration @@ -71,9 +77,9 @@ Creates a migration file based on a template. `yarn create-migration --help` for more info on params. -# Getting started +## Getting started -## How to create a migration file ? +### How to create a migration file ? ``` yarn hh create-migration migrationFileName @@ -81,7 +87,7 @@ yarn hh create-migration migrationFileName If you don't use this CLI to generate your migration files, bear in mind that the format is as follow: "X_testfile.ts" with X representing the timestamp of the migration (i.e its order). -## How to execute a migration on a network? +### How to execute a migration on a network? ``` yarn hh migrate --network mainnet @@ -93,7 +99,7 @@ yarn hh migrate --network mainnet 3. Update the state on the go. -## How to run the migration on a fork ? +### How to run the migration on a fork ? Because of current Hardhat limitation it's not practical to launch a fork and run migration on it via the `hardhat.config.ts`. So we had to find a workaround. @@ -117,7 +123,7 @@ To fork the network `mainnet` you need to: - Specify the network you want to fork as an ENV variable: `FORK=mainnet yarn hh migrate` -## What does a basic migration file looks like ? +### What does a basic migration file looks like ? ```ts import { deployedContract, Migration } from 'migration/engine/types'; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index e0a1b5190..d817ad97f 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -29,7 +29,7 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet throw new ExecutionError(contract.deployTransaction, receipt); } - log.success(`Deployed \${${factory.contractName}} at ${contract.address} 🚀 !`); + log.success(`Deployed ${factory.contractName} at ${contract.address} 🚀 !`); return contract; }; @@ -77,9 +77,38 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet return await logicContractToDeploy.attach(proxy.address); }; + const upgradeProxy = async ( + admin: ProxyAdmin, + logicContractToDeploy: ContractBuilder, + proxyAddress: string, + initializeArgs: + | { + params: Parameters; + initializeFctName: string; + } + | 'skipInit', + ...ctorArgs: Parameters + ): Promise> => { + const newLogicContract = await deploy(logicContractToDeploy, ...ctorArgs); + + const data = + initializeArgs === 'skipInit' + ? [] + : newLogicContract.interface.encodeFunctionData( + initializeArgs.initializeFctName, + initializeArgs.params + ); + + if (initializeArgs === 'skipInit') await admin.upgrade(proxyAddress, newLogicContract.address); + else await admin.upgradeAndCall(proxyAddress, newLogicContract.address, data); + + return await logicContractToDeploy.attach(proxyAddress); + }; + return { deploy, execute, - deployProxy + deployProxy, + upgradeProxy }; }; diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index 63f4fc1a5..311071ad9 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -44,9 +44,9 @@ const migration: Migration = { const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw 'Invalid Role'; + throw new Error('Invalid Role'); if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw 'Invalid Role'; + throw new Error('Invalid Role'); }, down: async ( diff --git a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts index 549d5b366..98d45f028 100644 --- a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts @@ -19,7 +19,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); - if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; + if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, down: async ( diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts index 0ed0c4c71..aec1df075 100644 --- a/packages/v3/migration/migrations/2_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -21,7 +21,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings); - if ((await networkSettings.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; + if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, down: async ( diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts index 6d301c7da..b3dbae644 100644 --- a/packages/v3/migration/migrations/4_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -22,7 +22,7 @@ const migration: Migration = { const bancorVault = await contracts.BancorVault.attach(state.vault); if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) - throw 'Invalid Owner'; + throw new Error('Invalid Owner'); }, down: async ( diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index fc27b78ed..faaacab47 100644 --- a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -26,7 +26,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals); - if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; + if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, down: async ( diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index e581f9ba0..35a313e5b 100644 --- a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -18,7 +18,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const poolCollection = await contracts.PoolCollection.attach(state.poolCollection); - if ((await poolCollection.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; + if ((await poolCollection.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, down: async ( diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index 6ce2ad9de..295fd06aa 100644 --- a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -15,7 +15,7 @@ const migration: Migration = { healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork); - if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw 'Invalid Owner'; + if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, down: async ( From d6484afbf0d9901ad40e7f3b9b7b6115511f5a60 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 1 Sep 2021 01:18:33 +0200 Subject: [PATCH 048/164] Improve logs --- packages/v3/migration/engine/executions.ts | 71 +++++++++++-------- .../v3/migration/engine/initialization.ts | 2 +- packages/v3/migration/engine/logger/logger.ts | 42 +++++++++-- packages/v3/migration/engine/types.ts | 3 +- .../migrations/2_deploy_networkSettings.ts | 11 +-- .../migration/migrations/3_deploy_network.ts | 11 +-- .../v3/migration/migrations/4_deploy_vault.ts | 11 +-- .../migrations/5_deploy_networkTokenPool.ts | 17 +++-- .../migrations/6_deploy_pendingWithdrawals.ts | 15 ++-- .../7_deploy_liquidityPoolCollection.ts | 2 +- .../8_deploy_initializeBancorNetwork.ts | 10 ++- packages/v3/migration/tasks/migrate.ts | 10 +-- 12 files changed, 133 insertions(+), 72 deletions(-) diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index d817ad97f..77e3359ce 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -4,7 +4,7 @@ import { ExecutionError } from './errors'; import { executionSettings } from './initialization'; import { log } from './logger/logger'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -import { BaseContract, ContractFactory, Overrides } from 'ethers'; +import { ContractFactory, Overrides } from 'ethers'; export const initExecutionFunctions = (contracts: typeof Contracts, executionSettings: executionSettings) => { const overrides: Overrides = { @@ -15,15 +15,14 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet factory: ContractBuilder, ...args: Parameters['deploy']> ): Promise['deploy']>> => { - const contract = await factory.deploy(...([...args, overrides] as any)); + log.basicExecutionHeader('Deploying', `${factory.contractName} 🚀 `, args); - log.executingTx(`Deploying contract ${factory.contractName}`); - log.executingTx(`Params: [${args}]`); - log.normal(`Deployment Tx: `, contract.deployTransaction.hash); + const contract = await factory.deploy(...([...args, overrides] as any)); + log.debug(`Deployment Tx: `, contract.deployTransaction.hash); log.greyed(`Waiting to be mined...`); - const receipt = await contract.deployTransaction.wait(executionSettings.confirmationToWait); + const receipt = await contract.deployTransaction.wait(executionSettings.confirmationToWait); if (receipt.status !== 1) { log.error(`Error while executing`); throw new ExecutionError(contract.deployTransaction, receipt); @@ -38,9 +37,10 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet func: T, ...args: Parameters ): Promise => { + log.basicExecutionHeader('Executing', executionInstruction, args); + const tx = await func(...args, overrides); - log.normal(executionInstruction); - log.normal(`Executing tx: `, tx.hash); + log.debug(`Executing tx: `, tx.hash); const receipt = await tx.wait(executionSettings.confirmationToWait); if (receipt.status !== 1) { @@ -53,28 +53,28 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet }; type initializeArgs = Parameters | 'skipInit'; + type proxy = { proxy: Contract; logicContractAddress: string }; const deployProxy = async ( admin: ProxyAdmin, logicContractToDeploy: ContractBuilder, initializeArgs: initializeArgs, ...ctorArgs: Parameters - ): Promise> => { - const createTransparentProxy = async ( - admin: BaseContract, - logicContract: BaseContract, - initializeArgs: initializeArgs = [] - ) => { - const data = - initializeArgs === 'skipInit' - ? [] - : logicContract.interface.encodeFunctionData('initialize', initializeArgs); - - return await deploy(contracts.TransparentUpgradeableProxy, logicContract.address, admin.address, data); - }; - + ): Promise> => { + log.debug('Deploying proxy'); const logicContract = await deploy(logicContractToDeploy, ...ctorArgs); - const proxy = await createTransparentProxy(admin, logicContract, initializeArgs); - return await logicContractToDeploy.attach(proxy.address); + + const data = + initializeArgs === 'skipInit' + ? [] + : logicContract.interface.encodeFunctionData('initialize', initializeArgs); + + const proxy = await deploy(contracts.TransparentUpgradeableProxy, logicContract.address, admin.address, data); + + log.success('Proxy deployed 🚀 '); + return { + proxy: await logicContractToDeploy.attach(proxy.address), + logicContractAddress: logicContract.address + }; }; const upgradeProxy = async ( @@ -88,7 +88,8 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet } | 'skipInit', ...ctorArgs: Parameters - ): Promise> => { + ): Promise> => { + log.debug('Upgrading proxy'); const newLogicContract = await deploy(logicContractToDeploy, ...ctorArgs); const data = @@ -99,10 +100,22 @@ export const initExecutionFunctions = (contracts: typeof Contracts, executionSet initializeArgs.params ); - if (initializeArgs === 'skipInit') await admin.upgrade(proxyAddress, newLogicContract.address); - else await admin.upgradeAndCall(proxyAddress, newLogicContract.address, data); - - return await logicContractToDeploy.attach(proxyAddress); + if (initializeArgs === 'skipInit') + await execute('Upgrading proxy', admin.upgrade, proxyAddress, newLogicContract.address); + else + await execute( + `Upgrading proxy and call ${initializeArgs.initializeFctName}`, + admin.upgradeAndCall, + proxyAddress, + newLogicContract.address, + data + ); + + log.success('Proxy upgraded 🚀 '); + return { + proxy: await logicContractToDeploy.attach(proxyAddress), + logicContractAddress: newLogicContract.address + }; }; return { diff --git a/packages/v3/migration/engine/initialization.ts b/packages/v3/migration/engine/initialization.ts index 199dca277..143d496e7 100644 --- a/packages/v3/migration/engine/initialization.ts +++ b/packages/v3/migration/engine/initialization.ts @@ -55,7 +55,7 @@ export const initMigration = async (args: defaultMigrationArgs) => { // init execution functions const executionFunctions = initExecutionFunctions(contracts, executionSettings); - log.migrationConfig(await signer.getAddress(), args.ledger, executionSettings); + log.migrationConfig(await signer.getAddress(), networkName, args.ledger, executionSettings); return { signer, diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger/logger.ts index 4da9f634c..e296fa6ce 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger/logger.ts @@ -10,21 +10,49 @@ export const palette = { export const log = { // basic logging normal: (...str: string[]) => console.log(...str), - info: (...str: string[]) => console.log(chalk.cyanBright(`⚠️ ${str}`)), - done: (...str: string[]) => console.log(chalk.yellowBright(`${str}`)), - processing: (...str: string[]) => console.log(chalk.blue(`${str}`)), - executingTx: (...str: string[]) => console.log(chalk.yellow(`${str}`)), - greyed: (...str: string[]) => console.log(chalk.grey(`${str}`)), - success: (...str: string[]) => console.log(chalk.greenBright(`${str}`)), + warning: (...str: string[]) => console.log(chalk.cyanBright(`⚠️ ${str}`)), + info: (...str: string[]) => console.log(chalk.rgb(0, 0, 0).bgWhiteBright(`\n${str}`)), + done: (...str: string[]) => console.log(chalk.yellowBright(...str)), + // + execute: (...str: string[]) => console.log(chalk.rgb(255, 165, 51).italic(...str)), + debug: (...str: string[]) => console.log(chalk.rgb(123, 104, 238).italic(...str)), + // + basicExecutionHeader: (head: string, body: string, args: any[]) => { + let space = ' '; + for (let i = 0; i < head.length; i++) space += ' '; + + return console.log( + chalk.underline.rgb( + 255, + 165, + 51 + )( + `${head}:` + + chalk.reset(` `) + + chalk.reset.bold.rgb(255, 215, 51)(`${body}` + `\n${space}Params: [${args}]`) + ) + ); + }, + executionInfo: (...str: string[]) => console.log(chalk.rgb(255, 215, 51)(...str)), + // + processing: (...str: string[]) => console.log(chalk.blue(...str)), + greyed: (...str: string[]) => console.log(chalk.grey(...str)), + success: (...str: string[]) => console.log(chalk.greenBright(...str)), error: (...str: string[]) => console.log(chalk.red(`⛔️ ${str}`)), // specific logging - migrationConfig: (signerAddress: string, isLedger: boolean, executionSettings: executionSettings) => { + migrationConfig: ( + signerAddress: string, + networkName: string, + isLedger: boolean, + executionSettings: executionSettings + ) => { palette.yellow(`**********************`); palette.yellow(`** Migration Config **`); palette.yellow(`**********************`); palette.yellow(`Basic info`); + palette.white(` Network: ${networkName}`); palette.white(` Signer: ${signerAddress} ${isLedger ? '(ledger)' : ''}`); palette.yellow(`Overrides:`); palette.white(` GasPrice: ${executionSettings.gasPrice} (gwei)`); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index bfa8a53cd..8e652af42 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -10,7 +10,8 @@ export type SystemState = { }; export type deployedContract = string; -export type deployedProxy = deployedContract; + +export type deployedProxy = { proxyContract: deployedContract; logicContract: deployedContract }; export type executionFunctions = ReturnType; diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts index aec1df075..7b0eec5eb 100644 --- a/packages/v3/migration/migrations/2_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -1,8 +1,8 @@ -import { deployedContract, Migration } from '../engine/types'; +import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './1_deploy_proxyAdmin'; export type NextState = InitialState & { - networkSettings: deployedContract; + networkSettings: deployedProxy; }; const migration: Migration = { @@ -14,12 +14,15 @@ const migration: Migration = { return { ...initialState, - networkSettings: networkSettings.address + networkSettings: { + proxyContract: networkSettings.proxy.address, + logicContract: networkSettings.logicContractAddress + } }; }, healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { - const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings); + const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings.proxyContract); if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, diff --git a/packages/v3/migration/migrations/3_deploy_network.ts b/packages/v3/migration/migrations/3_deploy_network.ts index 5bbe2fad0..a75b6b3ba 100644 --- a/packages/v3/migration/migrations/3_deploy_network.ts +++ b/packages/v3/migration/migrations/3_deploy_network.ts @@ -1,8 +1,8 @@ -import { deployedContract, Migration } from '../engine/types'; +import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './2_deploy_networkSettings'; export type NextState = InitialState & { - bancorNetwork: deployedContract; + bancorNetwork: deployedProxy; }; const migration: Migration = { @@ -14,13 +14,16 @@ const migration: Migration = { contracts.BancorNetwork, 'skipInit', initialState.BNT.token, - initialState.networkSettings + initialState.networkSettings.proxyContract ); return { ...initialState, - bancorNetwork: bancorNetwork.address + bancorNetwork: { + proxyContract: bancorNetwork.proxy.address, + logicContract: bancorNetwork.logicContractAddress + } }; }, diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts index b3dbae644..5319e2d75 100644 --- a/packages/v3/migration/migrations/4_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -1,8 +1,8 @@ -import { deployedContract, Migration } from '../engine/types'; +import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './3_deploy_network'; export type NextState = InitialState & { - vault: deployedContract; + vault: deployedProxy; }; const migration: Migration = { @@ -14,12 +14,15 @@ const migration: Migration = { return { ...initialState, - vault: bancorVault.address + vault: { + proxyContract: bancorVault.proxy.address, + logicContract: bancorVault.logicContractAddress + } }; }, healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { - const bancorVault = await contracts.BancorVault.attach(state.vault); + const bancorVault = await contracts.BancorVault.attach(state.vault.proxyContract); if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) throw new Error('Invalid Owner'); diff --git a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts index 0f1cb7080..88c959fcb 100644 --- a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts @@ -1,9 +1,9 @@ import { NETWORK_TOKEN_POOL_TOKEN_NAME, NETWORK_TOKEN_POOL_TOKEN_SYMBOL } from '../../test/helpers/Constants'; -import { deployedContract, Migration } from '../engine/types'; +import { deployedContract, deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './4_deploy_vault'; export type NextState = InitialState & { - networkTokenPool: deployedContract; + networkTokenPool: deployedProxy; networkTokenPoolToken: deployedContract; }; @@ -21,22 +21,25 @@ const migration: Migration = { proxyAdmin, contracts.TestNetworkTokenPool, 'skipInit', - initialState.networkSettings, - initialState.vault, + initialState.networkSettings.proxyContract, + initialState.vault.proxyContract, networkTokenPoolToken.address ); await execute( 'Transfer token ownership to NetworkTokenPool', networkTokenPoolToken.transferOwnership, - networkTokenPool.address + networkTokenPool.proxy.address ); - await execute('Initialize NetworkTokenPool', networkTokenPool.initialize); + await execute('Initialize NetworkTokenPool', networkTokenPool.proxy.initialize); return { ...initialState, - networkTokenPool: networkTokenPool.address, + networkTokenPool: { + proxyContract: networkTokenPool.proxy.address, + logicContract: networkTokenPool.logicContractAddress + }, networkTokenPoolToken: networkTokenPoolToken.address }; }, diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index faaacab47..0cdd62d07 100644 --- a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -1,8 +1,8 @@ -import { deployedContract, Migration } from '../engine/types'; +import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './5_deploy_networkTokenPool'; export type NextState = InitialState & { - pendingWithdrawals: deployedContract; + pendingWithdrawals: deployedProxy; }; const migration: Migration = { @@ -13,18 +13,21 @@ const migration: Migration = { proxyAdmin, contracts.TestPendingWithdrawals, [], - initialState.bancorNetwork, - initialState.networkTokenPool + initialState.bancorNetwork.proxyContract, + initialState.networkTokenPool.proxyContract ); return { ...initialState, - pendingWithdrawals: pendingWithdrawals.address + pendingWithdrawals: { + proxyContract: pendingWithdrawals.proxy.address, + logicContract: pendingWithdrawals.logicContractAddress + } }; }, healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { - const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals); + const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals.proxyContract); if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index 35a313e5b..912e7a67d 100644 --- a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -7,7 +7,7 @@ export type NextState = InitialState & { const migration: Migration = { up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { - const poolCollection = await deploy(contracts.TestPoolCollection, initialState.bancorNetwork); + const poolCollection = await deploy(contracts.TestPoolCollection, initialState.bancorNetwork.proxyContract); return { ...initialState, diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index 295fd06aa..0037e86a8 100644 --- a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -5,15 +5,19 @@ export type NextState = InitialState; const migration: Migration = { up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { - const bancorNetwork = await contracts.BancorNetwork.attach(initialState.bancorNetwork); + const bancorNetwork = await contracts.BancorNetwork.attach(initialState.bancorNetwork.proxyContract); - await execute('Initialize BancorNetwork', bancorNetwork.initialize, initialState.pendingWithdrawals); + await execute( + 'Initialize BancorNetwork', + bancorNetwork.initialize, + initialState.pendingWithdrawals.proxyContract + ); return initialState; }, healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { - const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork); + const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork.proxyContract); if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index d36545134..ed800aae0 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -33,7 +33,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - log.processing(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + log.info(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); try { currentState.networkState = await migration.up( @@ -78,7 +78,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => log.processing('Reverting migration ...'); for (; index >= 0; index--) { const migrationData = migrationsData[index]; - log.processing(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); const migration: Migration = importCsjOrEsModule(migrationData.fullPath); @@ -100,7 +100,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => } } - log.done(`Migration(s) complete ⚡️`); + log.done(`\nMigration(s) complete ⚡️`); }; type migrationData = { @@ -115,7 +115,7 @@ export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateP // if reset, delete all the files in the corresponding network folder if (args.reset) { - log.info(`Resetting ${NETWORK_NAME} migratation folder`); + log.warning(`Resetting ${NETWORK_NAME} migratation folder`); fs.rmSync(pathToState, { recursive: true, force: true @@ -148,7 +148,7 @@ export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateP // if network is a fork fetch info from original network if (args.reset && MIGRATION_CONFIG.isFork) { try { - log.info(`Fetching initial state from ${MIGRATION_CONFIG.originalNetwork}`); + log.warning(`Fetching initial state from ${MIGRATION_CONFIG.originalNetwork}`); state = fetchState( path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, MIGRATION_CONFIG.originalNetwork) ); From 9782367ea6ce149660760c3320343b7c25933cb1 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 1 Sep 2021 12:30:49 +0200 Subject: [PATCH 049/164] Add upgrade network settings --- .../migrations/9_upgrade_networkSettings.ts | 49 +++++++++++++++++++ packages/v3/package.json | 2 +- yarn.lock | 8 +-- 3 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 packages/v3/migration/migrations/9_upgrade_networkSettings.ts diff --git a/packages/v3/migration/migrations/9_upgrade_networkSettings.ts b/packages/v3/migration/migrations/9_upgrade_networkSettings.ts new file mode 100644 index 000000000..9a4ed86f3 --- /dev/null +++ b/packages/v3/migration/migrations/9_upgrade_networkSettings.ts @@ -0,0 +1,49 @@ +import { Migration } from '../engine/types'; +import { NextState as InitialState } from './8_deploy_initializeBancorNetwork'; + +export type NextState = InitialState; + +const migration: Migration = { + up: async ( + signer, + contracts, + initialState: InitialState, + { deploy, execute, deployProxy, upgradeProxy } + ): Promise => { + const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); + const networkSettings = await upgradeProxy( + proxyAdmin, + contracts.NetworkSettings, + initialState.networkSettings.proxyContract, + 'skipInit' + ); + + return { + ...initialState, + networkSettings: { ...initialState.networkSettings, logicContract: networkSettings.logicContractAddress } + }; + }, + + healthCheck: async (signer, contracts, initialState: InitialState, state: NextState) => { + const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); + + const implementationAddress = await proxyAdmin.getProxyImplementation(state.networkSettings.proxyContract); + if ( + implementationAddress !== state.networkSettings.logicContract || + implementationAddress === initialState.networkSettings.logicContract + ) { + throw new Error("Proxy haven't been properly upgraded"); + } + }, + + down: async ( + signer, + contracts, + initialState: InitialState, + newState: NextState, + { deploy, execute } + ): Promise => { + return initialState; + } +}; +export default migration; diff --git a/packages/v3/package.json b/packages/v3/package.json index 60aed79af..1a8f0453b 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -41,7 +41,7 @@ "hardhat": "2.5.0" }, "devDependencies": { - "@bancor/token-governance": "^0.1.2", + "@bancor/token-governance": "^0.1.3", "@ethersproject/hardware-wallets": "^5.4.0", "@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-etherscan": "^2.1.4", diff --git a/yarn.lock b/yarn.lock index 9ee784ec5..f1aa9a0ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -254,10 +254,10 @@ "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" -"@bancor/token-governance@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.2.tgz#01f1ff04d422540170ed5d0e0bb9bc386c89a755" - integrity sha512-TMv4VJqQOSJzXyRhg3UsvlccE563n1yb0u+s+SGD/VryWFSPybOkEEXKwKNVZxqYLdpQxls0UqeDlvbpBRqtRw== +"@bancor/token-governance@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.3.tgz#c2099c195769a23ac8222bcb7f4508e5616c4978" + integrity sha512-rRF/eVAdMagDR8y84VnNAQl8UpFlN/DuR7JNQPEnksTb4wbVWqaLgxQ+3JxP/1oTwXUfCAxs5ioKC7aLzb7c/A== "@bancor/token-governance@bancorprotocol/token-governance": version "0.1.1" From 94d7675b75dbd7c4c02f19a1f762208bcdc719b0 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 1 Sep 2021 18:16:13 +0200 Subject: [PATCH 050/164] fix revert to last success --- packages/v3/migration/tasks/migrate.ts | 35 ++++++++++++-------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index ed800aae0..05e420e2a 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -75,29 +75,26 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert if (index != migrationsData.length) { - log.processing('Reverting migration ...'); - for (; index >= 0; index--) { - const migrationData = migrationsData[index]; - log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + log.warning('Reverting ...'); - const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + const migrationData = migrationsData[index]; + log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - currentState.networkState = await migration.down( - signer, - contracts, - stateSaves[index].networkState, - currentState.networkState, - executionFunctions - ); + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - // if revert passed, update the state and write it to the system - currentState = { - migrationState: { latestMigration: stateSaves[index].migrationState.latestMigration }, - networkState: currentState.networkState - }; + currentState.networkState = await migration.down( + signer, + contracts, + stateSaves[index].networkState, + currentState.networkState, + executionFunctions + ); - writeState(currentState); - } + // if revert passed, update the state and write it to the system + currentState.migrationState = { latestMigration: stateSaves[index].migrationState.latestMigration }; + + writeState(currentState); + log.success(`${migrationData.fileName} reverted`); } log.done(`\nMigration(s) complete ⚡️`); From fee573f8bf0e5f5e490ab57fdb7895e4dfef9452 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 1 Sep 2021 20:19:33 +0200 Subject: [PATCH 051/164] remove useless log --- packages/v3/migration/engine/logger/logger.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger/logger.ts index e296fa6ce..929eae77d 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger/logger.ts @@ -9,12 +9,10 @@ export const palette = { export const log = { // basic logging - normal: (...str: string[]) => console.log(...str), warning: (...str: string[]) => console.log(chalk.cyanBright(`⚠️ ${str}`)), info: (...str: string[]) => console.log(chalk.rgb(0, 0, 0).bgWhiteBright(`\n${str}`)), done: (...str: string[]) => console.log(chalk.yellowBright(...str)), // - execute: (...str: string[]) => console.log(chalk.rgb(255, 165, 51).italic(...str)), debug: (...str: string[]) => console.log(chalk.rgb(123, 104, 238).italic(...str)), // basicExecutionHeader: (head: string, body: string, args: any[]) => { @@ -33,9 +31,7 @@ export const log = { ) ); }, - executionInfo: (...str: string[]) => console.log(chalk.rgb(255, 215, 51)(...str)), // - processing: (...str: string[]) => console.log(chalk.blue(...str)), greyed: (...str: string[]) => console.log(chalk.grey(...str)), success: (...str: string[]) => console.log(chalk.greenBright(...str)), error: (...str: string[]) => console.log(chalk.red(`⛔️ ${str}`)), From f21746ebbf0f6b613a0235fb6760e9920b3207bf Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 2 Sep 2021 12:18:15 +0200 Subject: [PATCH 052/164] re-architecture --- packages/v3/hardhat.config.ts | 2 +- packages/v3/migration/engine/executions.ts | 2 +- packages/v3/migration/engine/initialization.ts | 2 +- packages/v3/migration/engine/{logger => }/logger.ts | 2 +- .../v3/{components/TaskUtils.ts => migration/engine/utils.ts} | 0 packages/v3/migration/index.ts | 2 +- packages/v3/migration/tasks/createMigration.ts | 2 +- packages/v3/migration/tasks/migrate.ts | 4 ++-- 8 files changed, 8 insertions(+), 8 deletions(-) rename packages/v3/migration/engine/{logger => }/logger.ts (97%) rename packages/v3/{components/TaskUtils.ts => migration/engine/utils.ts} (100%) diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index 6da3fa059..f96c452ce 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -1,5 +1,5 @@ import './migration'; -import { log } from './migration/engine/logger/logger'; +import { log } from './migration/engine/logger'; import './test/Setup.ts'; import '@nomiclabs/hardhat-ethers'; import '@nomiclabs/hardhat-etherscan'; diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts index 77e3359ce..474589d3a 100644 --- a/packages/v3/migration/engine/executions.ts +++ b/packages/v3/migration/engine/executions.ts @@ -2,7 +2,7 @@ import Contracts, { ContractBuilder, Contract } from '../../components/Contracts import { ProxyAdmin } from '../../typechain'; import { ExecutionError } from './errors'; import { executionSettings } from './initialization'; -import { log } from './logger/logger'; +import { log } from './logger'; import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; import { ContractFactory, Overrides } from 'ethers'; diff --git a/packages/v3/migration/engine/initialization.ts b/packages/v3/migration/engine/initialization.ts index 143d496e7..b0355dd57 100644 --- a/packages/v3/migration/engine/initialization.ts +++ b/packages/v3/migration/engine/initialization.ts @@ -1,7 +1,7 @@ import Contracts from '../../components/Contracts'; import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.config'; import { initExecutionFunctions } from './executions'; -import { log } from './logger/logger'; +import { log } from './logger'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; import { BigNumberish } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; diff --git a/packages/v3/migration/engine/logger/logger.ts b/packages/v3/migration/engine/logger.ts similarity index 97% rename from packages/v3/migration/engine/logger/logger.ts rename to packages/v3/migration/engine/logger.ts index 929eae77d..f9e842cc4 100644 --- a/packages/v3/migration/engine/logger/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -1,4 +1,4 @@ -import { executionSettings } from '../initialization'; +import { executionSettings } from './initialization'; import chalk from 'chalk'; export const palette = { diff --git a/packages/v3/components/TaskUtils.ts b/packages/v3/migration/engine/utils.ts similarity index 100% rename from packages/v3/components/TaskUtils.ts rename to packages/v3/migration/engine/utils.ts diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index a56dba7b0..c24633849 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,5 +1,5 @@ -import { lazyAction } from '../components/TaskUtils'; import { defaultMigrationArgs } from './engine/initialization'; +import { lazyAction } from './engine/utils'; import { task, types } from 'hardhat/config'; import path from 'path'; diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts index b8773d6ff..bfce6a497 100644 --- a/packages/v3/migration/tasks/createMigration.ts +++ b/packages/v3/migration/tasks/createMigration.ts @@ -1,6 +1,6 @@ import { createMigrationParamTask } from '../../migration'; import { MIGRATION_FOLDER } from '../../migration/engine/config'; -import { log } from '../../migration/engine/logger/logger'; +import { log } from '../engine/logger'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import path from 'path'; diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index 05e420e2a..32e06dcf8 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -1,10 +1,10 @@ import { migrateParamTask } from '..'; -import { importCsjOrEsModule } from '../../components/TaskUtils'; import { SystemState } from '../../migration/engine/types'; import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../engine/config'; import { initMigration } from '../engine/initialization'; -import { log } from '../engine/logger/logger'; +import { log } from '../engine/logger'; import { Migration } from '../engine/types'; +import { importCsjOrEsModule } from '../engine/utils'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import path from 'path'; From d32024b86156eef55c1cc8ea2d8da9ae7556d5b0 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 2 Sep 2021 12:24:45 +0200 Subject: [PATCH 053/164] update readme.md --- packages/v3/migration/README.md | 10 +++++----- packages/v3/migration/engine/types.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 3461876e9..49be72615 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -36,22 +36,22 @@ export interface Migration { signer: Signer, contracts: Contracts, initialState: any, - { deploy, execute, deployProxy }: executionFunctions - ) => Promise<{}>; + executionFunctions: executionFunctions + ) => Promise; healthCheck: ( signer: Signer, contracts: Contracts, initialState: any, newState: any, - { deploy, execute, deployProxy }: executionFunctions + executionFunctions: executionFunctions ) => Promise; down: ( signer: Signer, contracts: Contracts, initialState: any, newState: any, - { deploy, execute, deployProxy }: executionFunctions - ) => Promise<{}>; + executionFunctions: executionFunctions + ) => Promise; } ``` diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 8e652af42..89ecdecc2 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -20,20 +20,20 @@ export interface Migration { signer: Signer, contracts: Contracts, initialState: any, - { deploy, execute, deployProxy }: executionFunctions - ) => Promise<{}>; + executionFunctions: executionFunctions + ) => Promise; healthCheck: ( signer: Signer, contracts: Contracts, initialState: any, newState: any, - { deploy, execute, deployProxy }: executionFunctions + executionFunctions: executionFunctions ) => Promise; down: ( signer: Signer, contracts: Contracts, initialState: any, newState: any, - { deploy, execute, deployProxy }: executionFunctions - ) => Promise<{}>; + executionFunctions: executionFunctions + ) => Promise; } From 0f61f1426126a83b5fd4ff054d36a204dd9cddab Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 2 Sep 2021 13:30:55 +0200 Subject: [PATCH 054/164] pass migration config to healthcheck in order to act healthcheck based upon network --- packages/v3/migration/README.md | 10 +++++++++- packages/v3/migration/engine/config.ts | 4 +++- packages/v3/migration/engine/initialization.ts | 3 ++- packages/v3/migration/engine/logger.ts | 6 ++++-- packages/v3/migration/engine/types.ts | 2 ++ packages/v3/migration/migrations/0_deploy_basics.ts | 9 ++++++++- .../v3/migration/migrations/1_deploy_proxyAdmin.ts | 9 ++++++++- .../migration/migrations/2_deploy_networkSettings.ts | 9 ++++++++- packages/v3/migration/migrations/3_deploy_network.ts | 9 ++++++++- packages/v3/migration/migrations/4_deploy_vault.ts | 9 ++++++++- .../migration/migrations/5_deploy_networkTokenPool.ts | 9 ++++++++- .../migrations/6_deploy_pendingWithdrawals.ts | 9 ++++++++- .../migrations/7_deploy_liquidityPoolCollection.ts | 9 ++++++++- .../migrations/8_deploy_initializeBancorNetwork.ts | 9 ++++++++- .../migration/migrations/9_upgrade_networkSettings.ts | 2 +- packages/v3/migration/tasks/migrate.ts | 1 + 16 files changed, 94 insertions(+), 15 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 49be72615..61555a5ae 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -40,6 +40,7 @@ export interface Migration { ) => Promise; healthCheck: ( signer: Signer, + config: typeof MIGRATION_CONFIG, contracts: Contracts, initialState: any, newState: any, @@ -142,7 +143,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => {}, + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => {}, down: async ( signer, diff --git a/packages/v3/migration/engine/config.ts b/packages/v3/migration/engine/config.ts index 890dd8def..9f6c560c0 100644 --- a/packages/v3/migration/engine/config.ts +++ b/packages/v3/migration/engine/config.ts @@ -14,6 +14,8 @@ export const NETWORK_NAME = GET_NETWORK_NAME(); export const MIGRATION_CONFIG = { isFork: NETWORK_NAME.startsWith(FORK_PREFIX), - originalNetwork: NETWORK_NAME.substring(FORK_PREFIX.length), + isHardhat: NETWORK_NAME === 'hardhat', + isTestnet: NETWORK_NAME === 'rinkeby', + originalNetwork: NETWORK_NAME.startsWith(FORK_PREFIX) ? NETWORK_NAME.substring(FORK_PREFIX.length) : NETWORK_NAME, networkName: NETWORK_NAME }; diff --git a/packages/v3/migration/engine/initialization.ts b/packages/v3/migration/engine/initialization.ts index b0355dd57..fe6540501 100644 --- a/packages/v3/migration/engine/initialization.ts +++ b/packages/v3/migration/engine/initialization.ts @@ -1,5 +1,6 @@ import Contracts from '../../components/Contracts'; import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.config'; +import { MIGRATION_CONFIG } from './config'; import { initExecutionFunctions } from './executions'; import { log } from './logger'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; @@ -55,7 +56,7 @@ export const initMigration = async (args: defaultMigrationArgs) => { // init execution functions const executionFunctions = initExecutionFunctions(contracts, executionSettings); - log.migrationConfig(await signer.getAddress(), networkName, args.ledger, executionSettings); + log.migrationConfig(await signer.getAddress(), MIGRATION_CONFIG, args.ledger, executionSettings); return { signer, diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts index f9e842cc4..b90ff8ac0 100644 --- a/packages/v3/migration/engine/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -1,3 +1,4 @@ +import { MIGRATION_CONFIG } from './config'; import { executionSettings } from './initialization'; import chalk from 'chalk'; @@ -39,7 +40,7 @@ export const log = { // specific logging migrationConfig: ( signerAddress: string, - networkName: string, + config: typeof MIGRATION_CONFIG, isLedger: boolean, executionSettings: executionSettings ) => { @@ -48,8 +49,9 @@ export const log = { palette.yellow(`**********************`); palette.yellow(`Basic info`); - palette.white(` Network: ${networkName}`); palette.white(` Signer: ${signerAddress} ${isLedger ? '(ledger)' : ''}`); + palette.yellow(`Network info`); + palette.white(` Network: ${config.networkName}`); palette.yellow(`Overrides:`); palette.white(` GasPrice: ${executionSettings.gasPrice} (gwei)`); palette.yellow(`Execution Setting:`); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 89ecdecc2..85433614b 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,4 +1,5 @@ import { Contracts } from '../../components/Contracts'; +import { MIGRATION_CONFIG } from './config'; import { initExecutionFunctions } from './executions'; import { Signer } from 'ethers'; @@ -24,6 +25,7 @@ export interface Migration { ) => Promise; healthCheck: ( signer: Signer, + config: typeof MIGRATION_CONFIG, contracts: Contracts, initialState: any, newState: any, diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index 311071ad9..78c6a8bbf 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -40,7 +40,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => { const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) diff --git a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts index 98d45f028..512de15d0 100644 --- a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts @@ -16,7 +16,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts index 7b0eec5eb..40c7120a7 100644 --- a/packages/v3/migration/migrations/2_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -21,7 +21,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => { const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings.proxyContract); if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); diff --git a/packages/v3/migration/migrations/3_deploy_network.ts b/packages/v3/migration/migrations/3_deploy_network.ts index f98ab09db..a18674ddd 100644 --- a/packages/v3/migration/migrations/3_deploy_network.ts +++ b/packages/v3/migration/migrations/3_deploy_network.ts @@ -28,7 +28,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => {}, + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => {}, down: async ( signer, diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts index 5319e2d75..fd12e088f 100644 --- a/packages/v3/migration/migrations/4_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -21,7 +21,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => { const bancorVault = await contracts.BancorVault.attach(state.vault.proxyContract); if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) diff --git a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts index 56a07b81b..3573feac7 100644 --- a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts @@ -43,7 +43,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => {}, + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => {}, down: async ( signer, diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index 4dd6ece02..ef22cfe1d 100644 --- a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -30,7 +30,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => { const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals.proxyContract); if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index cfd691ef0..9ef4ef221 100644 --- a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -15,7 +15,14 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => { const poolCollection = await contracts.PoolCollection.attach(state.poolCollection); if ((await poolCollection.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index 0037e86a8..0b6be2723 100644 --- a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -16,7 +16,14 @@ const migration: Migration = { return initialState; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => { + healthCheck: async ( + signer, + config, + contracts, + initialState: InitialState, + state: NextState, + { deploy, execute } + ) => { const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork.proxyContract); if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); diff --git a/packages/v3/migration/migrations/9_upgrade_networkSettings.ts b/packages/v3/migration/migrations/9_upgrade_networkSettings.ts index 9a4ed86f3..6f6e78f0f 100644 --- a/packages/v3/migration/migrations/9_upgrade_networkSettings.ts +++ b/packages/v3/migration/migrations/9_upgrade_networkSettings.ts @@ -24,7 +24,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState) => { + healthCheck: async (signer, config, contracts, initialState: InitialState, state: NextState) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); const implementationAddress = await proxyAdmin.getProxyImplementation(state.networkSettings.proxyContract); diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index 32e06dcf8..aeed4ee5a 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -46,6 +46,7 @@ export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => try { await migration.healthCheck( signer, + MIGRATION_CONFIG, contracts, stateSaves[index].networkState, currentState.networkState, From 14666e164906b9ae608913e528d883b5e8455ed1 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 2 Sep 2021 23:44:31 +0200 Subject: [PATCH 055/164] typos --- packages/v3/migration/README.md | 1 + packages/v3/migration/engine/logger.ts | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 61555a5ae..c2768c7da 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -3,6 +3,7 @@ ## Roadmap - [x] Ledger support +- [x] Revert support - [x] Deploy proxy - [x] Upgrade proxy diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts index b90ff8ac0..669cb2904 100644 --- a/packages/v3/migration/engine/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -9,13 +9,11 @@ export const palette = { }; export const log = { - // basic logging warning: (...str: string[]) => console.log(chalk.cyanBright(`⚠️ ${str}`)), info: (...str: string[]) => console.log(chalk.rgb(0, 0, 0).bgWhiteBright(`\n${str}`)), done: (...str: string[]) => console.log(chalk.yellowBright(...str)), - // debug: (...str: string[]) => console.log(chalk.rgb(123, 104, 238).italic(...str)), - // + basicExecutionHeader: (head: string, body: string, args: any[]) => { let space = ' '; for (let i = 0; i < head.length; i++) space += ' '; @@ -32,12 +30,11 @@ export const log = { ) ); }, - // + greyed: (...str: string[]) => console.log(chalk.grey(...str)), success: (...str: string[]) => console.log(chalk.greenBright(...str)), error: (...str: string[]) => console.log(chalk.red(`⛔️ ${str}`)), - // specific logging migrationConfig: ( signerAddress: string, config: typeof MIGRATION_CONFIG, From d0ecadab43e1c3364dee7d0c1bc948f5eaa87a14 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 3 Sep 2021 19:12:28 +0200 Subject: [PATCH 056/164] add abi and bytecode in contract builder --- packages/v3/components/Contracts.ts | 88 +++++++++++------------------ 1 file changed, 34 insertions(+), 54 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 93f5ae152..e23a360ff 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -38,54 +38,33 @@ export type Contract = AsyncReturnType; export interface ContractBuilder { contractName: string; + abi: {}; + bytecode: string; deploy(...args: Parameters): Promise>; attach(address: string, signer?: Signer): Promise>; } -const deployOrAttach = (contractName: string, signer?: Signer): ContractBuilder => { - return { - contractName, - deploy: async (...args: Parameters): Promise> => { - let defaultSigner = signer ? signer : (await ethers.getSigners())[0]; - - return (await ethers.getContractFactory(contractName, defaultSigner)).deploy( - ...(args || []) - ) as Contract; - }, - attach: attachOnly(contractName, signer).attach - }; -}; - -const attachOnly = (contractName: string, passedSigner?: Signer) => { - return { - attach: async (address: string, signer?: Signer): Promise> => { - let defaultSigner = passedSigner ? passedSigner : (await ethers.getSigners())[0]; - return ethers.getContractAt(contractName, address, signer || defaultSigner) as Contract; - } - }; -}; - -const deployOrAttachExternal = ( +type FactoryConstructor = { new (signer?: Signer): F; abi: {}; bytecode: string }; +const deployOrAttach = ( contractName: string, // @TODO: needs to replace with correctly typed params but it doesn't work properly for some reason https://github.com/microsoft/TypeScript/issues/31278 - factoryConstructor: { new (signer?: Signer): F }, + factoryConstructor: FactoryConstructor, initialSigner?: Signer ): ContractBuilder => { return { contractName, + abi: factoryConstructor.abi, + bytecode: factoryConstructor.bytecode, deploy: async (...args: Parameters): Promise> => { let defaultSigner = initialSigner ? initialSigner : (await ethers.getSigners())[0]; return new factoryConstructor(defaultSigner).deploy(...(args || [])) as Contract; }, - attach: attachOnlyExternal(factoryConstructor, initialSigner).attach + attach: attachOnly(factoryConstructor, initialSigner).attach }; }; -const attachOnlyExternal = ( - factoryConstructor: { new (signer?: Signer): F }, - initialSigner?: Signer -) => { +const attachOnly = (factoryConstructor: FactoryConstructor, initialSigner?: Signer) => { return { attach: async (address: string, signer?: Signer): Promise> => { let defaultSigner = initialSigner ? initialSigner : (await ethers.getSigners())[0]; @@ -97,35 +76,36 @@ const attachOnlyExternal = ( const getContracts = (signer?: Signer) => ({ connect: (signer: Signer) => getContracts(signer), - BancorNetwork: deployOrAttach('BancorNetwork', signer), - BancorVault: deployOrAttach('BancorVault', signer), - ERC20: deployOrAttach('ERC20', signer), - PoolCollection: deployOrAttach('PoolCollection', signer), - NetworkSettings: deployOrAttach('NetworkSettings', signer), - NetworkTokenPool: deployOrAttach('NetworkTokenPool', signer), - PendingWithdrawals: deployOrAttach('PendingWithdrawals', signer), - PoolToken: deployOrAttach('PoolToken', signer), - ProxyAdmin: deployOrAttach('ProxyAdmin', signer), - TestBancorNetwork: deployOrAttach('TestBancorNetwork', signer), - TestERC20Token: deployOrAttach('TestERC20Token', signer), - TestERC20Burnable: deployOrAttach('TestERC20Burnable', signer), - TestPoolAverageRate: deployOrAttach('TestPoolAverageRate', signer), - TestPoolCollection: deployOrAttach('TestPoolCollection', signer), - TestNetworkTokenPool: deployOrAttach('TestNetworkTokenPool', signer), - TestMathEx: deployOrAttach('TestMathEx', signer), - TestOwnedUpgradeable: deployOrAttach('TestOwnedUpgradeable', signer), - TestPendingWithdrawals: deployOrAttach('TestPendingWithdrawals', signer), - TestReserveToken: deployOrAttach('TestReserveToken', signer), - TestSafeERC20Ex: deployOrAttach('TestSafeERC20Ex', signer), - TestSystemToken: deployOrAttach('TestSystemToken', signer), - TokenHolderUpgradeable: deployOrAttach('TokenHolderUpgradeable', signer), - TransparentUpgradeableProxy: deployOrAttach( + BancorNetwork: deployOrAttach('BancorNetwork', BancorNetwork__factory, signer), + BancorVault: deployOrAttach('BancorVault', BancorVault__factory, signer), + ERC20: deployOrAttach('ERC20', ERC20__factory, signer), + PoolCollection: deployOrAttach('PoolCollection', PoolCollection__factory, signer), + NetworkSettings: deployOrAttach('NetworkSettings', NetworkSettings__factory, signer), + NetworkTokenPool: deployOrAttach('NetworkTokenPool', NetworkTokenPool__factory, signer), + PendingWithdrawals: deployOrAttach('PendingWithdrawals', PendingWithdrawals__factory, signer), + PoolToken: deployOrAttach('PoolToken', PoolToken__factory, signer), + ProxyAdmin: deployOrAttach('ProxyAdmin', ProxyAdmin__factory, signer), + TestBancorNetwork: deployOrAttach('TestBancorNetwork', TestBancorNetwork__factory, signer), + TestERC20Token: deployOrAttach('TestERC20Token', TestERC20Token__factory, signer), + TestERC20Burnable: deployOrAttach('TestERC20Burnable', TestERC20Burnable__factory, signer), + TestPoolAverageRate: deployOrAttach('TestPoolAverageRate', TestPoolAverageRate__factory, signer), + TestPoolCollection: deployOrAttach('TestPoolCollection', TestPoolCollection__factory, signer), + TestNetworkTokenPool: deployOrAttach('TestNetworkTokenPool', TestNetworkTokenPool__factory, signer), + TestMathEx: deployOrAttach('TestMathEx', TestMathEx__factory, signer), + TestOwnedUpgradeable: deployOrAttach('TestOwnedUpgradeable', TestOwnedUpgradeable__factory, signer), + TestPendingWithdrawals: deployOrAttach('TestPendingWithdrawals', TestPendingWithdrawals__factory, signer), + TestReserveToken: deployOrAttach('TestReserveToken', TestReserveToken__factory, signer), + TestSafeERC20Ex: deployOrAttach('TestSafeERC20Ex', TestSafeERC20Ex__factory, signer), + TestSystemToken: deployOrAttach('TestSystemToken', TestSystemToken__factory, signer), + TokenHolderUpgradeable: deployOrAttach('TokenHolderUpgradeable', TokenHolderUpgradeable__factory, signer), + TransparentUpgradeableProxy: deployOrAttach( 'TransparentUpgradeableProxy', + TransparentUpgradeableProxy__factory, signer ), // external contracts - TokenGovernance: deployOrAttachExternal('TokenGovernance', TokenGovernance__factory, signer) + TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer) }); export type Contracts = ReturnType; From 66451b8ba575bc9c77fff62dae8811a0842df779 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 7 Sep 2021 02:56:51 +0200 Subject: [PATCH 057/164] Re-architecture of the migration tool in order to facilitate development --- packages/v3/components/Contracts.ts | 14 +- packages/v3/hardhat.config.ts | 68 +--- packages/v3/hardhat.extended.config.ts | 55 +++ .../v3/migration/data/mainnet/deployment.json | 1 + packages/v3/migration/engine/config.ts | 21 - packages/v3/migration/engine/engine.ts | 363 ++++++++++++++++++ packages/v3/migration/engine/errors.ts | 16 - packages/v3/migration/engine/executions.ts | 127 ------ packages/v3/migration/engine/index.ts | 17 + .../v3/migration/engine/initialization.ts | 67 ---- packages/v3/migration/engine/logger.ts | 14 +- packages/v3/migration/engine/types.ts | 54 +-- packages/v3/migration/engine/utils.ts | 4 +- packages/v3/migration/index.ts | 4 +- .../migration/migrations/0_deploy_basics.ts | 22 +- .../migrations/1_deploy_proxyAdmin.ts | 22 +- .../migrations/2_deploy_networkSettings.ts | 22 +- .../migration/migrations/3_deploy_network.ts | 24 +- .../v3/migration/migrations/4_deploy_vault.ts | 22 +- .../migrations/5_deploy_networkTokenPool.ts | 22 +- .../migrations/6_deploy_pendingWithdrawals.ts | 22 +- .../7_deploy_liquidityPoolCollection.ts | 22 +- .../8_deploy_initializeBancorNetwork.ts | 22 +- .../migrations/9_upgrade_networkSettings.ts | 20 +- packages/v3/migration/tasks/migrate.ts | 195 +--------- 25 files changed, 550 insertions(+), 690 deletions(-) create mode 100644 packages/v3/hardhat.extended.config.ts create mode 100644 packages/v3/migration/data/mainnet/deployment.json delete mode 100644 packages/v3/migration/engine/config.ts create mode 100644 packages/v3/migration/engine/engine.ts delete mode 100644 packages/v3/migration/engine/errors.ts delete mode 100644 packages/v3/migration/engine/executions.ts create mode 100644 packages/v3/migration/engine/index.ts delete mode 100644 packages/v3/migration/engine/initialization.ts diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index e23a360ff..6f1720757 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -38,8 +38,10 @@ export type Contract = AsyncReturnType; export interface ContractBuilder { contractName: string; - abi: {}; - bytecode: string; + metadata: { + abi: Object; + bytecode: string; + }; deploy(...args: Parameters): Promise>; attach(address: string, signer?: Signer): Promise>; } @@ -53,8 +55,10 @@ const deployOrAttach = ( ): ContractBuilder => { return { contractName, - abi: factoryConstructor.abi, - bytecode: factoryConstructor.bytecode, + metadata: { + abi: factoryConstructor.abi, + bytecode: factoryConstructor.bytecode + }, deploy: async (...args: Parameters): Promise> => { let defaultSigner = initialSigner ? initialSigner : (await ethers.getSigners())[0]; @@ -108,6 +112,6 @@ const getContracts = (signer?: Signer) => ({ TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer) }); -export type Contracts = ReturnType; +export type ContractsType = ReturnType; export default getContracts(); diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index f96c452ce..d43822384 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -1,73 +1,17 @@ +import { configFileNetworks, getEnvKey, hardhatForkedConfig, loadKey } from './hardhat.extended.config'; import './migration'; -import { log } from './migration/engine/logger'; import './test/Setup.ts'; import '@nomiclabs/hardhat-ethers'; import '@nomiclabs/hardhat-etherscan'; import '@typechain/hardhat'; -import fs from 'fs'; import 'hardhat-abi-exporter'; import 'hardhat-contract-sizer'; import 'hardhat-dependency-compiler'; import 'hardhat-deploy'; import 'hardhat-gas-reporter'; import { HardhatUserConfig } from 'hardhat/config'; -import path from 'path'; import 'solidity-coverage'; -const configPath = path.join(__dirname, '/config.json'); -const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {}; - -// Utilities -const loadKey = (keyName: string) => { - return configFile.keys ? (configFile.keys[keyName] ? configFile.keys[keyName] : undefined) : undefined; -}; -const getNetworkUrl = (networkName: string) => { - return configFile.networks - ? configFile.networks[networkName] - ? configFile.networks[networkName].url - ? configFile.networks[networkName].url - : undefined - : undefined - : undefined; -}; -const getEnvKey = (envKeyName: string) => { - return process.env[envKeyName] as unknown as T; -}; - -// Forking configuration -export const FORK_PREFIX = 'fork-'; - -const MAINNET = 'mainnet'; - -type FORK_NETWORK_SUPPORTED = typeof MAINNET; - -export const FORK_CONFIG = (() => { - const networkToFork: string = getEnvKey('FORK'); - const urlNetworkToFork: string = getNetworkUrl(networkToFork); - - if (!networkToFork) { - return undefined; - } - - if (networkToFork && !urlNetworkToFork) { - log.error(`${networkToFork} config is not present in the config.json file, aborting.`); - process.exit(-1); - } - - let FORKED_NETWORK_NAME: string = ''; - if (networkToFork === MAINNET) { - FORKED_NETWORK_NAME = FORK_PREFIX + networkToFork; - } else { - log.error(`${networkToFork} is not supported, aborting.`); - process.exit(-1); - } - - return { - networkName: FORKED_NETWORK_NAME, - networkUrl: urlNetworkToFork - }; -})(); - const hardhatDefaultConfig = { accounts: { count: 10, @@ -75,21 +19,13 @@ const hardhatDefaultConfig = { } }; -const hardhatForkedConfig = FORK_CONFIG - ? { - forking: { - url: FORK_CONFIG.networkUrl - } - } - : undefined; - const ci = getEnvKey('CI'); const config: HardhatUserConfig = { networks: { hardhat: hardhatForkedConfig || hardhatDefaultConfig, - ...configFile.networks + ...configFileNetworks }, solidity: { diff --git a/packages/v3/hardhat.extended.config.ts b/packages/v3/hardhat.extended.config.ts new file mode 100644 index 000000000..9f13eb0ef --- /dev/null +++ b/packages/v3/hardhat.extended.config.ts @@ -0,0 +1,55 @@ +import './migration'; +import { log } from './migration/engine/logger'; +import fs from 'fs'; +import path from 'path'; + +const configPath = path.join(__dirname, '/config.json'); +const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {}; + +export const configFileNetworks = configFile.networks; + +// Utilities +export const loadKey = (keyName: string) => { + return configFile.keys ? configFile.keys[keyName] || undefined : undefined; +}; + +export const getNetworkUrl = (networkName: string) => { + return configFile.networks + ? configFile.networks[networkName] + ? configFile.networks[networkName].url || undefined + : undefined + : undefined; +}; + +export const getEnvKey = (envKeyName: string) => { + return process.env[envKeyName] as unknown as T; +}; + +// Forking configuration +export const FORK_PREFIX = 'fork-'; +export const FORK_CONFIG = (() => { + const networkToFork: string = getEnvKey('FORK'); + if (!networkToFork) { + return undefined; + } + + const urlNetworkToFork: string = getNetworkUrl(networkToFork); + if (!urlNetworkToFork) { + log.error(`${networkToFork} config is not present in the config.json file, aborting.`); + process.exit(-1); + } + + const FORKED_NETWORK_NAME = FORK_PREFIX + networkToFork; + return { + networkName: FORKED_NETWORK_NAME, + networkUrl: urlNetworkToFork + }; +})(); + +export const hardhatForkedConfig = FORK_CONFIG + ? { + forking: { + url: FORK_CONFIG.networkUrl + } + } + : undefined; diff --git a/packages/v3/migration/data/mainnet/deployment.json b/packages/v3/migration/data/mainnet/deployment.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/packages/v3/migration/data/mainnet/deployment.json @@ -0,0 +1 @@ +{} diff --git a/packages/v3/migration/engine/config.ts b/packages/v3/migration/engine/config.ts deleted file mode 100644 index 9f6c560c0..000000000 --- a/packages/v3/migration/engine/config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.config'; -import { network } from 'hardhat'; - -export const MIGRATION_FOLDER = 'migration/migrations'; -export const MIGRATION_DATA_FOLDER = 'migration/data'; - -const GET_NETWORK_NAME = () => { - if (FORK_CONFIG) { - return FORK_CONFIG.networkName; - } - return network.name; -}; -export const NETWORK_NAME = GET_NETWORK_NAME(); - -export const MIGRATION_CONFIG = { - isFork: NETWORK_NAME.startsWith(FORK_PREFIX), - isHardhat: NETWORK_NAME === 'hardhat', - isTestnet: NETWORK_NAME === 'rinkeby', - originalNetwork: NETWORK_NAME.startsWith(FORK_PREFIX) ? NETWORK_NAME.substring(FORK_PREFIX.length) : NETWORK_NAME, - networkName: NETWORK_NAME -}; diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts new file mode 100644 index 000000000..82338b1f6 --- /dev/null +++ b/packages/v3/migration/engine/engine.ts @@ -0,0 +1,363 @@ +import Contracts, { ContractBuilder, ContractsType, Contract } from '../../components/Contracts'; +import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.extended.config'; +import { ProxyAdmin } from '../../typechain'; +import { log } from './logger'; +import { defaultArgs, ExecutionSettings, Migration, MigrationData, SystemDeployments, SystemState } from './types'; +import { importCsjOrEsModule } from './utils'; +import { ContractFactory, ContractReceipt, ContractTransaction, Overrides, Signer } from 'ethers'; +import { parseUnits } from 'ethers/lib/utils'; +import fs from 'fs'; +import { network } from 'hardhat'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import path from 'path'; + +export const MIGRATION_FOLDER = 'migration/migrations'; +export const MIGRATION_DATA_FOLDER = 'migration/data'; + +const NETWORK_NAME = FORK_CONFIG ? FORK_CONFIG.networkName : network.name; + +type initializeArgs = Parameters | 'skipInit'; +type proxy = { proxy: Contract; logicContractAddress: string }; + +export class Engine { + readonly hre: HardhatRuntimeEnvironment; + + readonly pathToNetworkFolder: string; + + readonly signer: Signer; + readonly executionSettings: ExecutionSettings; + readonly overrides: Overrides; + readonly contracts: ContractsType; + + state!: SystemState; + deployments!: SystemDeployments; + + networkConfig = { + networkName: NETWORK_NAME, + isFork: NETWORK_NAME.startsWith(FORK_PREFIX), + isHardhat: NETWORK_NAME === 'hardhat', + isTestnet: NETWORK_NAME === 'rinkeby', + originalNetwork: NETWORK_NAME.startsWith(FORK_PREFIX) + ? NETWORK_NAME.substring(FORK_PREFIX.length) + : NETWORK_NAME + }; + + readonly migrationsData: MigrationData[] = []; + + constructor(hre: HardhatRuntimeEnvironment, args: defaultArgs, signer: Signer, signerAddress: string) { + this.hre = hre; + + this.pathToNetworkFolder = path.join( + hre.config.paths.root, + MIGRATION_DATA_FOLDER, + this.networkConfig.networkName + ); + + this.signer = signer; + this.executionSettings = { + confirmationToWait: args.minBlockConfirmations + }; + this.overrides = { + gasPrice: args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei') + }; + this.contracts = Contracts.connect(signer); + + // healthcheck + const isForkOrHardhat = this.networkConfig.isFork || this.networkConfig.networkName === 'hardhat'; + if (this.executionSettings.confirmationToWait <= 1 && !isForkOrHardhat) { + throw new Error( + `Transaction confirmation should be higher than 1 for ${this.networkConfig.networkName} use. Aborting` + ); + } + if (!this.overrides.gasPrice && !isForkOrHardhat) { + throw new Error(`Gas Price shouldn't be equal to 0 for ${this.networkConfig.networkName} use. Aborting`); + } + + this.initIO(); + this.initMigration(); + + log.migrationConfig(signerAddress, args.ledger, this.networkConfig, this.executionSettings, this.overrides); + } + + IO = { + state: { + write: (state: SystemState) => { + fs.writeFileSync( + path.join(this.pathToNetworkFolder, 'state.json'), + JSON.stringify(state, null, 4) + `\n` + ); + this.state = state; + }, + fetch: (pathToState: string) => { + return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; + } + }, + deployment: { + write: (deployments: SystemDeployments) => { + fs.writeFileSync( + path.join(this.pathToNetworkFolder, 'deployment.json'), + JSON.stringify(deployments, null, 4) + `\n` + ); + this.deployments = deployments; + }, + fetch: (pathToState: string) => { + return JSON.parse( + fs.readFileSync(path.join(pathToState, 'deployment.json'), 'utf-8') + ) as SystemDeployments; + } + } + }; + + resetIO = () => { + log.warning(`Resetting ${this.networkConfig.networkName} migratation folder`); + fs.rmSync(this.pathToNetworkFolder, { + recursive: true, + force: true + }); + + this.initIO(); + }; + initIO = () => { + let defaultState: SystemState = { + migrationState: { + latestMigration: -1 + }, + networkState: {} + }; + let defaultDeployment: SystemDeployments = {}; + + // if network folder doesn't exist, create it + if (!fs.existsSync(this.pathToNetworkFolder)) { + fs.mkdirSync(this.pathToNetworkFolder); + } + + // read all files into the folder and fetch needed files + const pathToStateFolder = fs.readdirSync(this.pathToNetworkFolder); + + let state = defaultState; + let deployment = defaultDeployment; + + // if there is no state file in the network's folder, create it + if (!pathToStateFolder.find((fileName: string) => fileName === 'state.json')) { + if (this.networkConfig.isFork) { + try { + const pathToOriginalNetworkFolder = path.join( + this.hre.config.paths.root, + MIGRATION_DATA_FOLDER, + this.networkConfig.originalNetwork + ); + console.log(pathToOriginalNetworkFolder); + log.warning(`Fetching initial state from ${this.networkConfig.originalNetwork}`); + state = this.IO.state.fetch(pathToOriginalNetworkFolder); + log.warning(`Fetching initial deployments from ${this.networkConfig.originalNetwork}`); + deployment = this.IO.deployment.fetch(pathToOriginalNetworkFolder); + } catch (e) { + log.error( + `${this.networkConfig.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` + ); + process.exit(); + } + } + } + this.IO.state.write(state); + this.IO.deployment.write(deployment); + }; + + initMigration = () => { + // generate migration files + const pathToMigrationFiles = path.join(this.hre.config.paths.root, MIGRATION_FOLDER); + const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); + const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); + const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); + for (const migrationFilePath of migrationFilesPath) { + const fileName = path.basename(migrationFilePath); + const migrationId = Number(fileName.split('_')[0]); + if (migrationId > this.state.migrationState.latestMigration) { + this.migrationsData.push({ + fullPath: migrationFilePath, + fileName: fileName, + migrationTimestamp: migrationId + }); + } + } + + // even if migrations should be automatically sorted by the dir fetching, sort again just in case + this.migrationsData.sort((a, b) => + a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 + ); + }; + + migrate = async () => { + // if there is no migration to run, exit + if (this.migrationsData.length === 0) { + log.done(`Nothing to migrate ⚡️`); + return; + } + + let stateSaves: SystemState[] = []; + + stateSaves.push({ ...this.state }); + + let index = 0; + for (; index < this.migrationsData.length; index++) { + const migrationData = this.migrationsData[index]; + + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + + log.info(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + + try { + this.state.networkState = await migration.up(this.state.networkState); + + try { + await migration.healthCheck(stateSaves[index].networkState, this.state.networkState); + log.success('Health check success ✨ '); + } catch (e) { + log.error('Health check failed'); + log.error(e.stack); + break; + } + + // if health check passed, update the state and write it to the system + this.state = { + migrationState: { latestMigration: migrationData.migrationTimestamp }, + networkState: this.state.networkState + }; + this.IO.state.write(this.state); + stateSaves.push({ ...this.state }); + } catch (e) { + log.error('Migration execution failed'); + log.error(e.stack); + log.error('Aborting.'); + return; + } + } + + // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert + if (index != this.migrationsData.length) { + log.warning('Reverting ...'); + + const migrationData = this.migrationsData[index]; + log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + + this.state.networkState = await migration.down(stateSaves[index].networkState, this.state.networkState); + + // if revert passed, update the state and write it to the system + this.state.migrationState = { latestMigration: stateSaves[index].migrationState.latestMigration }; + + this.IO.state.write(this.state); + log.success(`${migrationData.fileName} reverted`); + } + + log.done(`\nMigration(s) complete ⚡️`); + }; + + deploy = async ( + factory: ContractBuilder, + ...args: Parameters['deploy']> + ): Promise['deploy']>> => { + log.basicExecutionHeader('Deploying', `${factory.contractName} 🚀 `, args); + const contract = await factory.deploy(...([...args, this.overrides] as any)); + + log.debug(`Deployment Tx: `, contract.deployTransaction.hash); + log.greyed(`Waiting to be mined...`); + + const receipt = await contract.deployTransaction.wait(this.executionSettings.confirmationToWait); + if (receipt.status !== 1) { + throw new Error(`Error deploying, tx: ${contract.deployTransaction.hash}`); + } + + log.success(`Deployed ${factory.contractName} at ${contract.address} 🚀 !`); + return contract; + }; + + execute = async Promise>( + executionInstruction: string, + func: T, + ...args: Parameters + ): Promise => { + log.basicExecutionHeader('Executing', executionInstruction, args); + + const tx = await func(...args, this.overrides); + log.debug(`Executing tx: `, tx.hash); + + const receipt = await tx.wait(this.executionSettings.confirmationToWait); + if (receipt.status !== 1) { + throw new Error(`Error executing, tx: ${tx.hash}`); + } + + log.success(`Executed ✨`); + return receipt; + }; + + deployProxy = async ( + admin: ProxyAdmin, + logicContractToDeploy: ContractBuilder, + initializeArgs: initializeArgs, + ...ctorArgs: Parameters + ): Promise> => { + log.debug('Deploying proxy'); + const logicContract = await this.deploy(logicContractToDeploy, ...ctorArgs); + + const data = + initializeArgs === 'skipInit' + ? [] + : logicContract.interface.encodeFunctionData('initialize', initializeArgs); + + const proxy = await this.deploy( + this.contracts.TransparentUpgradeableProxy, + logicContract.address, + admin.address, + data + ); + + log.success('Proxy deployed 🚀 '); + return { + proxy: await logicContractToDeploy.attach(proxy.address), + logicContractAddress: logicContract.address + }; + }; + + upgradeProxy = async ( + admin: ProxyAdmin, + logicContractToDeploy: ContractBuilder, + proxyAddress: string, + initializeArgs: + | { + params: Parameters; + initializeFctName: string; + } + | 'skipInit', + ...ctorArgs: Parameters + ): Promise> => { + log.debug('Upgrading proxy'); + const newLogicContract = await this.deploy(logicContractToDeploy, ...ctorArgs); + + const data = + initializeArgs === 'skipInit' + ? [] + : newLogicContract.interface.encodeFunctionData( + initializeArgs.initializeFctName, + initializeArgs.params + ); + + if (initializeArgs === 'skipInit') + await this.execute('Upgrading proxy', admin.upgrade, proxyAddress, newLogicContract.address); + else + await this.execute( + `Upgrading proxy and call ${initializeArgs.initializeFctName}`, + admin.upgradeAndCall, + proxyAddress, + newLogicContract.address, + data + ); + + log.success('Proxy upgraded 🚀 '); + return { + proxy: await logicContractToDeploy.attach(proxyAddress), + logicContractAddress: newLogicContract.address + }; + }; +} diff --git a/packages/v3/migration/engine/errors.ts b/packages/v3/migration/engine/errors.ts deleted file mode 100644 index c5fa3da67..000000000 --- a/packages/v3/migration/engine/errors.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; - -export class ExecutionError extends Error { - tx: ContractTransaction; - receipt: ContractReceipt; - - constructor(tx: ContractTransaction, receipt: ContractReceipt) { - super('Execution Error'); - this.receipt = receipt; - this.tx = tx; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, ExecutionError); - } - } -} diff --git a/packages/v3/migration/engine/executions.ts b/packages/v3/migration/engine/executions.ts deleted file mode 100644 index 474589d3a..000000000 --- a/packages/v3/migration/engine/executions.ts +++ /dev/null @@ -1,127 +0,0 @@ -import Contracts, { ContractBuilder, Contract } from '../../components/Contracts'; -import { ProxyAdmin } from '../../typechain'; -import { ExecutionError } from './errors'; -import { executionSettings } from './initialization'; -import { log } from './logger'; -import { ContractReceipt, ContractTransaction } from '@ethersproject/contracts'; -import { ContractFactory, Overrides } from 'ethers'; - -export const initExecutionFunctions = (contracts: typeof Contracts, executionSettings: executionSettings) => { - const overrides: Overrides = { - gasPrice: executionSettings.gasPrice - }; - - const deploy = async ( - factory: ContractBuilder, - ...args: Parameters['deploy']> - ): Promise['deploy']>> => { - log.basicExecutionHeader('Deploying', `${factory.contractName} 🚀 `, args); - - const contract = await factory.deploy(...([...args, overrides] as any)); - - log.debug(`Deployment Tx: `, contract.deployTransaction.hash); - log.greyed(`Waiting to be mined...`); - - const receipt = await contract.deployTransaction.wait(executionSettings.confirmationToWait); - if (receipt.status !== 1) { - log.error(`Error while executing`); - throw new ExecutionError(contract.deployTransaction, receipt); - } - - log.success(`Deployed ${factory.contractName} at ${contract.address} 🚀 !`); - return contract; - }; - - const execute = async Promise>( - executionInstruction: string, - func: T, - ...args: Parameters - ): Promise => { - log.basicExecutionHeader('Executing', executionInstruction, args); - - const tx = await func(...args, overrides); - log.debug(`Executing tx: `, tx.hash); - - const receipt = await tx.wait(executionSettings.confirmationToWait); - if (receipt.status !== 1) { - log.error(`Error while executing`); - throw new ExecutionError(tx, receipt); - } - - log.success(`Executed ✨`); - return receipt; - }; - - type initializeArgs = Parameters | 'skipInit'; - type proxy = { proxy: Contract; logicContractAddress: string }; - const deployProxy = async ( - admin: ProxyAdmin, - logicContractToDeploy: ContractBuilder, - initializeArgs: initializeArgs, - ...ctorArgs: Parameters - ): Promise> => { - log.debug('Deploying proxy'); - const logicContract = await deploy(logicContractToDeploy, ...ctorArgs); - - const data = - initializeArgs === 'skipInit' - ? [] - : logicContract.interface.encodeFunctionData('initialize', initializeArgs); - - const proxy = await deploy(contracts.TransparentUpgradeableProxy, logicContract.address, admin.address, data); - - log.success('Proxy deployed 🚀 '); - return { - proxy: await logicContractToDeploy.attach(proxy.address), - logicContractAddress: logicContract.address - }; - }; - - const upgradeProxy = async ( - admin: ProxyAdmin, - logicContractToDeploy: ContractBuilder, - proxyAddress: string, - initializeArgs: - | { - params: Parameters; - initializeFctName: string; - } - | 'skipInit', - ...ctorArgs: Parameters - ): Promise> => { - log.debug('Upgrading proxy'); - const newLogicContract = await deploy(logicContractToDeploy, ...ctorArgs); - - const data = - initializeArgs === 'skipInit' - ? [] - : newLogicContract.interface.encodeFunctionData( - initializeArgs.initializeFctName, - initializeArgs.params - ); - - if (initializeArgs === 'skipInit') - await execute('Upgrading proxy', admin.upgrade, proxyAddress, newLogicContract.address); - else - await execute( - `Upgrading proxy and call ${initializeArgs.initializeFctName}`, - admin.upgradeAndCall, - proxyAddress, - newLogicContract.address, - data - ); - - log.success('Proxy upgraded 🚀 '); - return { - proxy: await logicContractToDeploy.attach(proxyAddress), - logicContractAddress: newLogicContract.address - }; - }; - - return { - deploy, - execute, - deployProxy, - upgradeProxy - }; -}; diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts new file mode 100644 index 000000000..1519dcd1e --- /dev/null +++ b/packages/v3/migration/engine/index.ts @@ -0,0 +1,17 @@ +import { Engine } from './engine'; +import { defaultArgs } from './types'; +import { LedgerSigner } from '@ethersproject/hardware-wallets'; +import { ethers } from 'hardhat'; +import { HardhatRuntimeEnvironment as hre } from 'hardhat/types'; + +export let engine: Engine; + +export default async (args: defaultArgs, hre: hre, next: (a: any, b: hre) => any) => { + // init signer + const signer = args.ledger + ? new LedgerSigner(ethers.provider, 'hid', args.ledgerPath) + : (await ethers.getSigners())[0]; + + engine = new Engine(hre, args, signer, await signer.getAddress()); + return next(args, hre); +}; diff --git a/packages/v3/migration/engine/initialization.ts b/packages/v3/migration/engine/initialization.ts deleted file mode 100644 index fe6540501..000000000 --- a/packages/v3/migration/engine/initialization.ts +++ /dev/null @@ -1,67 +0,0 @@ -import Contracts from '../../components/Contracts'; -import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.config'; -import { MIGRATION_CONFIG } from './config'; -import { initExecutionFunctions } from './executions'; -import { log } from './logger'; -import { LedgerSigner } from '@ethersproject/hardware-wallets'; -import { BigNumberish } from 'ethers'; -import { parseUnits } from 'ethers/lib/utils'; -import { ethers, network } from 'hardhat'; - -export type defaultMigrationArgs = { - ledger: boolean; - ledgerPath: string; - gasPrice: number; - minBlockConfirmations: number; -}; - -export type executionSettings = { gasPrice?: BigNumberish; confirmationToWait: number }; - -export const initMigration = async (args: defaultMigrationArgs) => { - // init networking - const networkName = FORK_CONFIG ? FORK_CONFIG.networkName : network.name; - const migrationNetworkConfig = { - isFork: networkName.startsWith(FORK_PREFIX), - originalNetwork: networkName.substring(FORK_PREFIX.length), - networkName: networkName - }; - - // init signer - const signer = args.ledger - ? new LedgerSigner(ethers.provider, 'hid', args.ledgerPath) - : (await ethers.getSigners())[0]; - - // init execution settings - const executionSettings: executionSettings = { - confirmationToWait: args.minBlockConfirmations - }; - - if ( - executionSettings.confirmationToWait <= 1 && - !(migrationNetworkConfig.isFork || migrationNetworkConfig.networkName === 'hardhat') - ) { - throw new Error( - `Transaction confirmation should be higher than 1 for ${migrationNetworkConfig.networkName} use. Aborting` - ); - } - - if (!args.gasPrice && !(migrationNetworkConfig.isFork || migrationNetworkConfig.networkName === 'hardhat')) { - throw new Error(`Gas Price shouldn't be equal to 0 for ${migrationNetworkConfig.networkName} use. Aborting`); - } - executionSettings.gasPrice = args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei'); - - // init contracts - const contracts = Contracts.connect(signer); - - // init execution functions - const executionFunctions = initExecutionFunctions(contracts, executionSettings); - - log.migrationConfig(await signer.getAddress(), MIGRATION_CONFIG, args.ledger, executionSettings); - - return { - signer, - contracts, - executionSettings, - executionFunctions - }; -}; diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts index 669cb2904..9d5f80bea 100644 --- a/packages/v3/migration/engine/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -1,6 +1,7 @@ -import { MIGRATION_CONFIG } from './config'; -import { executionSettings } from './initialization'; +import { Engine } from './engine'; +import { ExecutionSettings } from './types'; import chalk from 'chalk'; +import { Overrides } from 'ethers'; export const palette = { white: (...str: string[]) => console.log(`${str}`), @@ -37,9 +38,10 @@ export const log = { migrationConfig: ( signerAddress: string, - config: typeof MIGRATION_CONFIG, isLedger: boolean, - executionSettings: executionSettings + networkConfig: typeof Engine.prototype.networkConfig, + executionSettings: ExecutionSettings, + overrides: Overrides ) => { palette.yellow(`**********************`); palette.yellow(`** Migration Config **`); @@ -48,9 +50,9 @@ export const log = { palette.yellow(`Basic info`); palette.white(` Signer: ${signerAddress} ${isLedger ? '(ledger)' : ''}`); palette.yellow(`Network info`); - palette.white(` Network: ${config.networkName}`); + palette.white(` Network: ${networkConfig.networkName}`); palette.yellow(`Overrides:`); - palette.white(` GasPrice: ${executionSettings.gasPrice} (gwei)`); + palette.white(` GasPrice: ${overrides.gasPrice} (gwei)`); palette.yellow(`Execution Setting:`); palette.white(` Confirmation to wait: ${executionSettings.confirmationToWait}`); palette.yellow(`********************`); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 85433614b..7a5837f19 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,7 +1,4 @@ -import { Contracts } from '../../components/Contracts'; -import { MIGRATION_CONFIG } from './config'; -import { initExecutionFunctions } from './executions'; -import { Signer } from 'ethers'; +import { Engine } from './engine'; export type SystemState = { migrationState: { @@ -10,32 +7,35 @@ export type SystemState = { networkState: any; }; -export type deployedContract = string; +export type Deployment = { + contractName: string; + abi: {}; + bytecode: {}; +}; +export type SystemDeployments = { [address: string]: Deployment }; +export type deployedContract = string; export type deployedProxy = { proxyContract: deployedContract; logicContract: deployedContract }; -export type executionFunctions = ReturnType; +export type MigrationData = { + fullPath: string; + fileName: string; + migrationTimestamp: number; +}; + +export type ExecutionSettings = { + confirmationToWait: number; +}; + +export type defaultArgs = { + ledger: boolean; + ledgerPath: string; + gasPrice: number; + minBlockConfirmations: number; +}; export interface Migration { - up: ( - signer: Signer, - contracts: Contracts, - initialState: any, - executionFunctions: executionFunctions - ) => Promise; - healthCheck: ( - signer: Signer, - config: typeof MIGRATION_CONFIG, - contracts: Contracts, - initialState: any, - newState: any, - executionFunctions: executionFunctions - ) => Promise; - down: ( - signer: Signer, - contracts: Contracts, - initialState: any, - newState: any, - executionFunctions: executionFunctions - ) => Promise; + up: (initialState: any) => Promise; + healthCheck: (initialState: any, newState: any) => Promise; + down: (initialState: any, newState: any) => Promise; } diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils.ts index 79d9a8628..9a96964a7 100644 --- a/packages/v3/migration/engine/utils.ts +++ b/packages/v3/migration/engine/utils.ts @@ -11,7 +11,7 @@ export const lazyAction = (pathToAction: string) => { ? pathToAction : path.join(hre.config.paths.root, pathToAction); const action = importCsjOrEsModule(actualPath); - - return action(taskArgs, hre, runSuper); + const start = importCsjOrEsModule(path.join(hre.config.paths.root, 'migration/engine/index.ts')); + return start(taskArgs, hre, action); }; }; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index c24633849..2cf896b30 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,11 +1,11 @@ -import { defaultMigrationArgs } from './engine/initialization'; +import { defaultArgs } from './engine/types'; import { lazyAction } from './engine/utils'; import { task, types } from 'hardhat/config'; import path from 'path'; export const PATH_TO_TASKS_FOLDER = 'migration/tasks'; -export type migrateParamTask = defaultMigrationArgs & { +export type migrateParamTask = defaultArgs & { reset: boolean; }; task('migrate', 'Migrate the network') diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index 78c6a8bbf..91f003555 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -1,5 +1,8 @@ +import { engine } from '../../migration/engine'; import { deployedContract, Migration } from '../../migration/engine/types'; +const { signer, deploy, contracts } = engine; + export type InitialState = {}; export type NextState = InitialState & { @@ -8,7 +11,7 @@ export type NextState = InitialState & { }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + up: async (initialState: InitialState): Promise => { const BNTToken = await deploy( contracts.TestERC20Token, 'Bancor Network Token', @@ -40,14 +43,7 @@ const migration: Migration = { }; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => { + healthCheck: async (initialState: InitialState, state: NextState) => { const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) @@ -56,13 +52,7 @@ const migration: Migration = { throw new Error('Invalid Role'); }, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts index 512de15d0..2291f34c4 100644 --- a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts @@ -1,12 +1,15 @@ +import { engine } from '../../migration/engine'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './0_deploy_basics'; +const { signer, deploy, contracts } = engine; + export type NextState = InitialState & { proxyAdmin: deployedContract; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { + up: async (initialState: InitialState): Promise => { const proxyAdmin = await deploy(contracts.ProxyAdmin); return { @@ -16,26 +19,13 @@ const migration: Migration = { }; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => { + healthCheck: async (initialState: InitialState, state: NextState) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts index 40c7120a7..b4081871d 100644 --- a/packages/v3/migration/migrations/2_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -1,12 +1,15 @@ +import { engine } from '../../migration/engine'; import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './1_deploy_proxyAdmin'; +const { signer, deploy, contracts, deployProxy } = engine; + export type NextState = InitialState & { networkSettings: deployedProxy; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { + up: async (initialState: InitialState): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); const networkSettings = await deployProxy(proxyAdmin, contracts.NetworkSettings, []); @@ -21,26 +24,13 @@ const migration: Migration = { }; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => { + healthCheck: async (initialState: InitialState, state: NextState) => { const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings.proxyContract); if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/3_deploy_network.ts b/packages/v3/migration/migrations/3_deploy_network.ts index a18674ddd..f9010749e 100644 --- a/packages/v3/migration/migrations/3_deploy_network.ts +++ b/packages/v3/migration/migrations/3_deploy_network.ts @@ -1,12 +1,15 @@ +import { engine } from '../../migration/engine'; import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './2_deploy_networkSettings'; +const { signer, deploy, contracts, deployProxy } = engine; + export type NextState = InitialState & { bancorNetwork: deployedProxy; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { + up: async (initialState: InitialState): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); const bancorNetwork = await deployProxy( @@ -28,22 +31,9 @@ const migration: Migration = { }; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => {}, - - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + healthCheck: async (initialState: InitialState, state: NextState) => {}, + + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts index fd12e088f..85d458f07 100644 --- a/packages/v3/migration/migrations/4_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -1,12 +1,15 @@ +import { engine } from '../../migration/engine'; import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './3_deploy_network'; +const { signer, deploy, contracts, deployProxy } = engine; + export type NextState = InitialState & { vault: deployedProxy; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { + up: async (initialState: InitialState): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); const bancorVault = await deployProxy(proxyAdmin, contracts.BancorVault, [], initialState.BNT.token); @@ -21,27 +24,14 @@ const migration: Migration = { }; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => { + healthCheck: async (initialState: InitialState, state: NextState) => { const bancorVault = await contracts.BancorVault.attach(state.vault.proxyContract); if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) throw new Error('Invalid Owner'); }, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts index 3573feac7..939a1442c 100644 --- a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts @@ -1,14 +1,17 @@ +import { engine } from '../../migration/engine'; import { NETWORK_TOKEN_POOL_TOKEN_NAME, NETWORK_TOKEN_POOL_TOKEN_SYMBOL } from '../../test/helpers/Constants'; import { deployedContract, deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './4_deploy_vault'; +const { signer, deploy, contracts, deployProxy, execute } = engine; + export type NextState = InitialState & { networkTokenPool: deployedProxy; networkPoolToken: deployedContract; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { + up: async (initialState: InitialState): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); const networkPoolToken = await contracts.PoolToken.deploy( @@ -43,22 +46,9 @@ const migration: Migration = { }; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => {}, + healthCheck: async (initialState: InitialState, state: NextState) => {}, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index ef22cfe1d..e69460bb1 100644 --- a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -1,12 +1,15 @@ +import { engine } from '../../migration/engine'; import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './5_deploy_networkTokenPool'; +const { signer, deploy, contracts, deployProxy, execute } = engine; + export type NextState = InitialState & { pendingWithdrawals: deployedProxy; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { + up: async (initialState: InitialState): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); const pendingWithdrawals = await deployProxy( @@ -30,26 +33,13 @@ const migration: Migration = { }; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => { + healthCheck: async (initialState: InitialState, state: NextState) => { const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals.proxyContract); if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index 9ef4ef221..2cf210e47 100644 --- a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -1,12 +1,15 @@ +import { engine } from '../../migration/engine'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './6_deploy_pendingWithdrawals'; +const { signer, deploy, contracts } = engine; + export type NextState = InitialState & { poolCollection: deployedContract; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { + up: async (initialState: InitialState): Promise => { const poolCollection = await deploy(contracts.PoolCollection, initialState.bancorNetwork.proxyContract); return { ...initialState, @@ -15,26 +18,13 @@ const migration: Migration = { }; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => { + healthCheck: async (initialState: InitialState, state: NextState) => { const poolCollection = await contracts.PoolCollection.attach(state.poolCollection); if ((await poolCollection.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index 0b6be2723..c163710b8 100644 --- a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -1,10 +1,13 @@ +import { engine } from '../../migration/engine'; import { Migration } from '../engine/types'; import { NextState as InitialState } from './7_deploy_liquidityPoolCollection'; +const { signer, deploy, contracts, execute } = engine; + export type NextState = InitialState; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute, deployProxy }): Promise => { + up: async (initialState: InitialState): Promise => { const bancorNetwork = await contracts.BancorNetwork.attach(initialState.bancorNetwork.proxyContract); await execute( @@ -16,26 +19,13 @@ const migration: Migration = { return initialState; }, - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => { + healthCheck: async (initialState: InitialState, state: NextState) => { const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork.proxyContract); if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); }, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/migrations/9_upgrade_networkSettings.ts b/packages/v3/migration/migrations/9_upgrade_networkSettings.ts index 6f6e78f0f..eb084b6a7 100644 --- a/packages/v3/migration/migrations/9_upgrade_networkSettings.ts +++ b/packages/v3/migration/migrations/9_upgrade_networkSettings.ts @@ -1,15 +1,13 @@ +import { engine } from '../../migration/engine'; import { Migration } from '../engine/types'; import { NextState as InitialState } from './8_deploy_initializeBancorNetwork'; +const { signer, deploy, contracts, upgradeProxy } = engine; + export type NextState = InitialState; const migration: Migration = { - up: async ( - signer, - contracts, - initialState: InitialState, - { deploy, execute, deployProxy, upgradeProxy } - ): Promise => { + up: async (initialState: InitialState): Promise => { const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); const networkSettings = await upgradeProxy( proxyAdmin, @@ -24,7 +22,7 @@ const migration: Migration = { }; }, - healthCheck: async (signer, config, contracts, initialState: InitialState, state: NextState) => { + healthCheck: async (initialState: InitialState, state: NextState) => { const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); const implementationAddress = await proxyAdmin.getProxyImplementation(state.networkSettings.proxyContract); @@ -36,13 +34,7 @@ const migration: Migration = { } }, - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index aeed4ee5a..301960a7c 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -1,199 +1,10 @@ import { migrateParamTask } from '..'; -import { SystemState } from '../../migration/engine/types'; -import { MIGRATION_DATA_FOLDER, MIGRATION_FOLDER, NETWORK_NAME, MIGRATION_CONFIG } from '../engine/config'; -import { initMigration } from '../engine/initialization'; -import { log } from '../engine/logger'; -import { Migration } from '../engine/types'; -import { importCsjOrEsModule } from '../engine/utils'; -import fs from 'fs'; +import { engine } from '../engine'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import path from 'path'; export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { - const { signer, contracts, migrationsData, initialState, writeState, executionFunctions } = await initMigrate( - hre, - args - ); - - let currentState = initialState; - - // if there is no migration to run, exit - if (migrationsData.length === 0) { - log.done(`Nothing to migrate ⚡️`); - return; - } - - let stateSaves: SystemState[] = []; - - stateSaves.push({ ...initialState }); - - let index = 0; - for (; index < migrationsData.length; index++) { - const migrationData = migrationsData[index]; - - const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - - log.info(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - - try { - currentState.networkState = await migration.up( - signer, - contracts, - currentState.networkState, - executionFunctions - ); - - try { - await migration.healthCheck( - signer, - MIGRATION_CONFIG, - contracts, - stateSaves[index].networkState, - currentState.networkState, - executionFunctions - ); - log.success('Health check success ✨ '); - } catch (e) { - log.error('Health check failed'); - log.error(e.stack); - break; - } - - // if health check passed, update the state and write it to the system - currentState = { - migrationState: { latestMigration: migrationData.migrationTimestamp }, - networkState: currentState.networkState - }; - await writeState(currentState); - stateSaves.push({ ...currentState }); - } catch (e) { - log.error('Migration execution failed'); - log.error(e.stack); - log.error('Aborting.'); - return; - } - } - - // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert - if (index != migrationsData.length) { - log.warning('Reverting ...'); - - const migrationData = migrationsData[index]; - log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - - const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - - currentState.networkState = await migration.down( - signer, - contracts, - stateSaves[index].networkState, - currentState.networkState, - executionFunctions - ); - - // if revert passed, update the state and write it to the system - currentState.migrationState = { latestMigration: stateSaves[index].migrationState.latestMigration }; - - writeState(currentState); - log.success(`${migrationData.fileName} reverted`); - } - - log.done(`\nMigration(s) complete ⚡️`); -}; - -type migrationData = { - fullPath: string; - fileName: string; - migrationTimestamp: number; -}; -export const initMigrate = async (hre: HardhatRuntimeEnvironment, args: migrateParamTask) => { - const { signer, contracts, executionSettings, executionFunctions } = await initMigration(args); - - const pathToState = path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, NETWORK_NAME); - - // if reset, delete all the files in the corresponding network folder if (args.reset) { - log.warning(`Resetting ${NETWORK_NAME} migratation folder`); - fs.rmSync(pathToState, { - recursive: true, - force: true - }); - } - - // if network folder doesn't exist, create it - if (!fs.existsSync(pathToState)) { - fs.mkdirSync(pathToState); + engine.resetIO(); } - - // read all files into the folder and fetch any state file - const pathToStateFolder = fs.readdirSync(pathToState); - const stateFile = pathToStateFolder.find((fileName: string) => fileName === 'state.json'); - - const writeState = async (state: SystemState) => { - fs.writeFileSync(path.join(pathToState, 'state.json'), JSON.stringify(state, null, 4)); - }; - const fetchState = (pathToState: string) => { - return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; - }; - - let state = { - migrationState: { - latestMigration: -1 - }, - networkState: {} - }; - - // if network is a fork fetch info from original network - if (args.reset && MIGRATION_CONFIG.isFork) { - try { - log.warning(`Fetching initial state from ${MIGRATION_CONFIG.originalNetwork}`); - state = fetchState( - path.join(hre.config.paths.root, MIGRATION_DATA_FOLDER, MIGRATION_CONFIG.originalNetwork) - ); - } catch (e) { - log.error( - `${MIGRATION_CONFIG.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` - ); - process.exit(); - } - } - - // if there is no state file in the network's folder, create an empty one - if (!stateFile) { - writeState(state); - } - const initialState = fetchState(pathToState); - - // generate migration files - const pathToMigrationFiles = path.join(hre.config.paths.root, MIGRATION_FOLDER); - const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); - const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); - const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); - const migrationsData: migrationData[] = []; - for (const migrationFilePath of migrationFilesPath) { - const fileName = path.basename(migrationFilePath); - const migrationId = Number(fileName.split('_')[0]); - if (migrationId > initialState.migrationState.latestMigration) { - migrationsData.push({ - fullPath: migrationFilePath, - fileName: fileName, - migrationTimestamp: migrationId - }); - } - } - - // even if migrations should be automatically sorted by the dir fetching, sort again just in case - migrationsData.sort((a, b) => - a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 - ); - - return { - signer, - contracts, - executionFunctions, - executionSettings, - initialState, - writeState, - migrationsData - }; + await engine.migrate(); }; From e00bc847f46a1849a5da98cf7795832221d092d5 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 7 Sep 2021 02:58:21 +0200 Subject: [PATCH 058/164] healthcheck of engine in function --- packages/v3/migration/engine/engine.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index 82338b1f6..6912c4b8d 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -62,7 +62,14 @@ export class Engine { }; this.contracts = Contracts.connect(signer); - // healthcheck + this.healthcheck(); + this.initIO(); + this.initMigration(); + + log.migrationConfig(signerAddress, args.ledger, this.networkConfig, this.executionSettings, this.overrides); + } + + healthcheck = () => { const isForkOrHardhat = this.networkConfig.isFork || this.networkConfig.networkName === 'hardhat'; if (this.executionSettings.confirmationToWait <= 1 && !isForkOrHardhat) { throw new Error( @@ -72,12 +79,7 @@ export class Engine { if (!this.overrides.gasPrice && !isForkOrHardhat) { throw new Error(`Gas Price shouldn't be equal to 0 for ${this.networkConfig.networkName} use. Aborting`); } - - this.initIO(); - this.initMigration(); - - log.migrationConfig(signerAddress, args.ledger, this.networkConfig, this.executionSettings, this.overrides); - } + }; IO = { state: { From 08295d822eba348e9e29558875f14763b6ea1f12 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 7 Sep 2021 04:20:43 +0200 Subject: [PATCH 059/164] fix reset not working due to engine --- packages/v3/migration/engine/engine.ts | 63 ++++++++++++++------------ 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index 6912c4b8d..21f82742c 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -30,7 +30,7 @@ export class Engine { readonly contracts: ContractsType; state!: SystemState; - deployments!: SystemDeployments; + deployment!: SystemDeployments; networkConfig = { networkName: NETWORK_NAME, @@ -42,7 +42,7 @@ export class Engine { : NETWORK_NAME }; - readonly migrationsData: MigrationData[] = []; + migrationsData: MigrationData[] = []; constructor(hre: HardhatRuntimeEnvironment, args: defaultArgs, signer: Signer, signerAddress: string) { this.hre = hre; @@ -100,7 +100,7 @@ export class Engine { path.join(this.pathToNetworkFolder, 'deployment.json'), JSON.stringify(deployments, null, 4) + `\n` ); - this.deployments = deployments; + this.deployment = deployments; }, fetch: (pathToState: string) => { return JSON.parse( @@ -117,8 +117,11 @@ export class Engine { force: true }); + this.migrationsData = []; this.initIO(); + this.initMigration(); }; + initIO = () => { let defaultState: SystemState = { migrationState: { @@ -134,35 +137,39 @@ export class Engine { } // read all files into the folder and fetch needed files - const pathToStateFolder = fs.readdirSync(this.pathToNetworkFolder); + const pathToNetworkFolderFiles = fs.readdirSync(this.pathToNetworkFolder); - let state = defaultState; - let deployment = defaultDeployment; + // if there is no state file in the network's folder, create it along with deployment file + const pathToNetworkFolderState = pathToNetworkFolderFiles.find((f: string) => f === 'state.json'); + if (!pathToNetworkFolderState) { + this.IO.state.write(defaultState); + this.IO.deployment.write(defaultDeployment); + } - // if there is no state file in the network's folder, create it - if (!pathToStateFolder.find((fileName: string) => fileName === 'state.json')) { - if (this.networkConfig.isFork) { - try { - const pathToOriginalNetworkFolder = path.join( - this.hre.config.paths.root, - MIGRATION_DATA_FOLDER, - this.networkConfig.originalNetwork - ); - console.log(pathToOriginalNetworkFolder); - log.warning(`Fetching initial state from ${this.networkConfig.originalNetwork}`); - state = this.IO.state.fetch(pathToOriginalNetworkFolder); - log.warning(`Fetching initial deployments from ${this.networkConfig.originalNetwork}`); - deployment = this.IO.deployment.fetch(pathToOriginalNetworkFolder); - } catch (e) { - log.error( - `${this.networkConfig.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` - ); - process.exit(); - } + // if it's a fork we need to get state and deployment files from the original network, + // if not just load the current state and deployment into the engine + if (this.networkConfig.isFork) { + try { + const pathToOriginalNetworkFolder = path.join( + this.hre.config.paths.root, + MIGRATION_DATA_FOLDER, + this.networkConfig.originalNetwork + ); + console.log(pathToOriginalNetworkFolder); + log.warning(`Fetching initial state from ${this.networkConfig.originalNetwork}`); + this.IO.state.write(this.IO.state.fetch(pathToOriginalNetworkFolder)); + log.warning(`Fetching initial deployments from ${this.networkConfig.originalNetwork}`); + this.IO.deployment.write(this.IO.deployment.fetch(pathToOriginalNetworkFolder)); + } catch (e) { + log.error( + `${this.networkConfig.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` + ); + process.exit(); } + } else { + this.state = this.IO.state.fetch(this.pathToNetworkFolder); + this.deployment = this.IO.deployment.fetch(this.pathToNetworkFolder); } - this.IO.state.write(state); - this.IO.deployment.write(deployment); }; initMigration = () => { From b5340a4095a3a0031b283850cb3630baf7640064 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 8 Sep 2021 01:42:10 +0200 Subject: [PATCH 060/164] WIP: improve migration management + add ABI + bytecode storage on contract deployment --- packages/v3/components/Contracts.ts | 4 +- packages/v3/migration/README.md | 72 ++--- packages/v3/migration/engine/engine.ts | 298 ++++-------------- .../v3/migration/engine/executionFunctions.ts | 120 +++++++ packages/v3/migration/engine/io.ts | 40 +++ packages/v3/migration/engine/migrate.ts | 77 +++++ packages/v3/migration/engine/types.ts | 5 + packages/v3/migration/index.ts | 4 +- .../migration/migrations/0_deploy_basics.ts | 3 +- .../migrations/1_deploy_proxyAdmin.ts | 3 +- .../migrations/2_deploy_networkSettings.ts | 3 +- .../migration/migrations/3_deploy_network.ts | 3 +- .../v3/migration/migrations/4_deploy_vault.ts | 3 +- .../migrations/5_deploy_networkTokenPool.ts | 3 +- .../migrations/6_deploy_pendingWithdrawals.ts | 3 +- .../7_deploy_liquidityPoolCollection.ts | 3 +- .../8_deploy_initializeBancorNetwork.ts | 3 +- .../migrations/9_upgrade_networkSettings.ts | 3 +- .../v3/migration/tasks/createMigration.ts | 50 +-- packages/v3/migration/tasks/migrate.ts | 7 +- packages/v3/test/helpers/Factory.ts | 4 +- 21 files changed, 379 insertions(+), 332 deletions(-) create mode 100644 packages/v3/migration/engine/executionFunctions.ts create mode 100644 packages/v3/migration/engine/io.ts create mode 100644 packages/v3/migration/engine/migrate.ts diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 6f1720757..6206f761c 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -37,8 +37,8 @@ type AsyncReturnType any> = T extends (...args: any) export type Contract = AsyncReturnType; export interface ContractBuilder { - contractName: string; metadata: { + contractName: string; abi: Object; bytecode: string; }; @@ -54,8 +54,8 @@ const deployOrAttach = ( initialSigner?: Signer ): ContractBuilder => { return { - contractName, metadata: { + contractName: contractName, abi: factoryConstructor.abi, bytecode: factoryConstructor.bytecode }, diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index c2768c7da..72633540a 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -33,27 +33,9 @@ A migration file is a typescript file that exposes a particular object respectin ```ts export interface Migration { - up: ( - signer: Signer, - contracts: Contracts, - initialState: any, - executionFunctions: executionFunctions - ) => Promise; - healthCheck: ( - signer: Signer, - config: typeof MIGRATION_CONFIG, - contracts: Contracts, - initialState: any, - newState: any, - executionFunctions: executionFunctions - ) => Promise; - down: ( - signer: Signer, - contracts: Contracts, - initialState: any, - newState: any, - executionFunctions: executionFunctions - ) => Promise; + up: (initialState: any) => Promise; + healthCheck: (initialState: any, newState: any) => Promise; + down: (initialState: any, newState: any) => Promise; } ``` @@ -128,38 +110,38 @@ To fork the network `mainnet` you need to: ### What does a basic migration file looks like ? ```ts -import { deployedContract, Migration } from 'migration/engine/types'; +import { engine } from '../../migration/engine'; +import { deployedContract, Migration } from '../../migration/engine/types'; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type InitialState = {}; -export type State = { - BNT: deployedContract; +export type NextState = InitialState & { + BNT: { token: deployedContract; governance: deployedContract }; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { - const BNT = await deploy(contracts.TestERC20Token, 'BNT', 'BNT', 1000000); + up: async (initialState: InitialState): Promise => { + const BNTToken = await deploy( + contracts.TestERC20Token, + 'Bancor Network Token', + 'BNT', + '100000000000000000000000000' + ); + const BNTGovernance = await deploy(contracts.TokenGovernance, BNTToken.address); return { ...initialState, - - BNT: BNT.address + BNT: { + token: BNTToken.address, + governance: BNTGovernance.address + } }; }, - - healthCheck: async ( - signer, - config, - contracts, - initialState: InitialState, - state: NextState, - { deploy, execute } - ) => {}, - - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + healthCheck: async (initialState: InitialState, state: NextState) => { + const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); + if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) + throw new Error('Invalid Role'); + }, + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index 21f82742c..51ebf87c0 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -1,10 +1,12 @@ -import Contracts, { ContractBuilder, ContractsType, Contract } from '../../components/Contracts'; +import Contracts, { ContractsType } from '../../components/Contracts'; import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.extended.config'; -import { ProxyAdmin } from '../../typechain'; +import { initExecutionFunctions } from './executionFunctions'; +import { initIO } from './io'; import { log } from './logger'; +import { migrate } from './migrate'; import { defaultArgs, ExecutionSettings, Migration, MigrationData, SystemDeployments, SystemState } from './types'; import { importCsjOrEsModule } from './utils'; -import { ContractFactory, ContractReceipt, ContractTransaction, Overrides, Signer } from 'ethers'; +import { Overrides, Signer } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; import fs from 'fs'; import { network } from 'hardhat'; @@ -16,8 +18,22 @@ export const MIGRATION_DATA_FOLDER = 'migration/data'; const NETWORK_NAME = FORK_CONFIG ? FORK_CONFIG.networkName : network.name; -type initializeArgs = Parameters | 'skipInit'; -type proxy = { proxy: Contract; logicContractAddress: string }; +const defaultMigration: { + state: SystemState; + deployment: SystemDeployments; + migrationsData: MigrationData[]; + stateSaves: SystemState[]; +} = { + state: { + migrationState: { + latestMigration: -1 + }, + networkState: {} + }, + deployment: {}, + migrationsData: [], + stateSaves: [] +}; export class Engine { readonly hre: HardhatRuntimeEnvironment; @@ -29,9 +45,6 @@ export class Engine { readonly overrides: Overrides; readonly contracts: ContractsType; - state!: SystemState; - deployment!: SystemDeployments; - networkConfig = { networkName: NETWORK_NAME, isFork: NETWORK_NAME.startsWith(FORK_PREFIX), @@ -42,18 +55,21 @@ export class Engine { : NETWORK_NAME }; - migrationsData: MigrationData[] = []; + // migration info + migration = defaultMigration; + + // init additional functionnalities + IO = initIO(this); + executionFunctions = initExecutionFunctions(this); constructor(hre: HardhatRuntimeEnvironment, args: defaultArgs, signer: Signer, signerAddress: string) { this.hre = hre; - + this.signer = signer; this.pathToNetworkFolder = path.join( hre.config.paths.root, MIGRATION_DATA_FOLDER, this.networkConfig.networkName ); - - this.signer = signer; this.executionSettings = { confirmationToWait: args.minBlockConfirmations }; @@ -62,14 +78,7 @@ export class Engine { }; this.contracts = Contracts.connect(signer); - this.healthcheck(); - this.initIO(); - this.initMigration(); - - log.migrationConfig(signerAddress, args.ledger, this.networkConfig, this.executionSettings, this.overrides); - } - - healthcheck = () => { + // system settings healthcheck const isForkOrHardhat = this.networkConfig.isFork || this.networkConfig.networkName === 'hardhat'; if (this.executionSettings.confirmationToWait <= 1 && !isForkOrHardhat) { throw new Error( @@ -79,58 +88,29 @@ export class Engine { if (!this.overrides.gasPrice && !isForkOrHardhat) { throw new Error(`Gas Price shouldn't be equal to 0 for ${this.networkConfig.networkName} use. Aborting`); } - }; - IO = { - state: { - write: (state: SystemState) => { - fs.writeFileSync( - path.join(this.pathToNetworkFolder, 'state.json'), - JSON.stringify(state, null, 4) + `\n` - ); - this.state = state; - }, - fetch: (pathToState: string) => { - return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; - } - }, - deployment: { - write: (deployments: SystemDeployments) => { - fs.writeFileSync( - path.join(this.pathToNetworkFolder, 'deployment.json'), - JSON.stringify(deployments, null, 4) + `\n` - ); - this.deployment = deployments; - }, - fetch: (pathToState: string) => { - return JSON.parse( - fs.readFileSync(path.join(pathToState, 'deployment.json'), 'utf-8') - ) as SystemDeployments; - } + log.migrationConfig(signerAddress, args.ledger, this.networkConfig, this.executionSettings, this.overrides); + + if (args.reset) { + this.reset(); + } else { + this.init(); } - }; + } - resetIO = () => { + // reset then init + reset = () => { log.warning(`Resetting ${this.networkConfig.networkName} migratation folder`); fs.rmSync(this.pathToNetworkFolder, { recursive: true, force: true }); - this.migrationsData = []; - this.initIO(); - this.initMigration(); + this.migration = defaultMigration; + this.init(); }; - initIO = () => { - let defaultState: SystemState = { - migrationState: { - latestMigration: -1 - }, - networkState: {} - }; - let defaultDeployment: SystemDeployments = {}; - + init = () => { // if network folder doesn't exist, create it if (!fs.existsSync(this.pathToNetworkFolder)) { fs.mkdirSync(this.pathToNetworkFolder); @@ -142,8 +122,8 @@ export class Engine { // if there is no state file in the network's folder, create it along with deployment file const pathToNetworkFolderState = pathToNetworkFolderFiles.find((f: string) => f === 'state.json'); if (!pathToNetworkFolderState) { - this.IO.state.write(defaultState); - this.IO.deployment.write(defaultDeployment); + this.migration.state = this.IO.state.write(defaultMigration.state); + this.migration.deployment = this.IO.deployment.write(defaultMigration.deployment); } // if it's a fork we need to get state and deployment files from the original network, @@ -157,9 +137,11 @@ export class Engine { ); console.log(pathToOriginalNetworkFolder); log.warning(`Fetching initial state from ${this.networkConfig.originalNetwork}`); - this.IO.state.write(this.IO.state.fetch(pathToOriginalNetworkFolder)); + this.migration.state = this.IO.state.write(this.IO.state.fetch(pathToOriginalNetworkFolder)); log.warning(`Fetching initial deployments from ${this.networkConfig.originalNetwork}`); - this.IO.deployment.write(this.IO.deployment.fetch(pathToOriginalNetworkFolder)); + this.migration.deployment = this.IO.deployment.write( + this.IO.deployment.fetch(pathToOriginalNetworkFolder) + ); } catch (e) { log.error( `${this.networkConfig.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` @@ -167,12 +149,10 @@ export class Engine { process.exit(); } } else { - this.state = this.IO.state.fetch(this.pathToNetworkFolder); - this.deployment = this.IO.deployment.fetch(this.pathToNetworkFolder); + this.migration.state = this.IO.state.fetch(this.pathToNetworkFolder); + this.migration.deployment = this.IO.deployment.fetch(this.pathToNetworkFolder); } - }; - initMigration = () => { // generate migration files const pathToMigrationFiles = path.join(this.hre.config.paths.root, MIGRATION_FOLDER); const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); @@ -181,8 +161,8 @@ export class Engine { for (const migrationFilePath of migrationFilesPath) { const fileName = path.basename(migrationFilePath); const migrationId = Number(fileName.split('_')[0]); - if (migrationId > this.state.migrationState.latestMigration) { - this.migrationsData.push({ + if (migrationId > this.migration.state.migrationState.latestMigration) { + this.migration.migrationsData.push({ fullPath: migrationFilePath, fileName: fileName, migrationTimestamp: migrationId @@ -191,182 +171,10 @@ export class Engine { } // even if migrations should be automatically sorted by the dir fetching, sort again just in case - this.migrationsData.sort((a, b) => + this.migration.migrationsData.sort((a, b) => a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 ); }; - migrate = async () => { - // if there is no migration to run, exit - if (this.migrationsData.length === 0) { - log.done(`Nothing to migrate ⚡️`); - return; - } - - let stateSaves: SystemState[] = []; - - stateSaves.push({ ...this.state }); - - let index = 0; - for (; index < this.migrationsData.length; index++) { - const migrationData = this.migrationsData[index]; - - const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - - log.info(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - - try { - this.state.networkState = await migration.up(this.state.networkState); - - try { - await migration.healthCheck(stateSaves[index].networkState, this.state.networkState); - log.success('Health check success ✨ '); - } catch (e) { - log.error('Health check failed'); - log.error(e.stack); - break; - } - - // if health check passed, update the state and write it to the system - this.state = { - migrationState: { latestMigration: migrationData.migrationTimestamp }, - networkState: this.state.networkState - }; - this.IO.state.write(this.state); - stateSaves.push({ ...this.state }); - } catch (e) { - log.error('Migration execution failed'); - log.error(e.stack); - log.error('Aborting.'); - return; - } - } - - // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert - if (index != this.migrationsData.length) { - log.warning('Reverting ...'); - - const migrationData = this.migrationsData[index]; - log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - - const migration: Migration = importCsjOrEsModule(migrationData.fullPath); - - this.state.networkState = await migration.down(stateSaves[index].networkState, this.state.networkState); - - // if revert passed, update the state and write it to the system - this.state.migrationState = { latestMigration: stateSaves[index].migrationState.latestMigration }; - - this.IO.state.write(this.state); - log.success(`${migrationData.fileName} reverted`); - } - - log.done(`\nMigration(s) complete ⚡️`); - }; - - deploy = async ( - factory: ContractBuilder, - ...args: Parameters['deploy']> - ): Promise['deploy']>> => { - log.basicExecutionHeader('Deploying', `${factory.contractName} 🚀 `, args); - const contract = await factory.deploy(...([...args, this.overrides] as any)); - - log.debug(`Deployment Tx: `, contract.deployTransaction.hash); - log.greyed(`Waiting to be mined...`); - - const receipt = await contract.deployTransaction.wait(this.executionSettings.confirmationToWait); - if (receipt.status !== 1) { - throw new Error(`Error deploying, tx: ${contract.deployTransaction.hash}`); - } - - log.success(`Deployed ${factory.contractName} at ${contract.address} 🚀 !`); - return contract; - }; - - execute = async Promise>( - executionInstruction: string, - func: T, - ...args: Parameters - ): Promise => { - log.basicExecutionHeader('Executing', executionInstruction, args); - - const tx = await func(...args, this.overrides); - log.debug(`Executing tx: `, tx.hash); - - const receipt = await tx.wait(this.executionSettings.confirmationToWait); - if (receipt.status !== 1) { - throw new Error(`Error executing, tx: ${tx.hash}`); - } - - log.success(`Executed ✨`); - return receipt; - }; - - deployProxy = async ( - admin: ProxyAdmin, - logicContractToDeploy: ContractBuilder, - initializeArgs: initializeArgs, - ...ctorArgs: Parameters - ): Promise> => { - log.debug('Deploying proxy'); - const logicContract = await this.deploy(logicContractToDeploy, ...ctorArgs); - - const data = - initializeArgs === 'skipInit' - ? [] - : logicContract.interface.encodeFunctionData('initialize', initializeArgs); - - const proxy = await this.deploy( - this.contracts.TransparentUpgradeableProxy, - logicContract.address, - admin.address, - data - ); - - log.success('Proxy deployed 🚀 '); - return { - proxy: await logicContractToDeploy.attach(proxy.address), - logicContractAddress: logicContract.address - }; - }; - - upgradeProxy = async ( - admin: ProxyAdmin, - logicContractToDeploy: ContractBuilder, - proxyAddress: string, - initializeArgs: - | { - params: Parameters; - initializeFctName: string; - } - | 'skipInit', - ...ctorArgs: Parameters - ): Promise> => { - log.debug('Upgrading proxy'); - const newLogicContract = await this.deploy(logicContractToDeploy, ...ctorArgs); - - const data = - initializeArgs === 'skipInit' - ? [] - : newLogicContract.interface.encodeFunctionData( - initializeArgs.initializeFctName, - initializeArgs.params - ); - - if (initializeArgs === 'skipInit') - await this.execute('Upgrading proxy', admin.upgrade, proxyAddress, newLogicContract.address); - else - await this.execute( - `Upgrading proxy and call ${initializeArgs.initializeFctName}`, - admin.upgradeAndCall, - proxyAddress, - newLogicContract.address, - data - ); - - log.success('Proxy upgraded 🚀 '); - return { - proxy: await logicContractToDeploy.attach(proxyAddress), - logicContractAddress: newLogicContract.address - }; - }; + migrate = () => migrate(this); } diff --git a/packages/v3/migration/engine/executionFunctions.ts b/packages/v3/migration/engine/executionFunctions.ts new file mode 100644 index 000000000..6624251a9 --- /dev/null +++ b/packages/v3/migration/engine/executionFunctions.ts @@ -0,0 +1,120 @@ +import { ContractBuilder, Contract } from '../../components/Contracts'; +import { ProxyAdmin } from '../../typechain'; +import { Engine } from './engine'; +import { log } from './logger'; +import { ContractFactory, ContractReceipt, ContractTransaction } from 'ethers'; + +type initializeArgs = Parameters | 'skipInit'; +type proxy = { proxy: Contract; logicContractAddress: string }; + +export const initExecutionFunctions = (engine: Engine) => { + const deploy = async ( + factory: ContractBuilder, + ...args: Parameters['deploy']> + ): Promise['deploy']>> => { + log.basicExecutionHeader('Deploying', `${factory.metadata.contractName} 🚀 `, args); + const contract = await factory.deploy(...([...args, engine.overrides] as any)); + + log.debug(`Deployment Tx: `, contract.deployTransaction.hash); + log.greyed(`Waiting to be mined...`); + + const receipt = await contract.deployTransaction.wait(engine.executionSettings.confirmationToWait); + if (receipt.status !== 1) { + throw new Error(`Error deploying, tx: ${contract.deployTransaction.hash}`); + } + + engine.IO.deployment.writeOne(contract.address, factory.metadata); + log.success(`Deployed ${factory.metadata.contractName} at ${contract.address} 🚀 !`); + return contract; + }; + + const execute = async Promise>( + executionInstruction: string, + func: T, + ...args: Parameters + ): Promise => { + log.basicExecutionHeader('Executing', executionInstruction, args); + + const tx = await func(...args, engine.overrides); + log.debug(`Executing tx: `, tx.hash); + + const receipt = await tx.wait(engine.executionSettings.confirmationToWait); + if (receipt.status !== 1) { + throw new Error(`Error executing, tx: ${tx.hash}`); + } + + log.success(`Executed ✨`); + return receipt; + }; + + const deployProxy = async ( + admin: ProxyAdmin, + logicContractToDeploy: ContractBuilder, + initializeArgs: initializeArgs, + ...ctorArgs: Parameters + ): Promise> => { + log.debug('Deploying proxy'); + const logicContract = await deploy(logicContractToDeploy, ...ctorArgs); + + const data = + initializeArgs === 'skipInit' + ? [] + : logicContract.interface.encodeFunctionData('initialize', initializeArgs); + + const proxy = await deploy( + engine.contracts.TransparentUpgradeableProxy, + logicContract.address, + admin.address, + data + ); + + log.success('Proxy deployed 🚀 '); + return { + proxy: await logicContractToDeploy.attach(proxy.address), + logicContractAddress: logicContract.address + }; + }; + + const upgradeProxy = async ( + admin: ProxyAdmin, + logicContractToDeploy: ContractBuilder, + proxyAddress: string, + initializeArgs: + | { + params: Parameters; + initializeFctName: string; + } + | 'skipInit', + ...ctorArgs: Parameters + ): Promise> => { + log.debug('Upgrading proxy'); + const newLogicContract = await deploy(logicContractToDeploy, ...ctorArgs); + + const data = + initializeArgs === 'skipInit' + ? [] + : newLogicContract.interface.encodeFunctionData( + initializeArgs.initializeFctName, + initializeArgs.params + ); + + if (initializeArgs === 'skipInit') + await execute('Upgrading proxy', admin.upgrade, proxyAddress, newLogicContract.address); + else + await execute( + `Upgrading proxy and call ${initializeArgs.initializeFctName}`, + admin.upgradeAndCall, + proxyAddress, + newLogicContract.address, + data + ); + + log.success('Proxy upgraded 🚀 '); + return { + proxy: await logicContractToDeploy.attach(proxyAddress), + logicContractAddress: newLogicContract.address + }; + }; + + return { deploy, execute, deployProxy, upgradeProxy }; +}; diff --git a/packages/v3/migration/engine/io.ts b/packages/v3/migration/engine/io.ts new file mode 100644 index 000000000..c794deb07 --- /dev/null +++ b/packages/v3/migration/engine/io.ts @@ -0,0 +1,40 @@ +import { Engine } from './engine'; +import { Deployment, SystemDeployments, SystemState } from './types'; +import fs from 'fs'; +import path from 'path'; + +export const initIO = (engine: Engine) => { + return { + state: { + write: (state: SystemState) => { + fs.writeFileSync( + path.join(engine.pathToNetworkFolder, 'state.json'), + JSON.stringify(state, null, 4) + `\n` + ); + return state; + }, + fetch: (pathToState: string) => { + return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; + } + }, + deployment: { + write: (deployments: SystemDeployments) => { + fs.writeFileSync( + path.join(engine.pathToNetworkFolder, 'deployment.json'), + JSON.stringify(deployments, null, 4) + `\n` + ); + return deployments; + }, + writeOne: (address: string, deployment: Deployment) => { + const currentDeployments = engine.IO.deployment.fetch(engine.pathToNetworkFolder); + currentDeployments[address] = deployment; + engine.IO.deployment.write(currentDeployments); + }, + fetch: (pathToState: string) => { + return JSON.parse( + fs.readFileSync(path.join(pathToState, 'deployment.json'), 'utf-8') + ) as SystemDeployments; + } + } + }; +}; diff --git a/packages/v3/migration/engine/migrate.ts b/packages/v3/migration/engine/migrate.ts new file mode 100644 index 000000000..6378d3455 --- /dev/null +++ b/packages/v3/migration/engine/migrate.ts @@ -0,0 +1,77 @@ +import { Engine } from './engine'; +import { log } from './logger'; +import { Migration, SystemState } from './types'; +import { importCsjOrEsModule } from './utils'; + +export const migrate = async (engine: Engine) => { + // if there is no migration to run, exit + if (engine.migration.migrationsData.length === 0) { + log.done(`Nothing to migrate ⚡️`); + return; + } + + engine.migration.stateSaves.push({ ...engine.migration.state }); + + let index = 0; + for (; index < engine.migration.migrationsData.length; index++) { + const migrationData = engine.migration.migrationsData[index]; + + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + + log.info(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + + try { + engine.migration.state.networkState = await migration.up(engine.migration.state.networkState); + + try { + await migration.healthCheck( + engine.migration.stateSaves[index].networkState, + engine.migration.state.networkState + ); + log.success('Health check success ✨ '); + } catch (e) { + log.error('Health check failed'); + log.error(e.stack); + break; + } + + // if health check passed, update the state and write it to the system + engine.migration.state = { + migrationState: { latestMigration: migrationData.migrationTimestamp }, + networkState: engine.migration.state.networkState + }; + engine.IO.state.write(engine.migration.state); + engine.migration.stateSaves.push({ ...engine.migration.state }); + } catch (e) { + log.error('Migration execution failed'); + log.error(e.stack); + log.error('Aborting.'); + return; + } + } + + // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert + if (index != engine.migration.migrationsData.length) { + log.warning('Reverting ...'); + + const migrationData = engine.migration.migrationsData[index]; + log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + + engine.migration.state.networkState = await migration.down( + engine.migration.stateSaves[index].networkState, + engine.migration.state.networkState + ); + + // if revert passed, update the state and write it to the system + engine.migration.state.migrationState = { + latestMigration: engine.migration.stateSaves[index].migrationState.latestMigration + }; + + engine.IO.state.write(engine.migration.state); + log.success(`${migrationData.fileName} reverted`); + } + + log.done(`\nMigration(s) complete ⚡️`); +}; diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 7a5837f19..74d233953 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -28,8 +28,13 @@ export type ExecutionSettings = { }; export type defaultArgs = { + reset: boolean; + + // ledger ledger: boolean; ledgerPath: string; + + // settings gasPrice: number; minBlockConfirmations: number; }; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index 2cf896b30..c1dae0690 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -5,9 +5,7 @@ import path from 'path'; export const PATH_TO_TASKS_FOLDER = 'migration/tasks'; -export type migrateParamTask = defaultArgs & { - reset: boolean; -}; +export type migrateParamTask = defaultArgs; task('migrate', 'Migrate the network') .addFlag('ledger', 'Signing from a ledger') .addParam('ledgerPath', 'Ledger path', "m/44'/60'/0'/0", types.string) diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index 91f003555..b86bbe581 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -1,7 +1,8 @@ import { engine } from '../../migration/engine'; import { deployedContract, Migration } from '../../migration/engine/types'; -const { signer, deploy, contracts } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type InitialState = {}; diff --git a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts index 2291f34c4..5a36adb59 100644 --- a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts +++ b/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts @@ -2,7 +2,8 @@ import { engine } from '../../migration/engine'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './0_deploy_basics'; -const { signer, deploy, contracts } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState & { proxyAdmin: deployedContract; diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/migrations/2_deploy_networkSettings.ts index b4081871d..03b362449 100644 --- a/packages/v3/migration/migrations/2_deploy_networkSettings.ts +++ b/packages/v3/migration/migrations/2_deploy_networkSettings.ts @@ -2,7 +2,8 @@ import { engine } from '../../migration/engine'; import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './1_deploy_proxyAdmin'; -const { signer, deploy, contracts, deployProxy } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState & { networkSettings: deployedProxy; diff --git a/packages/v3/migration/migrations/3_deploy_network.ts b/packages/v3/migration/migrations/3_deploy_network.ts index f9010749e..c85155ab3 100644 --- a/packages/v3/migration/migrations/3_deploy_network.ts +++ b/packages/v3/migration/migrations/3_deploy_network.ts @@ -2,7 +2,8 @@ import { engine } from '../../migration/engine'; import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './2_deploy_networkSettings'; -const { signer, deploy, contracts, deployProxy } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState & { bancorNetwork: deployedProxy; diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/migrations/4_deploy_vault.ts index 85d458f07..fcb12c4d8 100644 --- a/packages/v3/migration/migrations/4_deploy_vault.ts +++ b/packages/v3/migration/migrations/4_deploy_vault.ts @@ -2,7 +2,8 @@ import { engine } from '../../migration/engine'; import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './3_deploy_network'; -const { signer, deploy, contracts, deployProxy } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState & { vault: deployedProxy; diff --git a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts index 939a1442c..f37644e58 100644 --- a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts +++ b/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts @@ -3,7 +3,8 @@ import { NETWORK_TOKEN_POOL_TOKEN_NAME, NETWORK_TOKEN_POOL_TOKEN_SYMBOL } from ' import { deployedContract, deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './4_deploy_vault'; -const { signer, deploy, contracts, deployProxy, execute } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState & { networkTokenPool: deployedProxy; diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts index e69460bb1..0883d0a5d 100644 --- a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts +++ b/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts @@ -2,7 +2,8 @@ import { engine } from '../../migration/engine'; import { deployedProxy, Migration } from '../engine/types'; import { NextState as InitialState } from './5_deploy_networkTokenPool'; -const { signer, deploy, contracts, deployProxy, execute } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState & { pendingWithdrawals: deployedProxy; diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts index 2cf210e47..2c04e9bea 100644 --- a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts +++ b/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts @@ -2,7 +2,8 @@ import { engine } from '../../migration/engine'; import { deployedContract, Migration } from '../engine/types'; import { NextState as InitialState } from './6_deploy_pendingWithdrawals'; -const { signer, deploy, contracts } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState & { poolCollection: deployedContract; diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts index c163710b8..8314aa9f0 100644 --- a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts +++ b/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts @@ -2,7 +2,8 @@ import { engine } from '../../migration/engine'; import { Migration } from '../engine/types'; import { NextState as InitialState } from './7_deploy_liquidityPoolCollection'; -const { signer, deploy, contracts, execute } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState; diff --git a/packages/v3/migration/migrations/9_upgrade_networkSettings.ts b/packages/v3/migration/migrations/9_upgrade_networkSettings.ts index eb084b6a7..9c29722c5 100644 --- a/packages/v3/migration/migrations/9_upgrade_networkSettings.ts +++ b/packages/v3/migration/migrations/9_upgrade_networkSettings.ts @@ -2,7 +2,8 @@ import { engine } from '../../migration/engine'; import { Migration } from '../engine/types'; import { NextState as InitialState } from './8_deploy_initializeBancorNetwork'; -const { signer, deploy, contracts, upgradeProxy } = engine; +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; export type NextState = InitialState; diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts index bfce6a497..14b0d7663 100644 --- a/packages/v3/migration/tasks/createMigration.ts +++ b/packages/v3/migration/tasks/createMigration.ts @@ -1,43 +1,55 @@ import { createMigrationParamTask } from '../../migration'; -import { MIGRATION_FOLDER } from '../../migration/engine/config'; +import { MIGRATION_FOLDER } from '../../migration/engine/engine'; import { log } from '../engine/logger'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import path from 'path'; export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { - const templateMigrationFile = `import { deployedContract, Migration } from 'migration/engine/types'; - + const templateMigrationFile = `import { engine } from '../../migration/engine'; +import { deployedContract, Migration } from '../../migration/engine/types'; + +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; + export type InitialState = {}; -export type State = { - BNT: deployedContract; +export type NextState = InitialState & { + BNT: { token: deployedContract; governance: deployedContract }; }; const migration: Migration = { - up: async (signer, contracts, initialState: InitialState, { deploy, execute }): Promise => { - const BNT = await deploy(contracts.TestERC20Token, 'BNT', 'BNT', 1000000); + up: async (initialState: InitialState): Promise => { + const BNTToken = await deploy( + contracts.TestERC20Token, + 'Bancor Network Token', + 'BNT', + '100000000000000000000000000' + ); + + const BNTGovernance = await deploy(contracts.TokenGovernance, BNTToken.address); return { ...initialState, - - BNT: BNT.address + + BNT: { + token: BNTToken.address, + governance: BNTGovernance.address + } }; }, - healthCheck: async (signer, contracts, initialState: InitialState, state: NextState, { deploy, execute }) => {}, - - down: async ( - signer, - contracts, - initialState: InitialState, - newState: NextState, - { deploy, execute } - ): Promise => { + healthCheck: async (initialState: InitialState, state: NextState) => { + const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); + if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) + throw new Error('Invalid Role'); + }, + + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } }; - + export default migration; `; diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index 301960a7c..946f659c0 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -1,10 +1,5 @@ -import { migrateParamTask } from '..'; import { engine } from '../engine'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; -export default async (args: migrateParamTask, hre: HardhatRuntimeEnvironment) => { - if (args.reset) { - engine.resetIO(); - } +export default async () => { await engine.migrate(); }; diff --git a/packages/v3/test/helpers/Factory.ts b/packages/v3/test/helpers/Factory.ts index aae418ff5..8659b653a 100644 --- a/packages/v3/test/helpers/Factory.ts +++ b/packages/v3/test/helpers/Factory.ts @@ -47,14 +47,14 @@ export const proxyAdmin = async () => { const createLogic = async (factory: ContractBuilder, ctorArgs: CtorArgs = []) => { // check if we can reuse a previously cached exact logic contract (e.g., the same contract and constructor arguments) - const cached = logicContractsCache[factory.contractName]; + const cached = logicContractsCache[factory.metadata.contractName]; if (cached && isEqual(cached.ctorArgs, ctorArgs)) { return cached.contract; } // eslint-disable-next-line @typescript-eslint/ban-types const logicContract = await (factory.deploy as Function)(...(ctorArgs || [])); - logicContractsCache[factory.contractName] = { ctorArgs, contract: logicContract }; + logicContractsCache[factory.metadata.contractName] = { ctorArgs, contract: logicContract }; return logicContract; }; From 9d552db5ab777be45f188021993d80298735d939 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 9 Sep 2021 00:36:36 +0200 Subject: [PATCH 061/164] improved class + split deployment by migrations --- packages/v3/.eslintrc | 6 + packages/v3/components/Contracts.ts | 25 +- .../v3/migration/data/mainnet/deployment.json | 1 - packages/v3/migration/engine/constant.ts | 27 + packages/v3/migration/engine/engine.ts | 190 +- .../v3/migration/engine/executionFunctions.ts | 12 +- packages/v3/migration/engine/index.ts | 6 +- packages/v3/migration/engine/io.ts | 46 +- packages/v3/migration/engine/logger.ts | 2 +- packages/v3/migration/engine/migrate.ts | 28 +- packages/v3/migration/engine/types.ts | 14 +- packages/v3/migration/engine/utils.ts | 13 +- packages/v3/migration/index.ts | 6 +- .../migration/migrations/0_deploy_basics.ts | 4 +- packages/v3/package.json | 2 + yarn.lock | 14122 ++++++++++++++++ 16 files changed, 14343 insertions(+), 161 deletions(-) delete mode 100644 packages/v3/migration/data/mainnet/deployment.json create mode 100644 packages/v3/migration/engine/constant.ts create mode 100644 yarn.lock diff --git a/packages/v3/.eslintrc b/packages/v3/.eslintrc index 14c211b3b..379091ff5 100644 --- a/packages/v3/.eslintrc +++ b/packages/v3/.eslintrc @@ -7,6 +7,12 @@ }, "rules": { "max-len": ["error", 150, 2], + "camelcase": [ + "error", + { + "ignoreImports": true + } + ], "indent": [ "error", 4, diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 6206f761c..65a71912d 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -39,40 +39,41 @@ export type Contract = AsyncReturnType; export interface ContractBuilder { metadata: { contractName: string; - abi: Object; + abi: unknown; bytecode: string; }; deploy(...args: Parameters): Promise>; attach(address: string, signer?: Signer): Promise>; } -type FactoryConstructor = { new (signer?: Signer): F; abi: {}; bytecode: string }; +type FactoryConstructor = { new (signer?: Signer): F; abi: unknown; bytecode: string }; const deployOrAttach = ( contractName: string, - // @TODO: needs to replace with correctly typed params but it doesn't work properly for some reason https://github.com/microsoft/TypeScript/issues/31278 - factoryConstructor: FactoryConstructor, + // @TODO: needs to replace with correctly typed params but it doesn't + // work properly for some reason https://github.com/microsoft/TypeScript/issues/31278 + FactoryConstructor: FactoryConstructor, initialSigner?: Signer ): ContractBuilder => { return { metadata: { contractName: contractName, - abi: factoryConstructor.abi, - bytecode: factoryConstructor.bytecode + abi: FactoryConstructor.abi, + bytecode: FactoryConstructor.bytecode }, deploy: async (...args: Parameters): Promise> => { - let defaultSigner = initialSigner ? initialSigner : (await ethers.getSigners())[0]; + const defaultSigner = initialSigner || (await ethers.getSigners())[0]; - return new factoryConstructor(defaultSigner).deploy(...(args || [])) as Contract; + return new FactoryConstructor(defaultSigner).deploy(...(args || [])) as Contract; }, - attach: attachOnly(factoryConstructor, initialSigner).attach + attach: attachOnly(FactoryConstructor, initialSigner).attach }; }; -const attachOnly = (factoryConstructor: FactoryConstructor, initialSigner?: Signer) => { +const attachOnly = (FactoryConstructor: FactoryConstructor, initialSigner?: Signer) => { return { attach: async (address: string, signer?: Signer): Promise> => { - let defaultSigner = initialSigner ? initialSigner : (await ethers.getSigners())[0]; - return new factoryConstructor(signer || defaultSigner).attach(address) as Contract; + const defaultSigner = initialSigner || (await ethers.getSigners())[0]; + return new FactoryConstructor(signer || defaultSigner).attach(address) as Contract; } }; }; diff --git a/packages/v3/migration/data/mainnet/deployment.json b/packages/v3/migration/data/mainnet/deployment.json deleted file mode 100644 index 0967ef424..000000000 --- a/packages/v3/migration/data/mainnet/deployment.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/packages/v3/migration/engine/constant.ts b/packages/v3/migration/engine/constant.ts new file mode 100644 index 000000000..bb0c0425c --- /dev/null +++ b/packages/v3/migration/engine/constant.ts @@ -0,0 +1,27 @@ +import { MigrationData, SystemDeployments, SystemState } from './types'; + +export const MIGRATION_FOLDER = 'migration/migrations'; +export const MIGRATION_DATA_FOLDER = 'migration/data'; + +export const defaultMigration: { + state: SystemState; + deployment: SystemDeployments; + migrationsData: MigrationData[]; + stateSaves: SystemState[]; + currentMigrationData: MigrationData; +} = { + state: { + migrationState: { + latestMigration: -1 + }, + networkState: {} + }, + deployment: {}, + migrationsData: [], + stateSaves: [], + currentMigrationData: { + fullPath: '', + fileName: '', + migrationTimestamp: -1 + } +}; diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index 51ebf87c0..c20b9fefa 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -1,157 +1,152 @@ import Contracts, { ContractsType } from '../../components/Contracts'; import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.extended.config'; +import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './constant'; import { initExecutionFunctions } from './executionFunctions'; import { initIO } from './io'; import { log } from './logger'; import { migrate } from './migrate'; -import { defaultArgs, ExecutionSettings, Migration, MigrationData, SystemDeployments, SystemState } from './types'; -import { importCsjOrEsModule } from './utils'; +import { defaultArgs, ExecutionSettings, NetworkSettings } from './types'; +import { isMigrationFolderValid } from './utils'; import { Overrides, Signer } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; -import fs from 'fs'; +import fs from 'fs-extra'; import { network } from 'hardhat'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import path from 'path'; -export const MIGRATION_FOLDER = 'migration/migrations'; -export const MIGRATION_DATA_FOLDER = 'migration/data'; - -const NETWORK_NAME = FORK_CONFIG ? FORK_CONFIG.networkName : network.name; - -const defaultMigration: { - state: SystemState; - deployment: SystemDeployments; - migrationsData: MigrationData[]; - stateSaves: SystemState[]; -} = { - state: { - migrationState: { - latestMigration: -1 - }, - networkState: {} - }, - deployment: {}, - migrationsData: [], - stateSaves: [] -}; - export class Engine { readonly hre: HardhatRuntimeEnvironment; - readonly pathToNetworkFolder: string; + readonly networkSettings: NetworkSettings; + // basics readonly signer: Signer; + readonly contracts: ContractsType; readonly executionSettings: ExecutionSettings; readonly overrides: Overrides; - readonly contracts: ContractsType; - networkConfig = { - networkName: NETWORK_NAME, - isFork: NETWORK_NAME.startsWith(FORK_PREFIX), - isHardhat: NETWORK_NAME === 'hardhat', - isTestnet: NETWORK_NAME === 'rinkeby', - originalNetwork: NETWORK_NAME.startsWith(FORK_PREFIX) - ? NETWORK_NAME.substring(FORK_PREFIX.length) - : NETWORK_NAME - }; + // needed paths + readonly pathToNetworkFolder: string; + readonly pathToNetworkDeploymentsFolder: string; + + // init additional functionnalities + readonly IO = initIO(this); + readonly executionFunctions = initExecutionFunctions(this); + readonly migrate = () => migrate(this); // migration info migration = defaultMigration; - // init additional functionnalities - IO = initIO(this); - executionFunctions = initExecutionFunctions(this); - constructor(hre: HardhatRuntimeEnvironment, args: defaultArgs, signer: Signer, signerAddress: string) { this.hre = hre; - this.signer = signer; + + // init network settings + const networkName = FORK_CONFIG ? FORK_CONFIG.networkName : network.name; + this.networkSettings = { + networkName: networkName, + isFork: networkName.startsWith(FORK_PREFIX), + isHardhat: networkName === 'hardhat', + isTestnet: networkName === 'rinkeby', + originalNetwork: networkName.startsWith(FORK_PREFIX) + ? networkName.substring(FORK_PREFIX.length) + : networkName + }; + + // init paths this.pathToNetworkFolder = path.join( hre.config.paths.root, MIGRATION_DATA_FOLDER, - this.networkConfig.networkName + this.networkSettings.networkName ); + this.pathToNetworkDeploymentsFolder = path.join(this.pathToNetworkFolder, 'deployments'); + + // init basics + this.signer = signer; + this.contracts = Contracts.connect(signer); this.executionSettings = { confirmationToWait: args.minBlockConfirmations }; this.overrides = { gasPrice: args.gasPrice === 0 ? undefined : parseUnits(args.gasPrice.toString(), 'gwei') }; - this.contracts = Contracts.connect(signer); - // system settings healthcheck - const isForkOrHardhat = this.networkConfig.isFork || this.networkConfig.networkName === 'hardhat'; - if (this.executionSettings.confirmationToWait <= 1 && !isForkOrHardhat) { - throw new Error( - `Transaction confirmation should be higher than 1 for ${this.networkConfig.networkName} use. Aborting` - ); - } - if (!this.overrides.gasPrice && !isForkOrHardhat) { - throw new Error(`Gas Price shouldn't be equal to 0 for ${this.networkConfig.networkName} use. Aborting`); - } + this.checkForFailures(); - log.migrationConfig(signerAddress, args.ledger, this.networkConfig, this.executionSettings, this.overrides); + log.migrationConfig(signerAddress, args.ledger, this.networkSettings, this.executionSettings, this.overrides); if (args.reset) { this.reset(); - } else { - this.init(); } + + this.init(); } - // reset then init + // engine healthcheck + checkForFailures = () => { + const isForkOrHardhat = this.networkSettings.isFork || this.networkSettings.networkName === 'hardhat'; + if (this.executionSettings.confirmationToWait <= 1 && !isForkOrHardhat) { + throw new Error( + `Transaction confirmation should be higher than 1 for ${this.networkSettings.networkName} use. Aborting` + ); + } + if (!this.overrides.gasPrice && !isForkOrHardhat) { + throw new Error(`Gas Price shouldn't be equal to 0 for ${this.networkSettings.networkName} use. Aborting`); + } + }; + reset = () => { - log.warning(`Resetting ${this.networkConfig.networkName} migratation folder`); + log.warning(`Resetting ${this.networkSettings.networkName} migratation folder`); fs.rmSync(this.pathToNetworkFolder, { recursive: true, force: true }); - this.migration = defaultMigration; - this.init(); + }; + + initMigrationDefaultFolder = () => { + fs.mkdirSync(this.pathToNetworkFolder); + fs.mkdirSync(path.join(this.pathToNetworkFolder, 'deployments')); + this.IO.state.write(defaultMigration.state); }; init = () => { - // if network folder doesn't exist, create it + // if network doesn't exist if (!fs.existsSync(this.pathToNetworkFolder)) { - fs.mkdirSync(this.pathToNetworkFolder); + if (this.networkSettings.isFork) { + // check if the original network folder is valid and copy it into the current network folder + try { + const pathToOriginalNetworkFolder = path.join( + this.hre.config.paths.root, + MIGRATION_DATA_FOLDER, + this.networkSettings.originalNetwork + ); + + if (!isMigrationFolderValid(pathToOriginalNetworkFolder)) { + throw Error(); + } + + fs.copySync(pathToOriginalNetworkFolder, this.pathToNetworkFolder); + } catch { + log.error( + `${this.networkSettings.originalNetwork} doesn't have a correct config (needed if you want to fork it), aborting.` + ); + process.exit(); + } + } else { + // if not a fork initialize the folder accordingly + this.initMigrationDefaultFolder(); + } } - // read all files into the folder and fetch needed files - const pathToNetworkFolderFiles = fs.readdirSync(this.pathToNetworkFolder); - - // if there is no state file in the network's folder, create it along with deployment file - const pathToNetworkFolderState = pathToNetworkFolderFiles.find((f: string) => f === 'state.json'); - if (!pathToNetworkFolderState) { - this.migration.state = this.IO.state.write(defaultMigration.state); - this.migration.deployment = this.IO.deployment.write(defaultMigration.deployment); + // if network folder does exist but isn't valid, resetting it. + if (!isMigrationFolderValid(this.pathToNetworkFolder)) { + log.warning(`${this.networkSettings.networkName} migratation folder is invalid, resetting it ...`); + this.reset(); + this.initMigrationDefaultFolder(); } - // if it's a fork we need to get state and deployment files from the original network, - // if not just load the current state and deployment into the engine - if (this.networkConfig.isFork) { - try { - const pathToOriginalNetworkFolder = path.join( - this.hre.config.paths.root, - MIGRATION_DATA_FOLDER, - this.networkConfig.originalNetwork - ); - console.log(pathToOriginalNetworkFolder); - log.warning(`Fetching initial state from ${this.networkConfig.originalNetwork}`); - this.migration.state = this.IO.state.write(this.IO.state.fetch(pathToOriginalNetworkFolder)); - log.warning(`Fetching initial deployments from ${this.networkConfig.originalNetwork}`); - this.migration.deployment = this.IO.deployment.write( - this.IO.deployment.fetch(pathToOriginalNetworkFolder) - ); - } catch (e) { - log.error( - `${this.networkConfig.originalNetwork} doesn't have a config (needed if you want to fork it), aborting.` - ); - process.exit(); - } - } else { - this.migration.state = this.IO.state.fetch(this.pathToNetworkFolder); - this.migration.deployment = this.IO.deployment.fetch(this.pathToNetworkFolder); - } + // update current state to the network folder + this.migration.state = this.IO.state.fetch(this.pathToNetworkFolder); // generate migration files const pathToMigrationFiles = path.join(this.hre.config.paths.root, MIGRATION_FOLDER); @@ -161,6 +156,7 @@ export class Engine { for (const migrationFilePath of migrationFilesPath) { const fileName = path.basename(migrationFilePath); const migrationId = Number(fileName.split('_')[0]); + // store migration that are only after the latest migration if (migrationId > this.migration.state.migrationState.latestMigration) { this.migration.migrationsData.push({ fullPath: migrationFilePath, @@ -175,6 +171,4 @@ export class Engine { a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 ); }; - - migrate = () => migrate(this); } diff --git a/packages/v3/migration/engine/executionFunctions.ts b/packages/v3/migration/engine/executionFunctions.ts index 6624251a9..b31b39885 100644 --- a/packages/v3/migration/engine/executionFunctions.ts +++ b/packages/v3/migration/engine/executionFunctions.ts @@ -23,7 +23,7 @@ export const initExecutionFunctions = (engine: Engine) => { throw new Error(`Error deploying, tx: ${contract.deployTransaction.hash}`); } - engine.IO.deployment.writeOne(contract.address, factory.metadata); + engine.IO.deployment.writeOne(factory.metadata); log.success(`Deployed ${factory.metadata.contractName} at ${contract.address} 🚀 !`); return contract; }; @@ -90,14 +90,6 @@ export const initExecutionFunctions = (engine: Engine) => { log.debug('Upgrading proxy'); const newLogicContract = await deploy(logicContractToDeploy, ...ctorArgs); - const data = - initializeArgs === 'skipInit' - ? [] - : newLogicContract.interface.encodeFunctionData( - initializeArgs.initializeFctName, - initializeArgs.params - ); - if (initializeArgs === 'skipInit') await execute('Upgrading proxy', admin.upgrade, proxyAddress, newLogicContract.address); else @@ -106,7 +98,7 @@ export const initExecutionFunctions = (engine: Engine) => { admin.upgradeAndCall, proxyAddress, newLogicContract.address, - data + newLogicContract.interface.encodeFunctionData(initializeArgs.initializeFctName, initializeArgs.params) ); log.success('Proxy upgraded 🚀 '); diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index 1519dcd1e..28af0bdc1 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -6,12 +6,14 @@ import { HardhatRuntimeEnvironment as hre } from 'hardhat/types'; export let engine: Engine; -export default async (args: defaultArgs, hre: hre, next: (a: any, b: hre) => any) => { +export default async (args: defaultArgs, hre: hre, task: (a: any, b: hre) => any) => { // init signer const signer = args.ledger ? new LedgerSigner(ethers.provider, 'hid', args.ledgerPath) : (await ethers.getSigners())[0]; engine = new Engine(hre, args, signer, await signer.getAddress()); - return next(args, hre); + + // follow to the actual task + return task(args, hre); }; diff --git a/packages/v3/migration/engine/io.ts b/packages/v3/migration/engine/io.ts index c794deb07..99e315a21 100644 --- a/packages/v3/migration/engine/io.ts +++ b/packages/v3/migration/engine/io.ts @@ -18,22 +18,42 @@ export const initIO = (engine: Engine) => { } }, deployment: { - write: (deployments: SystemDeployments) => { - fs.writeFileSync( - path.join(engine.pathToNetworkFolder, 'deployment.json'), - JSON.stringify(deployments, null, 4) + `\n` - ); + write: (pathToWrite: string, deployments: SystemDeployments) => { + fs.writeFileSync(path.join(pathToWrite), JSON.stringify(deployments, null, 4) + `\n`); return deployments; }, - writeOne: (address: string, deployment: Deployment) => { - const currentDeployments = engine.IO.deployment.fetch(engine.pathToNetworkFolder); - currentDeployments[address] = deployment; - engine.IO.deployment.write(currentDeployments); + writeOne: (deployment: Deployment) => { + const currentMigrationDeploymentFileName = engine.migration.currentMigrationData.fileName + '.json'; + + // find the migration file in the network deployments + const pathToNetworkMigrationDeploymentFolder = path.join(engine.pathToNetworkFolder, 'deployments'); + + // read all files into the folder and fetch needed file + const pathToMigrationDeploymentFiles = fs.readdirSync(pathToNetworkMigrationDeploymentFolder); + const pathToMigrationDeploymentFile = pathToMigrationDeploymentFiles.find( + (f: string) => f === currentMigrationDeploymentFileName + ); + + const pathToNetworkMigrationDeploymentFile = path.join( + pathToNetworkMigrationDeploymentFolder, + currentMigrationDeploymentFileName + ); + + // if file not found create an empty one + if (!pathToMigrationDeploymentFile) { + engine.IO.deployment.write(pathToNetworkMigrationDeploymentFile, {}); + } + + const currentDeployments = engine.IO.deployment.fetch(path.join(pathToNetworkMigrationDeploymentFile)); + + // if the metadata of the current contract is not already stored, store it + if (!currentDeployments[deployment.contractName]) { + currentDeployments[deployment.contractName] = deployment; + engine.IO.deployment.write(pathToNetworkMigrationDeploymentFile, currentDeployments); + } }, - fetch: (pathToState: string) => { - return JSON.parse( - fs.readFileSync(path.join(pathToState, 'deployment.json'), 'utf-8') - ) as SystemDeployments; + fetch: (pathToDeployments: string) => { + return JSON.parse(fs.readFileSync(pathToDeployments, 'utf-8')) as SystemDeployments; } } }; diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts index 9d5f80bea..641185225 100644 --- a/packages/v3/migration/engine/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -39,7 +39,7 @@ export const log = { migrationConfig: ( signerAddress: string, isLedger: boolean, - networkConfig: typeof Engine.prototype.networkConfig, + networkConfig: typeof Engine.prototype.networkSettings, executionSettings: ExecutionSettings, overrides: Overrides ) => { diff --git a/packages/v3/migration/engine/migrate.ts b/packages/v3/migration/engine/migrate.ts index 6378d3455..ea4b5b200 100644 --- a/packages/v3/migration/engine/migrate.ts +++ b/packages/v3/migration/engine/migrate.ts @@ -1,6 +1,6 @@ import { Engine } from './engine'; import { log } from './logger'; -import { Migration, SystemState } from './types'; +import { Migration } from './types'; import { importCsjOrEsModule } from './utils'; export const migrate = async (engine: Engine) => { @@ -14,11 +14,13 @@ export const migrate = async (engine: Engine) => { let index = 0; for (; index < engine.migration.migrationsData.length; index++) { - const migrationData = engine.migration.migrationsData[index]; + engine.migration.currentMigrationData = engine.migration.migrationsData[index]; - const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + const migration: Migration = importCsjOrEsModule(engine.migration.currentMigrationData.fullPath); - log.info(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + log.info( + `Executing ${engine.migration.currentMigrationData.fileName}, timestamp: ${engine.migration.currentMigrationData.migrationTimestamp}` + ); try { engine.migration.state.networkState = await migration.up(engine.migration.state.networkState); @@ -29,7 +31,7 @@ export const migrate = async (engine: Engine) => { engine.migration.state.networkState ); log.success('Health check success ✨ '); - } catch (e) { + } catch (e: any) { log.error('Health check failed'); log.error(e.stack); break; @@ -37,12 +39,12 @@ export const migrate = async (engine: Engine) => { // if health check passed, update the state and write it to the system engine.migration.state = { - migrationState: { latestMigration: migrationData.migrationTimestamp }, + migrationState: { latestMigration: engine.migration.currentMigrationData.migrationTimestamp }, networkState: engine.migration.state.networkState }; engine.IO.state.write(engine.migration.state); engine.migration.stateSaves.push({ ...engine.migration.state }); - } catch (e) { + } catch (e: any) { log.error('Migration execution failed'); log.error(e.stack); log.error('Aborting.'); @@ -51,13 +53,15 @@ export const migrate = async (engine: Engine) => { } // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert - if (index != engine.migration.migrationsData.length) { + if (index !== engine.migration.migrationsData.length) { log.warning('Reverting ...'); - const migrationData = engine.migration.migrationsData[index]; - log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); + engine.migration.currentMigrationData = engine.migration.migrationsData[index]; + log.info( + `Reverting ${engine.migration.currentMigrationData.fileName}, timestamp: ${engine.migration.currentMigrationData.migrationTimestamp}` + ); - const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + const migration: Migration = importCsjOrEsModule(engine.migration.currentMigrationData.fullPath); engine.migration.state.networkState = await migration.down( engine.migration.stateSaves[index].networkState, @@ -70,7 +74,7 @@ export const migrate = async (engine: Engine) => { }; engine.IO.state.write(engine.migration.state); - log.success(`${migrationData.fileName} reverted`); + log.success(`${engine.migration.currentMigrationData.fileName} reverted`); } log.done(`\nMigration(s) complete ⚡️`); diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index 74d233953..a3a06582c 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -1,5 +1,3 @@ -import { Engine } from './engine'; - export type SystemState = { migrationState: { latestMigration: number; @@ -9,8 +7,8 @@ export type SystemState = { export type Deployment = { contractName: string; - abi: {}; - bytecode: {}; + abi: any; // object + bytecode: string; }; export type SystemDeployments = { [address: string]: Deployment }; @@ -27,6 +25,14 @@ export type ExecutionSettings = { confirmationToWait: number; }; +export type NetworkSettings = { + networkName: string; + isFork: boolean; + isHardhat: boolean; + isTestnet: boolean; + originalNetwork: string; +}; + export type defaultArgs = { reset: boolean; diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils.ts index 9a96964a7..c676ef1e1 100644 --- a/packages/v3/migration/engine/utils.ts +++ b/packages/v3/migration/engine/utils.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +import fs from 'fs-extra'; import path from 'path'; export const importCsjOrEsModule = (filePath: string) => { @@ -5,8 +7,8 @@ export const importCsjOrEsModule = (filePath: string) => { return imported.default || imported; }; -export const lazyAction = (pathToAction: string) => { - return (taskArgs: any, hre: any, runSuper: any) => { +export const initEngineAndStartTask = (pathToAction: string) => { + return (taskArgs: any, hre: any) => { const actualPath = path.isAbsolute(pathToAction) ? pathToAction : path.join(hre.config.paths.root, pathToAction); @@ -15,3 +17,10 @@ export const lazyAction = (pathToAction: string) => { return start(taskArgs, hre, action); }; }; + +export const isMigrationFolderValid = (path: string) => { + if (!fs.existsSync(path)) return false; + if (!fs.readdirSync(path).find((f: string) => f === 'state.json')) return false; + if (!fs.existsSync(path + '/deployments')) return false; + return true; +}; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index c1dae0690..64916aabe 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,5 +1,5 @@ import { defaultArgs } from './engine/types'; -import { lazyAction } from './engine/utils'; +import { initEngineAndStartTask } from './engine/utils'; import { task, types } from 'hardhat/config'; import path from 'path'; @@ -12,11 +12,11 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(lazyAction(path.join(PATH_TO_TASKS_FOLDER, 'migrate.ts'))); + .setAction(initEngineAndStartTask(path.join(PATH_TO_TASKS_FOLDER, 'migrate.ts'))); export type createMigrationParamTask = { migrationName: string; }; task('create-migration', 'Create a migration file') .addPositionalParam('migrationName', 'Name of the migration name') - .setAction(lazyAction(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); + .setAction(initEngineAndStartTask(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index b86bbe581..f30a3b90d 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -4,7 +4,7 @@ import { deployedContract, Migration } from '../../migration/engine/types'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; -export type InitialState = {}; +export type InitialState = unknown; export type NextState = InitialState & { BNT: { token: deployedContract; governance: deployedContract }; @@ -31,8 +31,6 @@ const migration: Migration = { const vBNTGovernance = await deploy(contracts.TokenGovernance, vBNTToken.address); return { - ...initialState, - BNT: { token: BNTToken.address, governance: BNTGovernance.address diff --git a/packages/v3/package.json b/packages/v3/package.json index ab84b2166..344d083c7 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -52,6 +52,7 @@ "@typechain/ethers-v5": "^7.0.1", "@typechain/hardhat": "^2.3.0", "@types/chai": "^4.2.21", + "@types/fs-extra": "^9.0.12", "@types/mocha": "^9.0.0", "@types/node": "^16.4.13", "@typescript-eslint/eslint-plugin": "^4.29.2", @@ -64,6 +65,7 @@ "ethereum-waffle": "^3.4.0", "ethereumjs-util": "^7.1.0", "ethers": "^5.4.4", + "fs-extra": "^10.0.0", "hardhat-abi-exporter": "^2.2.1", "hardhat-contract-sizer": "^2.0.3", "hardhat-dependency-compiler": "^1.1.1", diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 000000000..c96009da8 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,14122 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" + integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== + dependencies: + "@babel/highlight" "^7.14.5" + +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== + +"@babel/core@7.13.10": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.10.tgz#07de050bbd8193fcd8a3c27918c0890613a94559" + integrity sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.9" + "@babel/helper-compilation-targets" "^7.13.10" + "@babel/helper-module-transforms" "^7.13.0" + "@babel/helpers" "^7.13.10" + "@babel/parser" "^7.13.10" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@7.13.9": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39" + integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== + dependencies: + "@babel/types" "^7.13.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/generator@^7.13.0", "@babel/generator@^7.13.9", "@babel/generator@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.4.tgz#85acb159a267ca6324f9793986991ee2022a05b0" + integrity sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw== + dependencies: + "@babel/types" "^7.15.4" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-compilation-targets@^7.13.10": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz#cf6d94f30fbefc139123e27dd6b02f65aeedb7b9" + integrity sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ== + dependencies: + "@babel/compat-data" "^7.15.0" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.16.6" + semver "^6.3.0" + +"@babel/helper-function-name@^7.12.13", "@babel/helper-function-name@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz#845744dafc4381a4a5fb6afa6c3d36f98a787ebc" + integrity sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw== + dependencies: + "@babel/helper-get-function-arity" "^7.15.4" + "@babel/template" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/helper-get-function-arity@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz#098818934a137fce78b536a3e015864be1e2879b" + integrity sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-hoist-variables@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz#09993a3259c0e918f99d104261dfdfc033f178df" + integrity sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-member-expression-to-functions@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz#bfd34dc9bba9824a4658b0317ec2fd571a51e6ef" + integrity sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-module-imports@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz#e18007d230632dea19b47853b984476e7b4e103f" + integrity sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-module-transforms@^7.13.0": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.4.tgz#962cc629a7f7f9a082dd62d0307fa75fe8788d7c" + integrity sha512-9fHHSGE9zTC++KuXLZcB5FKgvlV83Ox+NLUmQTawovwlJ85+QMhk1CnVk406CQVj97LaWod6KVjl2Sfgw9Aktw== + dependencies: + "@babel/helper-module-imports" "^7.15.4" + "@babel/helper-replace-supers" "^7.15.4" + "@babel/helper-simple-access" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/helper-validator-identifier" "^7.14.9" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/helper-optimise-call-expression@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz#f310a5121a3b9cc52d9ab19122bd729822dee171" + integrity sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-replace-supers@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz#52a8ab26ba918c7f6dee28628b07071ac7b7347a" + integrity sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.15.4" + "@babel/helper-optimise-call-expression" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/helper-simple-access@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz#ac368905abf1de8e9781434b635d8f8674bcc13b" + integrity sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-split-export-declaration@^7.12.13", "@babel/helper-split-export-declaration@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz#aecab92dcdbef6a10aa3b62ab204b085f776e257" + integrity sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw== + dependencies: + "@babel/types" "^7.15.4" + +"@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== + +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== + +"@babel/helpers@^7.13.10": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.15.4.tgz#5f40f02050a3027121a3cf48d497c05c555eaf43" + integrity sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ== + dependencies: + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@7.13.10": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.10.tgz#8f8f9bf7b3afa3eabd061f7a5bcdf4fec3c48409" + integrity sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ== + +"@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.15.4": + version "7.15.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.5.tgz#d33a58ca69facc05b26adfe4abebfed56c1c2dac" + integrity sha512-2hQstc6I7T6tQsWzlboMh3SgMRPaS4H6H7cPQsJkdzTzEGqQrpLDsE2BGASU5sBPoEQyHzeqU6C8uKbFeEk6sg== + +"@babel/template@^7.12.13", "@babel/template@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.15.4.tgz#51898d35dcf3faa670c4ee6afcfd517ee139f194" + integrity sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/traverse@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" + integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.0" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.0" + "@babel/types" "^7.13.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/traverse@^7.13.0", "@babel/traverse@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.4.tgz#ff8510367a144bfbff552d9e18e28f3e2889c22d" + integrity sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.4" + "@babel/helper-function-name" "^7.15.4" + "@babel/helper-hoist-variables" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80" + integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@babel/types@^7.13.0", "@babel/types@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.4.tgz#74eeb86dbd6748d2741396557b9860e57fce0a0d" + integrity sha512-0f1HJFuGmmbrKTCZtbm3cU+b/AqdEYk5toj5iQur58xkVMlS0JWaKxTBSmCXd47uiN7vbcozAupm6Mvs80GNhw== + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + +"@bancor/token-governance@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.3.tgz#c2099c195769a23ac8222bcb7f4508e5616c4978" + integrity sha512-rRF/eVAdMagDR8y84VnNAQl8UpFlN/DuR7JNQPEnksTb4wbVWqaLgxQ+3JxP/1oTwXUfCAxs5ioKC7aLzb7c/A== + +"@bancor/token-governance@bancorprotocol/token-governance": + version "0.1.3" + resolved "https://codeload.github.com/bancorprotocol/token-governance/tar.gz/62dde515fd9327065b2c3aa1d3b84e0648e90834" + +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.6.1.tgz#118511f316e2e87ee4294761868e254d3da47960" + integrity sha512-DX3Z+T5dt1ockmPdobJS/FAsQPW4V4SrWEhD2iYQT2Cb2tQsiMnYxrcUH9By/Z3B+v0S5LMBkQtV/XOBbpLEOg== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + +"@ensdomains/ens@^0.4.4": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" + integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== + dependencies: + bluebird "^3.5.2" + eth-ens-namehash "^2.0.8" + solc "^0.4.20" + testrpc "0.0.1" + web3-utils "^1.0.0-beta.31" + +"@ensdomains/resolver@^0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" + integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== + +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +"@ethereum-waffle/chai@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/chai/-/chai-3.4.0.tgz#2477877410a96bf370edd64df905b04fb9aba9d5" + integrity sha512-GVaFKuFbFUclMkhHtQTDnWBnBQMJc/pAbfbFj/nnIK237WPLsO3KDDslA7m+MNEyTAOFrcc0CyfruAGGXAQw3g== + dependencies: + "@ethereum-waffle/provider" "^3.4.0" + ethers "^5.0.0" + +"@ethereum-waffle/compiler@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/compiler/-/compiler-3.4.0.tgz#68917321212563544913de33e408327745cb1284" + integrity sha512-a2wxGOoB9F1QFRE+Om7Cz2wn+pxM/o7a0a6cbwhaS2lECJgFzeN9xEkVrKahRkF4gEfXGcuORg4msP0Asxezlw== + dependencies: + "@resolver-engine/imports" "^0.3.3" + "@resolver-engine/imports-fs" "^0.3.3" + "@typechain/ethers-v5" "^2.0.0" + "@types/mkdirp" "^0.5.2" + "@types/node-fetch" "^2.5.5" + ethers "^5.0.1" + mkdirp "^0.5.1" + node-fetch "^2.6.1" + solc "^0.6.3" + ts-generator "^0.1.1" + typechain "^3.0.0" + +"@ethereum-waffle/ens@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/ens/-/ens-3.3.0.tgz#d54f4c8e6b7bcafdc13ab294433f45416b2b2791" + integrity sha512-zVIH/5cQnIEgJPg1aV8+ehYicpcfuAisfrtzYh1pN3UbfeqPylFBeBaIZ7xj/xYzlJjkrek/h9VfULl6EX9Aqw== + dependencies: + "@ensdomains/ens" "^0.4.4" + "@ensdomains/resolver" "^0.2.4" + ethers "^5.0.1" + +"@ethereum-waffle/mock-contract@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/mock-contract/-/mock-contract-3.3.0.tgz#7b331f1c95c5d46ee9478f7a6be2869f707d307a" + integrity sha512-apwq0d+2nQxaNwsyLkE+BNMBhZ1MKGV28BtI9WjD3QD2Ztdt1q9II4sKA4VrLTUneYSmkYbJZJxw89f+OpJGyw== + dependencies: + "@ethersproject/abi" "^5.0.1" + ethers "^5.0.1" + +"@ethereum-waffle/provider@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereum-waffle/provider/-/provider-3.4.0.tgz#a36a0890d4fbc230e807870c8d3b683594efef00" + integrity sha512-QgseGzpwlzmaHXhqfdzthCGu5a6P1SBF955jQHf/rBkK1Y7gGo2ukt3rXgxgfg/O5eHqRU+r8xw5MzVyVaBscQ== + dependencies: + "@ethereum-waffle/ens" "^3.3.0" + ethers "^5.0.1" + ganache-core "^2.13.2" + patch-package "^6.2.2" + postinstall-postinstall "^2.1.0" + +"@ethereumjs/block@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.4.0.tgz#4747b0c06220ee10cbdfe1cbde8cbb0677b1b074" + integrity sha512-umKAoTX32yXzErpIksPHodFc/5y8bmZMnOl6hWy5Vd8xId4+HKFUOyEiN16Y97zMwFRysRpcrR6wBejfqc6Bmg== + dependencies: + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + ethereumjs-util "^7.1.0" + merkle-patricia-tree "^4.2.0" + +"@ethereumjs/blockchain@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.4.0.tgz#28d712627d3442b2bb1f50dd5acba7cde1021993" + integrity sha512-wAuKLaew6PL52kH8YPXO7PbjjKV12jivRSyHQehkESw4slSLLfYA6Jv7n5YxyT2ajD7KNMPVh7oyF/MU6HcOvg== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/ethash" "^1.0.0" + debug "^2.2.0" + ethereumjs-util "^7.1.0" + level-mem "^5.0.1" + lru-cache "^5.1.1" + rlp "^2.2.4" + semaphore-async-await "^1.5.1" + +"@ethereumjs/common@^2.3.0", "@ethereumjs/common@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.4.0.tgz#2d67f6e6ba22246c5c89104e6b9a119fb3039766" + integrity sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.0" + +"@ethereumjs/ethash@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/ethash/-/ethash-1.0.0.tgz#4e77f85b37be1ade5393e8719bdabac3e796ddaa" + integrity sha512-iIqnGG6NMKesyOxv2YctB2guOVX18qMAWlj3QlZyrc+GqfzLqoihti+cVNQnyNxr7eYuPdqwLQOFuPe6g/uKjw== + dependencies: + "@types/levelup" "^4.3.0" + buffer-xor "^2.0.1" + ethereumjs-util "^7.0.7" + miller-rabin "^4.0.0" + +"@ethereumjs/tx@^3.2.1", "@ethereumjs/tx@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.0.tgz#14ed1b7fa0f28e1cd61e3ecbdab824205f6a4378" + integrity sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA== + dependencies: + "@ethereumjs/common" "^2.4.0" + ethereumjs-util "^7.1.0" + +"@ethereumjs/vm@^5.5.2": + version "5.5.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.5.2.tgz#918a2c1000aaa9fdbe6007a4fdc2c62833122adf" + integrity sha512-AydZ4wfvZAsBuFzs3xVSA2iU0hxhL8anXco3UW3oh9maVC34kTEytOfjHf06LTEfN0MF9LDQ4ciLa7If6ZN/sg== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/blockchain" "^5.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + async-eventemitter "^0.2.4" + core-js-pure "^3.0.1" + debug "^2.2.0" + ethereumjs-util "^7.1.0" + functional-red-black-tree "^1.0.1" + mcl-wasm "^0.7.1" + merkle-patricia-tree "^4.2.0" + rustbn.js "~0.2.0" + util.promisify "^1.0.1" + +"@ethersproject/abi@5.0.0-beta.153": + version "5.0.0-beta.153" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" + integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== + dependencies: + "@ethersproject/address" ">=5.0.0-beta.128" + "@ethersproject/bignumber" ">=5.0.0-beta.130" + "@ethersproject/bytes" ">=5.0.0-beta.129" + "@ethersproject/constants" ">=5.0.0-beta.128" + "@ethersproject/hash" ">=5.0.0-beta.128" + "@ethersproject/keccak256" ">=5.0.0-beta.127" + "@ethersproject/logger" ">=5.0.0-beta.129" + "@ethersproject/properties" ">=5.0.0-beta.131" + "@ethersproject/strings" ">=5.0.0-beta.130" + +"@ethersproject/abi@5.0.7": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" + integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== + dependencies: + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/hash" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + +"@ethersproject/abi@5.4.1", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.1", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.3.1", "@ethersproject/abi@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.4.1.tgz#6ac28fafc9ef6f5a7a37e30356a2eb31fa05d39b" + integrity sha512-9mhbjUk76BiSluiiW4BaYyI58KSbDMMQpCLdsAR+RsT2GyATiNYxVv+pGWRrekmsIdY3I+hOqsYQSTkc8L/mcg== + dependencies: + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/abstract-provider@5.4.1", "@ethersproject/abstract-provider@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz#e404309a29f771bd4d28dbafadcaa184668c2a6e" + integrity sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/networks" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/web" "^5.4.0" + +"@ethersproject/abstract-signer@5.4.1", "@ethersproject/abstract-signer@^5.3.0", "@ethersproject/abstract-signer@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz#e4e9abcf4dd4f1ba0db7dff9746a5f78f355ea81" + integrity sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + +"@ethersproject/address@5.4.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.3.0", "@ethersproject/address@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" + integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + +"@ethersproject/base64@5.4.0", "@ethersproject/base64@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a" + integrity sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ== + dependencies: + "@ethersproject/bytes" "^5.4.0" + +"@ethersproject/basex@5.4.0", "@ethersproject/basex@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.4.0.tgz#0a2da0f4e76c504a94f2b21d3161ed9438c7f8a6" + integrity sha512-J07+QCVJ7np2bcpxydFVf/CuYo9mZ7T73Pe7KQY4c1lRlrixMeblauMxHXD0MPwFmUHZIILDNViVkykFBZylbg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + +"@ethersproject/bignumber@5.4.1", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.3.0", "@ethersproject/bignumber@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.1.tgz#64399d3b9ae80aa83d483e550ba57ea062c1042d" + integrity sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + bn.js "^4.11.9" + +"@ethersproject/bytes@5.4.0", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.3.0", "@ethersproject/bytes@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e" + integrity sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/constants@5.4.0", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.4.0.tgz#ee0bdcb30bf1b532d2353c977bf2ef1ee117958a" + integrity sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + +"@ethersproject/contracts@5.4.1", "@ethersproject/contracts@^5.3.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470" + integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w== + dependencies: + "@ethersproject/abi" "^5.4.0" + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + +"@ethersproject/hardware-wallets@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hardware-wallets/-/hardware-wallets-5.4.0.tgz#bce275b395e26b6f50481095331157614490a473" + integrity sha512-Ea4ymm4etZoSWy93OcEGZkuVqyYdl/RjMlaXY6yQIYjsGi75sm4apbTiBA8DA9uajkv1FVakJZEBBTaVGgnBLA== + dependencies: + "@ledgerhq/hw-app-eth" "5.27.2" + "@ledgerhq/hw-transport" "5.26.0" + "@ledgerhq/hw-transport-u2f" "5.26.0" + ethers "^5.4.0" + optionalDependencies: + "@ledgerhq/hw-transport-node-hid" "5.26.0" + +"@ethersproject/hash@5.4.0", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.4.0.tgz#d18a8e927e828e22860a011f39e429d388344ae0" + integrity sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/hdnode@5.4.0", "@ethersproject/hdnode@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.4.0.tgz#4bc9999b9a12eb5ce80c5faa83114a57e4107cac" + integrity sha512-pKxdS0KAaeVGfZPp1KOiDLB0jba11tG6OP1u11QnYfb7pXn6IZx0xceqWRr6ygke8+Kw74IpOoSi7/DwANhy8Q== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/basex" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/pbkdf2" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/wordlists" "^5.4.0" + +"@ethersproject/json-wallets@5.4.0", "@ethersproject/json-wallets@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.4.0.tgz#2583341cfe313fc9856642e8ace3080154145e95" + integrity sha512-igWcu3fx4aiczrzEHwG1xJZo9l1cFfQOWzTqwRw/xcvxTk58q4f9M7cjh51EKphMHvrJtcezJ1gf1q1AUOfEQQ== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hdnode" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/pbkdf2" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.4.0", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.4.0.tgz#7143b8eea4976080241d2bd92e3b1f1bf7025318" + integrity sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A== + dependencies: + "@ethersproject/bytes" "^5.4.0" + js-sha3 "0.5.7" + +"@ethersproject/logger@5.4.1", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.1.tgz#503bd33683538b923c578c07d1c2c0dd18672054" + integrity sha512-DZ+bRinnYLPw1yAC64oRl0QyVZj43QeHIhVKfD/+YwSz4wsv1pfwb5SOFjz+r710YEWzU6LrhuSjpSO+6PeE4A== + +"@ethersproject/networks@5.4.2", "@ethersproject/networks@^5.4.0": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.2.tgz#2247d977626e97e2c3b8ee73cd2457babde0ce35" + integrity sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/pbkdf2@5.4.0", "@ethersproject/pbkdf2@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz#ed88782a67fda1594c22d60d0ca911a9d669641c" + integrity sha512-x94aIv6tiA04g6BnazZSLoRXqyusawRyZWlUhKip2jvoLpzJuLb//KtMM6PEovE47pMbW+Qe1uw+68ameJjB7g== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + +"@ethersproject/properties@5.4.1", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.1.tgz#9f051f976ce790142c6261ccb7b826eaae1f2f36" + integrity sha512-cyCGlF8wWlIZyizsj2PpbJ9I7rIlUAfnHYwy/T90pdkSn/NFTa5YWZx2wTJBe9V7dD65dcrrEMisCRUJiq6n3w== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/providers@5.4.5", "@ethersproject/providers@^5.3.1": + version "5.4.5" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.5.tgz#eb2ea2a743a8115f79604a8157233a3a2c832928" + integrity sha512-1GkrvkiAw3Fj28cwi1Sqm8ED1RtERtpdXmRfwIBGmqBSN5MoeRUHuwHPppMtbPayPgpFcvD7/Gdc9doO5fGYgw== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/basex" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/networks" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/web" "^5.4.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.4.0", "@ethersproject/random@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.4.0.tgz#9cdde60e160d024be39cc16f8de3b9ce39191e16" + integrity sha512-pnpWNQlf0VAZDEOVp1rsYQosmv2o0ITS/PecNw+mS2/btF8eYdspkN0vIXrCMtkX09EAh9bdk8GoXmFXM1eAKw== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/rlp@5.4.0", "@ethersproject/rlp@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.4.0.tgz#de61afda5ff979454e76d3b3310a6c32ad060931" + integrity sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/sha2@5.4.0", "@ethersproject/sha2@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.4.0.tgz#c9a8db1037014cbc4e9482bd662f86c090440371" + integrity sha512-siheo36r1WD7Cy+bDdE1BJ8y0bDtqXCOxRMzPa4bV1TGt/eTUUt03BHoJNB6reWJD8A30E/pdJ8WFkq+/uz4Gg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.4.0", "@ethersproject/signing-key@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.4.0.tgz#2f05120984e81cf89a3d5f6dec5c68ee0894fbec" + integrity sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.4.0", "@ethersproject/solidity@^5.3.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.4.0.tgz#1305e058ea02dc4891df18b33232b11a14ece9ec" + integrity sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/strings@5.4.0", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a" + integrity sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/transactions@5.4.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.3.0", "@ethersproject/transactions@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0" + integrity sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ== + dependencies: + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + +"@ethersproject/units@5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe" + integrity sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/wallet@5.4.0", "@ethersproject/wallet@^5.3.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.4.0.tgz#fa5b59830b42e9be56eadd45a16a2e0933ad9353" + integrity sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/hdnode" "^5.4.0" + "@ethersproject/json-wallets" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/wordlists" "^5.4.0" + +"@ethersproject/web@5.4.0", "@ethersproject/web@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.4.0.tgz#49fac173b96992334ed36a175538ba07a7413d1f" + integrity sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og== + dependencies: + "@ethersproject/base64" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/wordlists@5.4.0", "@ethersproject/wordlists@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.4.0.tgz#f34205ec3bbc9e2c49cadaee774cf0b07e7573d7" + integrity sha512-FemEkf6a+EBKEPxlzeVgUaVSodU7G0Na89jqKjmWMlDB0tomoU8RlEMgUvXyqtrg8N4cwpLh8nyRnm1Nay1isA== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@gar/promisify@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.2.tgz#30aa825f11d438671d585bd44e7fd564535fc210" + integrity sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw== + +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" + integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== + +"@hutson/parse-repository-url@^3.0.0": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" + integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== + +"@ledgerhq/cryptoassets@^5.27.2": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/cryptoassets/-/cryptoassets-5.53.0.tgz#11dcc93211960c6fd6620392e4dd91896aaabe58" + integrity sha512-M3ibc3LRuHid5UtL7FI3IC6nMEppvly98QHFoSa7lJU0HDzQxY6zHec/SPM4uuJUC8sXoGVAiRJDkgny54damw== + dependencies: + invariant "2" + +"@ledgerhq/devices@^5.26.0", "@ledgerhq/devices@^5.51.1": + version "5.51.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.51.1.tgz#d741a4a5d8f17c2f9d282fd27147e6fe1999edb7" + integrity sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA== + dependencies: + "@ledgerhq/errors" "^5.50.0" + "@ledgerhq/logs" "^5.50.0" + rxjs "6" + semver "^7.3.5" + +"@ledgerhq/errors@^5.26.0", "@ledgerhq/errors@^5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.50.0.tgz#e3a6834cb8c19346efca214c1af84ed28e69dad9" + integrity sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow== + +"@ledgerhq/hw-app-eth@5.27.2": + version "5.27.2" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-5.27.2.tgz#65a2ed613a69340e0cd69c942147455ec513d006" + integrity sha512-llNdrE894cCN8j6yxJEUniciyLVcLmu5N0UmIJLOObztG+5rOF4bX54h4SreTWK+E10Z0CzHSeyE5Lz/tVcqqQ== + dependencies: + "@ledgerhq/cryptoassets" "^5.27.2" + "@ledgerhq/errors" "^5.26.0" + "@ledgerhq/hw-transport" "^5.26.0" + bignumber.js "^9.0.1" + rlp "^2.2.6" + +"@ledgerhq/hw-transport-node-hid-noevents@^5.26.0": + version "5.51.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-5.51.1.tgz#71f37f812e448178ad0bcc2258982150d211c1ab" + integrity sha512-9wFf1L8ZQplF7XOY2sQGEeOhpmBRzrn+4X43kghZ7FBDoltrcK+s/D7S+7ffg3j2OySyP6vIIIgloXylao5Scg== + dependencies: + "@ledgerhq/devices" "^5.51.1" + "@ledgerhq/errors" "^5.50.0" + "@ledgerhq/hw-transport" "^5.51.1" + "@ledgerhq/logs" "^5.50.0" + node-hid "2.1.1" + +"@ledgerhq/hw-transport-node-hid@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-5.26.0.tgz#69bc4f8067cdd9c09ef4aed0e0b3c58328936e4b" + integrity sha512-qhaefZVZatJ6UuK8Wb6WSFNOLWc2mxcv/xgsfKi5HJCIr4bPF/ecIeN+7fRcEaycxj4XykY6Z4A7zDVulfFH4w== + dependencies: + "@ledgerhq/devices" "^5.26.0" + "@ledgerhq/errors" "^5.26.0" + "@ledgerhq/hw-transport" "^5.26.0" + "@ledgerhq/hw-transport-node-hid-noevents" "^5.26.0" + "@ledgerhq/logs" "^5.26.0" + lodash "^4.17.20" + node-hid "1.3.0" + usb "^1.6.3" + +"@ledgerhq/hw-transport-u2f@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-5.26.0.tgz#b7d9d13193eb82b051fd7a838cd652372f907ec5" + integrity sha512-QTxP1Rsh+WZ184LUOelYVLeaQl3++V3I2jFik+l9JZtakwEHjD0XqOT750xpYNL/vfHsy31Wlz+oicdxGzFk+w== + dependencies: + "@ledgerhq/errors" "^5.26.0" + "@ledgerhq/hw-transport" "^5.26.0" + "@ledgerhq/logs" "^5.26.0" + u2f-api "0.2.7" + +"@ledgerhq/hw-transport@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.26.0.tgz#bfedc3d48400ad2fe48278d9444344b72aa9d0fe" + integrity sha512-NFeJOJmyEfAX8uuIBTpocWHcz630sqPcXbu864Q+OCBm4EK5UOKV1h/pX7e0xgNIKY8zhJ/O4p4cIZp9tnXLHQ== + dependencies: + "@ledgerhq/devices" "^5.26.0" + "@ledgerhq/errors" "^5.26.0" + events "^3.2.0" + +"@ledgerhq/hw-transport@^5.26.0", "@ledgerhq/hw-transport@^5.51.1": + version "5.51.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz#8dd14a8e58cbee4df0c29eaeef983a79f5f22578" + integrity sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw== + dependencies: + "@ledgerhq/devices" "^5.51.1" + "@ledgerhq/errors" "^5.50.0" + events "^3.3.0" + +"@ledgerhq/logs@^5.26.0", "@ledgerhq/logs@^5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.50.0.tgz#29c6419e8379d496ab6d0426eadf3c4d100cd186" + integrity sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA== + +"@lerna/add@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-4.0.0.tgz#c36f57d132502a57b9e7058d1548b7a565ef183f" + integrity sha512-cpmAH1iS3k8JBxNvnMqrGTTjbY/ZAiKa1ChJzFevMYY3eeqbvhsBKnBcxjRXtdrJ6bd3dCQM+ZtK+0i682Fhng== + dependencies: + "@lerna/bootstrap" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/validation-error" "4.0.0" + dedent "^0.7.0" + npm-package-arg "^8.1.0" + p-map "^4.0.0" + pacote "^11.2.6" + semver "^7.3.4" + +"@lerna/bootstrap@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-4.0.0.tgz#5f5c5e2c6cfc8fcec50cb2fbe569a8c607101891" + integrity sha512-RkS7UbeM2vu+kJnHzxNRCLvoOP9yGNgkzRdy4UV2hNalD7EP41bLvRVOwRYQ7fhc2QcbhnKNdOBihYRL0LcKtw== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/has-npm-version" "4.0.0" + "@lerna/npm-install" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/rimraf-dir" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/symlink-binary" "4.0.0" + "@lerna/symlink-dependencies" "4.0.0" + "@lerna/validation-error" "4.0.0" + dedent "^0.7.0" + get-port "^5.1.1" + multimatch "^5.0.0" + npm-package-arg "^8.1.0" + npmlog "^4.1.2" + p-map "^4.0.0" + p-map-series "^2.1.0" + p-waterfall "^2.1.1" + read-package-tree "^5.3.1" + semver "^7.3.4" + +"@lerna/changed@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-4.0.0.tgz#b9fc76cea39b9292a6cd263f03eb57af85c9270b" + integrity sha512-cD+KuPRp6qiPOD+BO6S6SN5cARspIaWSOqGBpGnYzLb4uWT8Vk4JzKyYtc8ym1DIwyoFXHosXt8+GDAgR8QrgQ== + dependencies: + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/listable" "4.0.0" + "@lerna/output" "4.0.0" + +"@lerna/check-working-tree@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-4.0.0.tgz#257e36a602c00142e76082a19358e3e1ae8dbd58" + integrity sha512-/++bxM43jYJCshBiKP5cRlCTwSJdRSxVmcDAXM+1oUewlZJVSVlnks5eO0uLxokVFvLhHlC5kHMc7gbVFPHv6Q== + dependencies: + "@lerna/collect-uncommitted" "4.0.0" + "@lerna/describe-ref" "4.0.0" + "@lerna/validation-error" "4.0.0" + +"@lerna/child-process@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-4.0.0.tgz#341b96a57dffbd9705646d316e231df6fa4df6e1" + integrity sha512-XtCnmCT9eyVsUUHx6y/CTBYdV9g2Cr/VxyseTWBgfIur92/YKClfEtJTbOh94jRT62hlKLqSvux/UhxXVh613Q== + dependencies: + chalk "^4.1.0" + execa "^5.0.0" + strong-log-transformer "^2.1.0" + +"@lerna/clean@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-4.0.0.tgz#8f778b6f2617aa2a936a6b5e085ae62498e57dc5" + integrity sha512-uugG2iN9k45ITx2jtd8nEOoAtca8hNlDCUM0N3lFgU/b1mEQYAPRkqr1qs4FLRl/Y50ZJ41wUz1eazS+d/0osA== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/rimraf-dir" "4.0.0" + p-map "^4.0.0" + p-map-series "^2.1.0" + p-waterfall "^2.1.1" + +"@lerna/cli@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-4.0.0.tgz#8eabd334558836c1664df23f19acb95e98b5bbf3" + integrity sha512-Neaw3GzFrwZiRZv2g7g6NwFjs3er1vhraIniEs0jjVLPMNC4eata0na3GfE5yibkM/9d3gZdmihhZdZ3EBdvYA== + dependencies: + "@lerna/global-options" "4.0.0" + dedent "^0.7.0" + npmlog "^4.1.2" + yargs "^16.2.0" + +"@lerna/collect-uncommitted@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-4.0.0.tgz#855cd64612969371cfc2453b90593053ff1ba779" + integrity sha512-ufSTfHZzbx69YNj7KXQ3o66V4RC76ffOjwLX0q/ab//61bObJ41n03SiQEhSlmpP+gmFbTJ3/7pTe04AHX9m/g== + dependencies: + "@lerna/child-process" "4.0.0" + chalk "^4.1.0" + npmlog "^4.1.2" + +"@lerna/collect-updates@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-4.0.0.tgz#8e208b1bafd98a372ff1177f7a5e288f6bea8041" + integrity sha512-bnNGpaj4zuxsEkyaCZLka9s7nMs58uZoxrRIPJ+nrmrZYp1V5rrd+7/NYTuunOhY2ug1sTBvTAxj3NZQ+JKnOw== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/describe-ref" "4.0.0" + minimatch "^3.0.4" + npmlog "^4.1.2" + slash "^3.0.0" + +"@lerna/command@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-4.0.0.tgz#991c7971df8f5bf6ae6e42c808869a55361c1b98" + integrity sha512-LM9g3rt5FsPNFqIHUeRwWXLNHJ5NKzOwmVKZ8anSp4e1SPrv2HNc1V02/9QyDDZK/w+5POXH5lxZUI1CHaOK/A== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/project" "4.0.0" + "@lerna/validation-error" "4.0.0" + "@lerna/write-log-file" "4.0.0" + clone-deep "^4.0.1" + dedent "^0.7.0" + execa "^5.0.0" + is-ci "^2.0.0" + npmlog "^4.1.2" + +"@lerna/conventional-commits@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-4.0.0.tgz#660fb2c7b718cb942ead70110df61f18c6f99750" + integrity sha512-CSUQRjJHFrH8eBn7+wegZLV3OrNc0Y1FehYfYGhjLE2SIfpCL4bmfu/ViYuHh9YjwHaA+4SX6d3hR+xkeseKmw== + dependencies: + "@lerna/validation-error" "4.0.0" + conventional-changelog-angular "^5.0.12" + conventional-changelog-core "^4.2.2" + conventional-recommended-bump "^6.1.0" + fs-extra "^9.1.0" + get-stream "^6.0.0" + lodash.template "^4.5.0" + npm-package-arg "^8.1.0" + npmlog "^4.1.2" + pify "^5.0.0" + semver "^7.3.4" + +"@lerna/create-symlink@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-4.0.0.tgz#8c5317ce5ae89f67825443bd7651bf4121786228" + integrity sha512-I0phtKJJdafUiDwm7BBlEUOtogmu8+taxq6PtIrxZbllV9hWg59qkpuIsiFp+no7nfRVuaasNYHwNUhDAVQBig== + dependencies: + cmd-shim "^4.1.0" + fs-extra "^9.1.0" + npmlog "^4.1.2" + +"@lerna/create@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-4.0.0.tgz#b6947e9b5dfb6530321952998948c3e63d64d730" + integrity sha512-mVOB1niKByEUfxlbKTM1UNECWAjwUdiioIbRQZEeEabtjCL69r9rscIsjlGyhGWCfsdAG5wfq4t47nlDXdLLag== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/validation-error" "4.0.0" + dedent "^0.7.0" + fs-extra "^9.1.0" + globby "^11.0.2" + init-package-json "^2.0.2" + npm-package-arg "^8.1.0" + p-reduce "^2.1.0" + pacote "^11.2.6" + pify "^5.0.0" + semver "^7.3.4" + slash "^3.0.0" + validate-npm-package-license "^3.0.4" + validate-npm-package-name "^3.0.0" + whatwg-url "^8.4.0" + yargs-parser "20.2.4" + +"@lerna/describe-ref@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-4.0.0.tgz#53c53b4ea65fdceffa072a62bfebe6772c45d9ec" + integrity sha512-eTU5+xC4C5Gcgz+Ey4Qiw9nV2B4JJbMulsYJMW8QjGcGh8zudib7Sduj6urgZXUYNyhYpRs+teci9M2J8u+UvQ== + dependencies: + "@lerna/child-process" "4.0.0" + npmlog "^4.1.2" + +"@lerna/diff@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-4.0.0.tgz#6d3071817aaa4205a07bf77cfc6e932796d48b92" + integrity sha512-jYPKprQVg41+MUMxx6cwtqsNm0Yxx9GDEwdiPLwcUTFx+/qKCEwifKNJ1oGIPBxyEHX2PFCOjkK39lHoj2qiag== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/validation-error" "4.0.0" + npmlog "^4.1.2" + +"@lerna/exec@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-4.0.0.tgz#eb6cb95cb92d42590e9e2d628fcaf4719d4a8be6" + integrity sha512-VGXtL/b/JfY84NB98VWZpIExfhLOzy0ozm/0XaS4a2SmkAJc5CeUfrhvHxxkxiTBLkU+iVQUyYEoAT0ulQ8PCw== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/profiler" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + p-map "^4.0.0" + +"@lerna/filter-options@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-4.0.0.tgz#ac94cc515d7fa3b47e2f7d74deddeabb1de5e9e6" + integrity sha512-vV2ANOeZhOqM0rzXnYcFFCJ/kBWy/3OA58irXih9AMTAlQLymWAK0akWybl++sUJ4HB9Hx12TOqaXbYS2NM5uw== + dependencies: + "@lerna/collect-updates" "4.0.0" + "@lerna/filter-packages" "4.0.0" + dedent "^0.7.0" + npmlog "^4.1.2" + +"@lerna/filter-packages@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-4.0.0.tgz#b1f70d70e1de9cdd36a4e50caa0ac501f8d012f2" + integrity sha512-+4AJIkK7iIiOaqCiVTYJxh/I9qikk4XjNQLhE3kixaqgMuHl1NQ99qXRR0OZqAWB9mh8Z1HA9bM5K1HZLBTOqA== + dependencies: + "@lerna/validation-error" "4.0.0" + multimatch "^5.0.0" + npmlog "^4.1.2" + +"@lerna/get-npm-exec-opts@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-4.0.0.tgz#dc955be94a4ae75c374ef9bce91320887d34608f" + integrity sha512-yvmkerU31CTWS2c7DvmAWmZVeclPBqI7gPVr5VATUKNWJ/zmVcU4PqbYoLu92I9Qc4gY1TuUplMNdNuZTSL7IQ== + dependencies: + npmlog "^4.1.2" + +"@lerna/get-packed@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-4.0.0.tgz#0989d61624ac1f97e393bdad2137c49cd7a37823" + integrity sha512-rfWONRsEIGyPJTxFzC8ECb3ZbsDXJbfqWYyeeQQDrJRPnEJErlltRLPLgC2QWbxFgFPsoDLeQmFHJnf0iDfd8w== + dependencies: + fs-extra "^9.1.0" + ssri "^8.0.1" + tar "^6.1.0" + +"@lerna/github-client@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-4.0.0.tgz#2ced67721363ef70f8e12ffafce4410918f4a8a4" + integrity sha512-2jhsldZtTKXYUBnOm23Lb0Fx8G4qfSXF9y7UpyUgWUj+YZYd+cFxSuorwQIgk5P4XXrtVhsUesIsli+BYSThiw== + dependencies: + "@lerna/child-process" "4.0.0" + "@octokit/plugin-enterprise-rest" "^6.0.1" + "@octokit/rest" "^18.1.0" + git-url-parse "^11.4.4" + npmlog "^4.1.2" + +"@lerna/gitlab-client@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-4.0.0.tgz#00dad73379c7b38951d4b4ded043504c14e2b67d" + integrity sha512-OMUpGSkeDWFf7BxGHlkbb35T7YHqVFCwBPSIR6wRsszY8PAzCYahtH3IaJzEJyUg6vmZsNl0FSr3pdA2skhxqA== + dependencies: + node-fetch "^2.6.1" + npmlog "^4.1.2" + whatwg-url "^8.4.0" + +"@lerna/global-options@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-4.0.0.tgz#c7d8b0de6a01d8a845e2621ea89e7f60f18c6a5f" + integrity sha512-TRMR8afAHxuYBHK7F++Ogop2a82xQjoGna1dvPOY6ltj/pEx59pdgcJfYcynYqMkFIk8bhLJJN9/ndIfX29FTQ== + +"@lerna/has-npm-version@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-4.0.0.tgz#d3fc3292c545eb28bd493b36e6237cf0279f631c" + integrity sha512-LQ3U6XFH8ZmLCsvsgq1zNDqka0Xzjq5ibVN+igAI5ccRWNaUsE/OcmsyMr50xAtNQMYMzmpw5GVLAivT2/YzCg== + dependencies: + "@lerna/child-process" "4.0.0" + semver "^7.3.4" + +"@lerna/import@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-4.0.0.tgz#bde656c4a451fa87ae41733ff8a8da60547c5465" + integrity sha512-FaIhd+4aiBousKNqC7TX1Uhe97eNKf5/SC7c5WZANVWtC7aBWdmswwDt3usrzCNpj6/Wwr9EtEbYROzxKH8ffg== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/validation-error" "4.0.0" + dedent "^0.7.0" + fs-extra "^9.1.0" + p-map-series "^2.1.0" + +"@lerna/info@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/info/-/info-4.0.0.tgz#b9fb0e479d60efe1623603958a831a88b1d7f1fc" + integrity sha512-8Uboa12kaCSZEn4XRfPz5KU9XXoexSPS4oeYGj76s2UQb1O1GdnEyfjyNWoUl1KlJ2i/8nxUskpXIftoFYH0/Q== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/output" "4.0.0" + envinfo "^7.7.4" + +"@lerna/init@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-4.0.0.tgz#dadff67e6dfb981e8ccbe0e6a310e837962f6c7a" + integrity sha512-wY6kygop0BCXupzWj5eLvTUqdR7vIAm0OgyV9WHpMYQGfs1V22jhztt8mtjCloD/O0nEe4tJhdG62XU5aYmPNQ== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/command" "4.0.0" + fs-extra "^9.1.0" + p-map "^4.0.0" + write-json-file "^4.3.0" + +"@lerna/link@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-4.0.0.tgz#c3a38aabd44279d714e90f2451e31b63f0fb65ba" + integrity sha512-KlvPi7XTAcVOByfaLlOeYOfkkDcd+bejpHMCd1KcArcFTwijOwXOVi24DYomIeHvy6HsX/IUquJ4PPUJIeB4+w== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/package-graph" "4.0.0" + "@lerna/symlink-dependencies" "4.0.0" + p-map "^4.0.0" + slash "^3.0.0" + +"@lerna/list@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-4.0.0.tgz#24b4e6995bd73f81c556793fe502b847efd9d1d7" + integrity sha512-L2B5m3P+U4Bif5PultR4TI+KtW+SArwq1i75QZ78mRYxPc0U/piau1DbLOmwrdqr99wzM49t0Dlvl6twd7GHFg== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/listable" "4.0.0" + "@lerna/output" "4.0.0" + +"@lerna/listable@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-4.0.0.tgz#d00d6cb4809b403f2b0374fc521a78e318b01214" + integrity sha512-/rPOSDKsOHs5/PBLINZOkRIX1joOXUXEtyUs5DHLM8q6/RP668x/1lFhw6Dx7/U+L0+tbkpGtZ1Yt0LewCLgeQ== + dependencies: + "@lerna/query-graph" "4.0.0" + chalk "^4.1.0" + columnify "^1.5.4" + +"@lerna/log-packed@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-4.0.0.tgz#95168fe2e26ac6a71e42f4be857519b77e57a09f" + integrity sha512-+dpCiWbdzgMAtpajLToy9PO713IHoE6GV/aizXycAyA07QlqnkpaBNZ8DW84gHdM1j79TWockGJo9PybVhrrZQ== + dependencies: + byte-size "^7.0.0" + columnify "^1.5.4" + has-unicode "^2.0.1" + npmlog "^4.1.2" + +"@lerna/npm-conf@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-4.0.0.tgz#b259fd1e1cee2bf5402b236e770140ff9ade7fd2" + integrity sha512-uS7H02yQNq3oejgjxAxqq/jhwGEE0W0ntr8vM3EfpCW1F/wZruwQw+7bleJQ9vUBjmdXST//tk8mXzr5+JXCfw== + dependencies: + config-chain "^1.1.12" + pify "^5.0.0" + +"@lerna/npm-dist-tag@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-4.0.0.tgz#d1e99b4eccd3414142f0548ad331bf2d53f3257a" + integrity sha512-F20sg28FMYTgXqEQihgoqSfwmq+Id3zT23CnOwD+XQMPSy9IzyLf1fFVH319vXIw6NF6Pgs4JZN2Qty6/CQXGw== + dependencies: + "@lerna/otplease" "4.0.0" + npm-package-arg "^8.1.0" + npm-registry-fetch "^9.0.0" + npmlog "^4.1.2" + +"@lerna/npm-install@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-4.0.0.tgz#31180be3ab3b7d1818a1a0c206aec156b7094c78" + integrity sha512-aKNxq2j3bCH3eXl3Fmu4D54s/YLL9WSwV8W7X2O25r98wzrO38AUN6AB9EtmAx+LV/SP15et7Yueg9vSaanRWg== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/get-npm-exec-opts" "4.0.0" + fs-extra "^9.1.0" + npm-package-arg "^8.1.0" + npmlog "^4.1.2" + signal-exit "^3.0.3" + write-pkg "^4.0.0" + +"@lerna/npm-publish@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-4.0.0.tgz#84eb62e876fe949ae1fd62c60804423dbc2c4472" + integrity sha512-vQb7yAPRo5G5r77DRjHITc9piR9gvEKWrmfCH7wkfBnGWEqu7n8/4bFQ7lhnkujvc8RXOsYpvbMQkNfkYibD/w== + dependencies: + "@lerna/otplease" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + fs-extra "^9.1.0" + libnpmpublish "^4.0.0" + npm-package-arg "^8.1.0" + npmlog "^4.1.2" + pify "^5.0.0" + read-package-json "^3.0.0" + +"@lerna/npm-run-script@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-4.0.0.tgz#dfebf4f4601442e7c0b5214f9fb0d96c9350743b" + integrity sha512-Jmyh9/IwXJjOXqKfIgtxi0bxi1pUeKe5bD3S81tkcy+kyng/GNj9WSqD5ZggoNP2NP//s4CLDAtUYLdP7CU9rA== + dependencies: + "@lerna/child-process" "4.0.0" + "@lerna/get-npm-exec-opts" "4.0.0" + npmlog "^4.1.2" + +"@lerna/otplease@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-4.0.0.tgz#84972eb43448f8a1077435ba1c5e59233b725850" + integrity sha512-Sgzbqdk1GH4psNiT6hk+BhjOfIr/5KhGBk86CEfHNJTk9BK4aZYyJD4lpDbDdMjIV4g03G7pYoqHzH765T4fxw== + dependencies: + "@lerna/prompt" "4.0.0" + +"@lerna/output@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/output/-/output-4.0.0.tgz#b1d72215c0e35483e4f3e9994debc82c621851f2" + integrity sha512-Un1sHtO1AD7buDQrpnaYTi2EG6sLF+KOPEAMxeUYG5qG3khTs2Zgzq5WE3dt2N/bKh7naESt20JjIW6tBELP0w== + dependencies: + npmlog "^4.1.2" + +"@lerna/pack-directory@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-4.0.0.tgz#8b617db95d20792f043aaaa13a9ccc0e04cb4c74" + integrity sha512-NJrmZNmBHS+5aM+T8N6FVbaKFScVqKlQFJNY2k7nsJ/uklNKsLLl6VhTQBPwMTbf6Tf7l6bcKzpy7aePuq9UiQ== + dependencies: + "@lerna/get-packed" "4.0.0" + "@lerna/package" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + npm-packlist "^2.1.4" + npmlog "^4.1.2" + tar "^6.1.0" + temp-write "^4.0.0" + +"@lerna/package-graph@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-4.0.0.tgz#16a00253a8ac810f72041481cb46bcee8d8123dd" + integrity sha512-QED2ZCTkfXMKFoTGoccwUzjHtZMSf3UKX14A4/kYyBms9xfFsesCZ6SLI5YeySEgcul8iuIWfQFZqRw+Qrjraw== + dependencies: + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/validation-error" "4.0.0" + npm-package-arg "^8.1.0" + npmlog "^4.1.2" + semver "^7.3.4" + +"@lerna/package@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-4.0.0.tgz#1b4c259c4bcff45c876ee1d591a043aacbc0d6b7" + integrity sha512-l0M/izok6FlyyitxiQKr+gZLVFnvxRQdNhzmQ6nRnN9dvBJWn+IxxpM+cLqGACatTnyo9LDzNTOj2Db3+s0s8Q== + dependencies: + load-json-file "^6.2.0" + npm-package-arg "^8.1.0" + write-pkg "^4.0.0" + +"@lerna/prerelease-id-from-version@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-4.0.0.tgz#c7e0676fcee1950d85630e108eddecdd5b48c916" + integrity sha512-GQqguzETdsYRxOSmdFZ6zDBXDErIETWOqomLERRY54f4p+tk4aJjoVdd9xKwehC9TBfIFvlRbL1V9uQGHh1opg== + dependencies: + semver "^7.3.4" + +"@lerna/profiler@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-4.0.0.tgz#8a53ab874522eae15d178402bff90a14071908e9" + integrity sha512-/BaEbqnVh1LgW/+qz8wCuI+obzi5/vRE8nlhjPzdEzdmWmZXuCKyWSEzAyHOJWw1ntwMiww5dZHhFQABuoFz9Q== + dependencies: + fs-extra "^9.1.0" + npmlog "^4.1.2" + upath "^2.0.1" + +"@lerna/project@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-4.0.0.tgz#ff84893935833533a74deff30c0e64ddb7f0ba6b" + integrity sha512-o0MlVbDkD5qRPkFKlBZsXZjoNTWPyuL58564nSfZJ6JYNmgAptnWPB2dQlAc7HWRZkmnC2fCkEdoU+jioPavbg== + dependencies: + "@lerna/package" "4.0.0" + "@lerna/validation-error" "4.0.0" + cosmiconfig "^7.0.0" + dedent "^0.7.0" + dot-prop "^6.0.1" + glob-parent "^5.1.1" + globby "^11.0.2" + load-json-file "^6.2.0" + npmlog "^4.1.2" + p-map "^4.0.0" + resolve-from "^5.0.0" + write-json-file "^4.3.0" + +"@lerna/prompt@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-4.0.0.tgz#5ec69a803f3f0db0ad9f221dad64664d3daca41b" + integrity sha512-4Ig46oCH1TH5M7YyTt53fT6TuaKMgqUUaqdgxvp6HP6jtdak6+amcsqB8YGz2eQnw/sdxunx84DfI9XpoLj4bQ== + dependencies: + inquirer "^7.3.3" + npmlog "^4.1.2" + +"@lerna/publish@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-4.0.0.tgz#f67011305adeba120066a3b6d984a5bb5fceef65" + integrity sha512-K8jpqjHrChH22qtkytA5GRKIVFEtqBF6JWj1I8dWZtHs4Jywn8yB1jQ3BAMLhqmDJjWJtRck0KXhQQKzDK2UPg== + dependencies: + "@lerna/check-working-tree" "4.0.0" + "@lerna/child-process" "4.0.0" + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/describe-ref" "4.0.0" + "@lerna/log-packed" "4.0.0" + "@lerna/npm-conf" "4.0.0" + "@lerna/npm-dist-tag" "4.0.0" + "@lerna/npm-publish" "4.0.0" + "@lerna/otplease" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/pack-directory" "4.0.0" + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/pulse-till-done" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + "@lerna/version" "4.0.0" + fs-extra "^9.1.0" + libnpmaccess "^4.0.1" + npm-package-arg "^8.1.0" + npm-registry-fetch "^9.0.0" + npmlog "^4.1.2" + p-map "^4.0.0" + p-pipe "^3.1.0" + pacote "^11.2.6" + semver "^7.3.4" + +"@lerna/pulse-till-done@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-4.0.0.tgz#04bace7d483a8205c187b806bcd8be23d7bb80a3" + integrity sha512-Frb4F7QGckaybRhbF7aosLsJ5e9WuH7h0KUkjlzSByVycxY91UZgaEIVjS2oN9wQLrheLMHl6SiFY0/Pvo0Cxg== + dependencies: + npmlog "^4.1.2" + +"@lerna/query-graph@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-4.0.0.tgz#09dd1c819ac5ee3f38db23931143701f8a6eef63" + integrity sha512-YlP6yI3tM4WbBmL9GCmNDoeQyzcyg1e4W96y/PKMZa5GbyUvkS2+Jc2kwPD+5KcXou3wQZxSPzR3Te5OenaDdg== + dependencies: + "@lerna/package-graph" "4.0.0" + +"@lerna/resolve-symlink@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-4.0.0.tgz#6d006628a210c9b821964657a9e20a8c9a115e14" + integrity sha512-RtX8VEUzqT+uLSCohx8zgmjc6zjyRlh6i/helxtZTMmc4+6O4FS9q5LJas2uGO2wKvBlhcD6siibGt7dIC3xZA== + dependencies: + fs-extra "^9.1.0" + npmlog "^4.1.2" + read-cmd-shim "^2.0.0" + +"@lerna/rimraf-dir@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-4.0.0.tgz#2edf3b62d4eb0ef4e44e430f5844667d551ec25a" + integrity sha512-QNH9ABWk9mcMJh2/muD9iYWBk1oQd40y6oH+f3wwmVGKYU5YJD//+zMiBI13jxZRtwBx0vmBZzkBkK1dR11cBg== + dependencies: + "@lerna/child-process" "4.0.0" + npmlog "^4.1.2" + path-exists "^4.0.0" + rimraf "^3.0.2" + +"@lerna/run-lifecycle@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-4.0.0.tgz#e648a46f9210a9bcd7c391df6844498cb5079334" + integrity sha512-IwxxsajjCQQEJAeAaxF8QdEixfI7eLKNm4GHhXHrgBu185JcwScFZrj9Bs+PFKxwb+gNLR4iI5rpUdY8Y0UdGQ== + dependencies: + "@lerna/npm-conf" "4.0.0" + npm-lifecycle "^3.1.5" + npmlog "^4.1.2" + +"@lerna/run-topologically@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-4.0.0.tgz#af846eeee1a09b0c2be0d1bfb5ef0f7b04bb1827" + integrity sha512-EVZw9hGwo+5yp+VL94+NXRYisqgAlj0jWKWtAIynDCpghRxCE5GMO3xrQLmQgqkpUl9ZxQFpICgYv5DW4DksQA== + dependencies: + "@lerna/query-graph" "4.0.0" + p-queue "^6.6.2" + +"@lerna/run@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-4.0.0.tgz#4bc7fda055a729487897c23579694f6183c91262" + integrity sha512-9giulCOzlMPzcZS/6Eov6pxE9gNTyaXk0Man+iCIdGJNMrCnW7Dme0Z229WWP/UoxDKg71F2tMsVVGDiRd8fFQ== + dependencies: + "@lerna/command" "4.0.0" + "@lerna/filter-options" "4.0.0" + "@lerna/npm-run-script" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/profiler" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/timer" "4.0.0" + "@lerna/validation-error" "4.0.0" + p-map "^4.0.0" + +"@lerna/symlink-binary@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-4.0.0.tgz#21009f62d53a425f136cb4c1a32c6b2a0cc02d47" + integrity sha512-zualodWC4q1QQc1pkz969hcFeWXOsVYZC5AWVtAPTDfLl+TwM7eG/O6oP+Rr3fFowspxo6b1TQ6sYfDV6HXNWA== + dependencies: + "@lerna/create-symlink" "4.0.0" + "@lerna/package" "4.0.0" + fs-extra "^9.1.0" + p-map "^4.0.0" + +"@lerna/symlink-dependencies@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-4.0.0.tgz#8910eca084ae062642d0490d8972cf2d98e9ebbd" + integrity sha512-BABo0MjeUHNAe2FNGty1eantWp8u83BHSeIMPDxNq0MuW2K3CiQRaeWT3EGPAzXpGt0+hVzBrA6+OT0GPn7Yuw== + dependencies: + "@lerna/create-symlink" "4.0.0" + "@lerna/resolve-symlink" "4.0.0" + "@lerna/symlink-binary" "4.0.0" + fs-extra "^9.1.0" + p-map "^4.0.0" + p-map-series "^2.1.0" + +"@lerna/timer@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-4.0.0.tgz#a52e51bfcd39bfd768988049ace7b15c1fd7a6da" + integrity sha512-WFsnlaE7SdOvjuyd05oKt8Leg3ENHICnvX3uYKKdByA+S3g+TCz38JsNs7OUZVt+ba63nC2nbXDlUnuT2Xbsfg== + +"@lerna/validation-error@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-4.0.0.tgz#af9d62fe8304eaa2eb9a6ba1394f9aa807026d35" + integrity sha512-1rBOM5/koiVWlRi3V6dB863E1YzJS8v41UtsHgMr6gB2ncJ2LsQtMKlJpi3voqcgh41H8UsPXR58RrrpPpufyw== + dependencies: + npmlog "^4.1.2" + +"@lerna/version@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-4.0.0.tgz#532659ec6154d8a8789c5ab53878663e244e3228" + integrity sha512-otUgiqs5W9zGWJZSCCMRV/2Zm2A9q9JwSDS7s/tlKq4mWCYriWo7+wsHEA/nPTMDyYyBO5oyZDj+3X50KDUzeA== + dependencies: + "@lerna/check-working-tree" "4.0.0" + "@lerna/child-process" "4.0.0" + "@lerna/collect-updates" "4.0.0" + "@lerna/command" "4.0.0" + "@lerna/conventional-commits" "4.0.0" + "@lerna/github-client" "4.0.0" + "@lerna/gitlab-client" "4.0.0" + "@lerna/output" "4.0.0" + "@lerna/prerelease-id-from-version" "4.0.0" + "@lerna/prompt" "4.0.0" + "@lerna/run-lifecycle" "4.0.0" + "@lerna/run-topologically" "4.0.0" + "@lerna/validation-error" "4.0.0" + chalk "^4.1.0" + dedent "^0.7.0" + load-json-file "^6.2.0" + minimatch "^3.0.4" + npmlog "^4.1.2" + p-map "^4.0.0" + p-pipe "^3.1.0" + p-reduce "^2.1.0" + p-waterfall "^2.1.1" + semver "^7.3.4" + slash "^3.0.0" + temp-write "^4.0.0" + write-json-file "^4.3.0" + +"@lerna/write-log-file@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-4.0.0.tgz#18221a38a6a307d6b0a5844dd592ad53fa27091e" + integrity sha512-XRG5BloiArpXRakcnPHmEHJp+4AtnhRtpDIHSghmXD5EichI1uD73J7FgPp30mm2pDRq3FdqB0NbwSEsJ9xFQg== + dependencies: + npmlog "^4.1.2" + write-file-atomic "^3.0.3" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@nomiclabs/hardhat-ethers@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz#c472abcba0c5185aaa4ad4070146e95213c68511" + integrity sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg== + +"@nomiclabs/hardhat-etherscan@^2.1.4": + version "2.1.6" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.6.tgz#8d1502f42adc6f7b8ef16fb917c0b5a8780cb83a" + integrity sha512-gCvT5fj8GbXS9+ACS3BzrX0pzYHHZqAHCb+NcipOkl2cy48FakUXlzrCf4P4sTH+Y7W10OgT62ezD1sJ+/NikQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@ethersproject/address" "^5.0.2" + cbor "^5.0.2" + debug "^4.1.1" + fs-extra "^7.0.1" + node-fetch "^2.6.0" + semver "^6.3.0" + +"@nomiclabs/hardhat-waffle@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.1.tgz#5d43654fba780720c5033dea240fe14f70ef4bd2" + integrity sha512-2YR2V5zTiztSH9n8BYWgtv3Q+EL0N5Ltm1PAr5z20uAY4SkkfylJ98CIqt18XFvxTD5x4K2wKBzddjV9ViDAZQ== + dependencies: + "@types/sinon-chai" "^3.2.3" + "@types/web3" "1.0.19" + +"@npmcli/ci-detect@^1.0.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz#6c1d2c625fb6ef1b9dea85ad0a5afcbef85ef22a" + integrity sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q== + +"@npmcli/fs@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.0.0.tgz#589612cfad3a6ea0feafcb901d29c63fd52db09f" + integrity sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ== + dependencies: + "@gar/promisify" "^1.0.1" + semver "^7.3.5" + +"@npmcli/git@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.1.0.tgz#2fbd77e147530247d37f325930d457b3ebe894f6" + integrity sha512-/hBFX/QG1b+N7PZBFs0bi+evgRZcK9nWBxQKZkGoXUT5hJSwl5c4d7y8/hm+NQZRPhQ67RzFaj5UM9YeyKoryw== + dependencies: + "@npmcli/promise-spawn" "^1.3.2" + lru-cache "^6.0.0" + mkdirp "^1.0.4" + npm-pick-manifest "^6.1.1" + promise-inflight "^1.0.1" + promise-retry "^2.0.1" + semver "^7.3.5" + which "^2.0.2" + +"@npmcli/installed-package-contents@^1.0.6": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz#ab7408c6147911b970a8abe261ce512232a3f4fa" + integrity sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw== + dependencies: + npm-bundled "^1.1.1" + npm-normalize-package-bin "^1.0.1" + +"@npmcli/move-file@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" + integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + +"@npmcli/node-gyp@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.2.tgz#3cdc1f30e9736dbc417373ed803b42b1a0a29ede" + integrity sha512-yrJUe6reVMpktcvagumoqD9r08fH1iRo01gn1u0zoCApa9lnZGEigVKUd2hzsCId4gdtkZZIVscLhNxMECKgRg== + +"@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz#42d4e56a8e9274fba180dabc0aea6e38f29274f5" + integrity sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg== + dependencies: + infer-owner "^1.0.4" + +"@npmcli/run-script@^1.8.2": + version "1.8.6" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-1.8.6.tgz#18314802a6660b0d4baa4c3afe7f1ad39d8c28b7" + integrity sha512-e42bVZnC6VluBZBAFEr3YrdqSspG3bgilyg4nSLBJ7TRGNCzxHa92XAHxQBLYg0BmgwO4b2mf3h/l5EkEWRn3g== + dependencies: + "@npmcli/node-gyp" "^1.0.2" + "@npmcli/promise-spawn" "^1.3.2" + node-gyp "^7.1.0" + read-package-json-fast "^2.0.1" + +"@octokit/auth-token@^2.4.4": + version "2.4.5" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" + integrity sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA== + dependencies: + "@octokit/types" "^6.0.3" + +"@octokit/core@^3.5.1": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b" + integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw== + dependencies: + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.6.0" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.0.3" + before-after-hook "^2.2.0" + universal-user-agent "^6.0.0" + +"@octokit/endpoint@^6.0.1": + version "6.0.12" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" + integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== + dependencies: + "@octokit/types" "^6.0.3" + is-plain-object "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/graphql@^4.5.8": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" + integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== + dependencies: + "@octokit/request" "^5.6.0" + "@octokit/types" "^6.0.3" + universal-user-agent "^6.0.0" + +"@octokit/openapi-types@^10.1.0": + version "10.1.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-10.1.1.tgz#74607482d193e9c9cc7e23ecf04b1bde3eabb6d8" + integrity sha512-ygp/6r25Ezb1CJuVMnFfOsScEtPF0zosdTJDZ7mZ+I8IULl7DP1BS5ZvPRwglcarGPXOvS5sHdR0bjnVDDfQdQ== + +"@octokit/plugin-enterprise-rest@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" + integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== + +"@octokit/plugin-paginate-rest@^2.16.0": + version "2.16.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.0.tgz#09dbda2e5fbca022e3cdf76b63618f7b357c9f0c" + integrity sha512-8YYzALPMvEZ35kgy5pdYvQ22Roz+BIuEaedO575GwE2vb/ACDqQn0xQrTJR4tnZCJn7pi8+AWPVjrFDaERIyXQ== + dependencies: + "@octokit/types" "^6.26.0" + +"@octokit/plugin-request-log@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" + integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== + +"@octokit/plugin-rest-endpoint-methods@^5.9.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.10.0.tgz#8058acf408d518defa2dc59a46777adbcd7ee8e8" + integrity sha512-HiUZliq5wNg15cevJlTo9zDnPXAD0BMRhLxbRNPnq9J3HELKesDTOiou56ax2jC/rECUkK/uJTugrizYKSo/jg== + dependencies: + "@octokit/types" "^6.27.0" + deprecation "^2.3.1" + +"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" + integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== + dependencies: + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.6.0": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.1.tgz#f97aff075c37ab1d427c49082fefeef0dba2d8ce" + integrity sha512-Ls2cfs1OfXaOKzkcxnqw5MR6drMA/zWX/LIS/p8Yjdz7QKTPQLMsB3R+OvoxE6XnXeXEE2X7xe4G4l4X0gRiKQ== + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.16.1" + is-plain-object "^5.0.0" + node-fetch "^2.6.1" + universal-user-agent "^6.0.0" + +"@octokit/rest@^18.1.0": + version "18.10.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.10.0.tgz#8a0add9611253e0e31d3ed5b4bc941a3795a7648" + integrity sha512-esHR5OKy38bccL/sajHqZudZCvmv4yjovMJzyXlphaUo7xykmtOdILGJ3aAm0mFHmMLmPFmDMJXf39cAjNJsrw== + dependencies: + "@octokit/core" "^3.5.1" + "@octokit/plugin-paginate-rest" "^2.16.0" + "@octokit/plugin-request-log" "^1.0.4" + "@octokit/plugin-rest-endpoint-methods" "^5.9.0" + +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.26.0", "@octokit/types@^6.27.0": + version "6.27.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.27.0.tgz#2ffcd4d1cf344285f4151978c6fd36a2edcdf922" + integrity sha512-ha27f8DToxXBPEJdzHCCuqpw7AgKfjhWGdNf3yIlBAhAsaexBXTfWw36zNSsncALXGvJq4EjLy1p3Wz45Aqb4A== + dependencies: + "@octokit/openapi-types" "^10.1.0" + +"@openzeppelin/contracts-upgradeable@3.4.1-solc-0.7-2": + version "3.4.1-solc-0.7-2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.4.1-solc-0.7-2.tgz#8d46f2310560d3756bd5235e20f4e50caa947e92" + integrity sha512-hGbNTTlkcsRhMdJ+IMAWKn5uI1IK9yvJamZpQou1aOjgr+VOFo7eqdiqs+Dwv8fGzN7L/Wdg4XqiW3vGqTHk3g== + +"@openzeppelin/contracts@3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.0.tgz#9a1669ad5f9fdfb6e273bb5a4fed10cb4cc35eb0" + integrity sha512-qh+EiHWzfY/9CORr+eRUkeEUP1WiFUcq3974bLHwyYzLBUtK6HPaMkIUHi74S1rDTZ0sNz42DwPc5A4IJvN3rg== + +"@openzeppelin/contracts@3.4.1-solc-0.7-2": + version "3.4.1-solc-0.7-2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.1-solc-0.7-2.tgz#371c67ebffe50f551c3146a9eec5fe6ffe862e92" + integrity sha512-tAG9LWg8+M2CMu7hIsqHPaTyG4uDzjr6mhvH96LvOpLZZj6tgzTluBt+LsCf1/QaYrlis6pITvpIaIhE+iZB+Q== + +"@resolver-engine/core@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/core/-/core-0.3.3.tgz#590f77d85d45bc7ecc4e06c654f41345db6ca967" + integrity sha512-eB8nEbKDJJBi5p5SrvrvILn4a0h42bKtbCTri3ZxCGt6UvoQyp7HnGOfki944bUjBSHKK3RvgfViHn+kqdXtnQ== + dependencies: + debug "^3.1.0" + is-url "^1.2.4" + request "^2.85.0" + +"@resolver-engine/fs@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/fs/-/fs-0.3.3.tgz#fbf83fa0c4f60154a82c817d2fe3f3b0c049a973" + integrity sha512-wQ9RhPUcny02Wm0IuJwYMyAG8fXVeKdmhm8xizNByD4ryZlx6PP6kRen+t/haF43cMfmaV7T3Cx6ChOdHEhFUQ== + dependencies: + "@resolver-engine/core" "^0.3.3" + debug "^3.1.0" + +"@resolver-engine/imports-fs@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/imports-fs/-/imports-fs-0.3.3.tgz#4085db4b8d3c03feb7a425fbfcf5325c0d1e6c1b" + integrity sha512-7Pjg/ZAZtxpeyCFlZR5zqYkz+Wdo84ugB5LApwriT8XFeQoLwGUj4tZFFvvCuxaNCcqZzCYbonJgmGObYBzyCA== + dependencies: + "@resolver-engine/fs" "^0.3.3" + "@resolver-engine/imports" "^0.3.3" + debug "^3.1.0" + +"@resolver-engine/imports@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@resolver-engine/imports/-/imports-0.3.3.tgz#badfb513bb3ff3c1ee9fd56073e3144245588bcc" + integrity sha512-anHpS4wN4sRMwsAbMXhMfOD/y4a4Oo0Cw/5+rue7hSwGWsDOQaAU1ClK1OxjUC35/peazxEl8JaSRRS+Xb8t3Q== + dependencies: + "@resolver-engine/core" "^0.3.3" + debug "^3.1.0" + hosted-git-info "^2.6.0" + path-browserify "^1.0.0" + url "^0.11.0" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + +"@sinonjs/commons@^1.7.0": + version "1.8.3" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^7.1.0": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5" + integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg== + dependencies: + "@sinonjs/commons" "^1.7.0" + +"@solidity-parser/parser@^0.11.0": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.11.1.tgz#fa840af64840c930f24a9c82c08d4a092a068add" + integrity sha512-H8BSBoKE8EubJa0ONqecA2TviT3TnHeC4NpgnAHSUiuhZoQBfPB4L2P9bs8R6AoTW10Endvh3vc+fomVMIDIYQ== + +"@solidity-parser/parser@^0.12.0": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.12.2.tgz#1afad367cb29a2ed8cdd4a3a62701c2821fb578f" + integrity sha512-d7VS7PxgMosm5NyaiyDJRNID5pK4AWj1l64Dbz0147hJgy5k2C0/ZiKK/9u5c5K+HRUVHmp+RMvGEjGh84oA5Q== + +"@solidity-parser/parser@^0.13.2": + version "0.13.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.13.2.tgz#b6c71d8ca0b382d90a7bbed241f9bc110af65cbe" + integrity sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw== + dependencies: + antlr4ts "^0.5.0-alpha.4" + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + +"@trivago/prettier-plugin-sort-imports@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-2.0.4.tgz#2e5bbf80bd87e919202f791008a2fbcdbb2a566f" + integrity sha512-SCVUhQdbjn/Z4AY7b9JO00fZCeXxiVuarVxYP0n6cX2ijiQkE5HmGrOk32n0u385OebzQ9bZcrc51lAGLjXnFQ== + dependencies: + "@babel/core" "7.13.10" + "@babel/generator" "7.13.9" + "@babel/parser" "7.13.10" + "@babel/traverse" "7.13.0" + "@babel/types" "7.13.0" + "@types/lodash" "4.14.168" + javascript-natural-sort "0.7.1" + lodash "4.17.21" + +"@truffle/error@^0.0.14": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.0.14.tgz#59683b5407bede7bddf16d80dc5592f9c5e5fa05" + integrity sha512-utJx+SZYoMqk8wldQG4gCVKhV8GwMJbWY7sLXFT/D8wWZTnE2peX7URFJh/cxkjTRCO328z1s2qewkhyVsu2HA== + +"@truffle/interface-adapter@^0.5.5": + version "0.5.5" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.5.tgz#b82911476406b99e4fa9927f77363dc42dfc585c" + integrity sha512-vEutNkWDJWRMVFsyrMD1yZAHY7ZcQhzep7UHiqf6VE4K2Jgl07gK6CG3xco6C2YYBy+7R5Wt0vCTmbVFlPRi7A== + dependencies: + bn.js "^5.1.3" + ethers "^4.0.32" + web3 "1.5.2" + +"@truffle/provider@^0.2.24": + version "0.2.39" + resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.39.tgz#5a544e734fa5c41c28cacae88e139ed13d5c9ead" + integrity sha512-svL1u/BtPyteZbYnngxVBvYHkesTRLFYXdklDJT2S+X4jy8dmHRZIUdM6SL4SOrDPICiEnnp1fczsVWEqrEdig== + dependencies: + "@truffle/error" "^0.0.14" + "@truffle/interface-adapter" "^0.5.5" + web3 "1.5.2" + +"@tsconfig/node10@^1.0.7": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" + integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== + +"@tsconfig/node12@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" + integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== + +"@tsconfig/node14@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" + integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== + +"@tsconfig/node16@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" + integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== + +"@typechain/ethers-v5@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz#cd3ca1590240d587ca301f4c029b67bfccd08810" + integrity sha512-0xdCkyGOzdqh4h5JSf+zoWx85IusEjDcPIwNEHP8mrWSnCae4rvrqB+/gtpdNfX7zjlFlZiMeePn2r63EI3Lrw== + dependencies: + ethers "^5.0.2" + +"@typechain/ethers-v5@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-7.0.1.tgz#f9ae60ae5bd9e8ea8a996f66244147e8e74034ae" + integrity sha512-mXEJ7LG0pOYO+MRPkHtbf30Ey9X2KAsU0wkeoVvjQIn7iAY6tB3k3s+82bbmJAUMyENbQ04RDOZit36CgSG6Gg== + +"@typechain/hardhat@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-2.3.0.tgz#dc7f29281637b38b77c7c046ae82700703395d0f" + integrity sha512-zERrtNol86L4DX60ktnXxP7Cq8rSZHPaQvsChyiQQVuvVs2FTLm24Yi+MYnfsIdbUBIXZG7SxDWhtCF5I0tJNQ== + dependencies: + fs-extra "^9.1.0" + +"@types/abstract-leveldown@*": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-5.0.2.tgz#ee81917fe38f770e29eec8139b6f16ee4a8b0a5f" + integrity sha512-+jA1XXF3jsz+Z7FcuiNqgK53hTa/luglT2TyTpKPqoYbxVY+mCPF22Rm+q3KPBrMHJwNXFrTViHszBOfU4vftQ== + +"@types/bn.js@*", "@types/bn.js@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" + integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== + dependencies: + "@types/node" "*" + +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/chai@*", "@types/chai@^4.2.21": + version "4.2.21" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.21.tgz#9f35a5643129df132cf3b5c1ec64046ea1af0650" + integrity sha512-yd+9qKmJxm496BOV9CMNaey8TWsikaZOwMRwPHQIjcOJM9oV+fi9ZMNw3JsVnbEEbo2gRTDnGEBv8pjyn67hNg== + +"@types/concat-stream@^1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" + integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== + dependencies: + "@types/node" "*" + +"@types/form-data@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" + integrity sha1-yayFsqX9GENbjIXZ7LUObWyJP/g= + dependencies: + "@types/node" "*" + +"@types/fs-extra@^9.0.12": + version "9.0.12" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.12.tgz#9b8f27973df8a7a3920e8461517ebf8a7d4fdfaf" + integrity sha512-I+bsBr67CurCGnSenZZ7v94gd3tc3+Aj2taxMT4yu4ABLuOgOjeFxX3dokG24ztSRg5tnT00sL8BszO7gSMoIw== + dependencies: + "@types/node" "*" + +"@types/glob@^7.1.1": + version "7.1.4" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" + integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/json-schema@^7.0.7": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + +"@types/level-errors@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/level-errors/-/level-errors-3.0.0.tgz#15c1f4915a5ef763b51651b15e90f6dc081b96a8" + integrity sha512-/lMtoq/Cf/2DVOm6zE6ORyOM+3ZVm/BvzEZVxUhf6bgh8ZHglXlBqxbxSlJeVp8FCbD3IVvk/VbsaNmDjrQvqQ== + +"@types/levelup@^4.3.0": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@types/levelup/-/levelup-4.3.3.tgz#4dc2b77db079b1cf855562ad52321aa4241b8ef4" + integrity sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA== + dependencies: + "@types/abstract-leveldown" "*" + "@types/level-errors" "*" + "@types/node" "*" + +"@types/lodash@4.14.168": + version "4.14.168" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.168.tgz#fe24632e79b7ade3f132891afff86caa5e5ce008" + integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q== + +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + +"@types/minimatch@*", "@types/minimatch@^3.0.3": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" + integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== + +"@types/minimist@^1.2.0": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" + integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== + +"@types/mkdirp@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" + integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== + dependencies: + "@types/node" "*" + +"@types/mocha@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.0.0.tgz#3205bcd15ada9bc681ac20bef64e9e6df88fd297" + integrity sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA== + +"@types/node-fetch@^2.5.5": + version "2.5.12" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" + integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*", "@types/node@^16.4.13": + version "16.7.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.7.13.tgz#86fae356b03b5a12f2506c6cf6cd9287b205973f" + integrity sha512-pLUPDn+YG3FYEt/pHI74HmnJOWzeR+tOIQzUx93pi9M7D8OE7PSLr97HboXwk5F+JS+TLtWuzCOW97AHjmOXXA== + +"@types/node@^10.0.3": + version "10.17.60" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" + integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== + +"@types/node@^12.12.6": + version "12.20.24" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c" + integrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ== + +"@types/node@^8.0.0": + version "8.10.66" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" + integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== + +"@types/normalize-package-data@^2.4.0": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== + +"@types/parse-json@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" + integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/prettier@^2.1.1": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3" + integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== + +"@types/qs@^6.2.31", "@types/qs@^6.9.4": + version "6.9.7" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/resolve@^0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + +"@types/secp256k1@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" + integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + dependencies: + "@types/node" "*" + +"@types/sinon-chai@^3.2.3": + version "3.2.5" + resolved "https://registry.yarnpkg.com/@types/sinon-chai/-/sinon-chai-3.2.5.tgz#df21ae57b10757da0b26f512145c065f2ad45c48" + integrity sha512-bKQqIpew7mmIGNRlxW6Zli/QVyc3zikpGzCa797B/tRnD9OtHvZ/ts8sYXV+Ilj9u3QRaUEM8xrjgd1gwm1BpQ== + dependencies: + "@types/chai" "*" + "@types/sinon" "*" + +"@types/sinon@*": + version "10.0.2" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.2.tgz#f360d2f189c0fd433d14aeb97b9d705d7e4cc0e4" + integrity sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw== + dependencies: + "@sinonjs/fake-timers" "^7.1.0" + +"@types/underscore@*": + version "1.11.3" + resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.11.3.tgz#d6734f3741ce41b2630018c6b61c6745f6188c07" + integrity sha512-Fl1TX1dapfXyDqFg2ic9M+vlXRktcPJrc4PR7sRc7sdVrjavg/JHlbUXBt8qWWqhJrmSqg3RNAkAPRiOYw6Ahw== + +"@types/web3@1.0.19": + version "1.0.19" + resolved "https://registry.yarnpkg.com/@types/web3/-/web3-1.0.19.tgz#46b85d91d398ded9ab7c85a5dd57cb33ac558924" + integrity sha512-fhZ9DyvDYDwHZUp5/STa9XW2re0E8GxoioYJ4pEUZ13YHpApSagixj7IAdoYH5uAK+UalGq6Ml8LYzmgRA/q+A== + dependencies: + "@types/bn.js" "*" + "@types/underscore" "*" + +"@typescript-eslint/eslint-plugin@^4.29.2": + version "4.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.0.tgz#9c3fa6f44bad789a962426ad951b54695bd3af6b" + integrity sha512-iPKZTZNavAlOhfF4gymiSuUkgLne/nh5Oz2/mdiUmuZVD42m9PapnCnzjxuDsnpnbH3wT5s2D8bw6S39TC6GNw== + dependencies: + "@typescript-eslint/experimental-utils" "4.31.0" + "@typescript-eslint/scope-manager" "4.31.0" + debug "^4.3.1" + functional-red-black-tree "^1.0.1" + regexpp "^3.1.0" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/experimental-utils@4.31.0": + version "4.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.0.tgz#0ef1d5d86c334f983a00f310e43c1ce4c14e054d" + integrity sha512-Hld+EQiKLMppgKKkdUsLeVIeEOrwKc2G983NmznY/r5/ZtZCDvIOXnXtwqJIgYz/ymsy7n7RGvMyrzf1WaSQrw== + dependencies: + "@types/json-schema" "^7.0.7" + "@typescript-eslint/scope-manager" "4.31.0" + "@typescript-eslint/types" "4.31.0" + "@typescript-eslint/typescript-estree" "4.31.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/parser@^4.29.2": + version "4.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.31.0.tgz#87b7cd16b24b9170c77595d8b1363f8047121e05" + integrity sha512-oWbzvPh5amMuTmKaf1wp0ySxPt2ZXHnFQBN2Szu1O//7LmOvgaKTCIDNLK2NvzpmVd5A2M/1j/rujBqO37hj3w== + dependencies: + "@typescript-eslint/scope-manager" "4.31.0" + "@typescript-eslint/types" "4.31.0" + "@typescript-eslint/typescript-estree" "4.31.0" + debug "^4.3.1" + +"@typescript-eslint/scope-manager@4.31.0": + version "4.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.31.0.tgz#9be33aed4e9901db753803ba233b70d79a87fc3e" + integrity sha512-LJ+xtl34W76JMRLjbaQorhR0hfRAlp3Lscdiz9NeI/8i+q0hdBZ7BsiYieLoYWqy+AnRigaD3hUwPFugSzdocg== + dependencies: + "@typescript-eslint/types" "4.31.0" + "@typescript-eslint/visitor-keys" "4.31.0" + +"@typescript-eslint/types@4.31.0": + version "4.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.31.0.tgz#9a7c86fcc1620189567dc4e46cad7efa07ee8dce" + integrity sha512-9XR5q9mk7DCXgXLS7REIVs+BaAswfdHhx91XqlJklmqWpTALGjygWVIb/UnLh4NWhfwhR5wNe1yTyCInxVhLqQ== + +"@typescript-eslint/typescript-estree@4.31.0": + version "4.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.0.tgz#4da4cb6274a7ef3b21d53f9e7147cc76f278a078" + integrity sha512-QHl2014t3ptg+xpmOSSPn5hm4mY8D4s97ftzyk9BZ8RxYQ3j73XcwuijnJ9cMa6DO4aLXeo8XS3z1omT9LA/Eg== + dependencies: + "@typescript-eslint/types" "4.31.0" + "@typescript-eslint/visitor-keys" "4.31.0" + debug "^4.3.1" + globby "^11.0.3" + is-glob "^4.0.1" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/visitor-keys@4.31.0": + version "4.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.0.tgz#4e87b7761cb4e0e627dc2047021aa693fc76ea2b" + integrity sha512-HUcRp2a9I+P21+O21yu3ezv3GEPGjyGiXoEUQwZXjR8UxRApGeLyWH4ZIIUSalE28aG4YsV6GjtaAVB3QKOu0w== + dependencies: + "@typescript-eslint/types" "4.31.0" + eslint-visitor-keys "^2.0.0" + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + +JSONStream@^1.0.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abstract-leveldown@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz#5cb89f958a44f526779d740d1440e743e0c30a57" + integrity sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@^2.4.1, abstract-leveldown@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" + integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@^5.0.0, abstract-leveldown@~5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz#f7128e1f86ccabf7d2893077ce5d06d798e386c6" + integrity sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@^6.2.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" + integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +abstract-leveldown@~2.6.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" + integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@~6.2.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz#036543d87e3710f2528e47040bc3261b77a9a8eb" + integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-jsx@^5.0.0, acorn-jsx@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^6.0.7: + version "6.4.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== + +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +acorn@^8.4.1: + version "8.5.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" + integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== + +add-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" + integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= + +address@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== + +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + +aes-js@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== + +agent-base@6, agent-base@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +agentkeepalive@^4.1.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.4.tgz#d928028a4862cb11718e55227872e842a44c945b" + integrity sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ== + dependencies: + debug "^4.1.0" + depd "^1.1.2" + humanize-ms "^1.2.1" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.6.1, ajv@^6.9.1: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.6.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.2.tgz#2fb45e0e5fcbc0813326c1c3da535d1881bb0571" + integrity sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= + +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + +ansi-colors@4.1.1, ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +antlr4@4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" + integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== + +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + +anymatch@~3.1.1, anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +aproba@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + +are-we-there-yet@~1.1.2: + version "1.1.7" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" + integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-back@^1.0.3, array-back@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= + dependencies: + typical "^2.6.0" + +array-back@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" + integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== + dependencies: + typical "^2.6.1" + +array-differ@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" + integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-ify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= + +array-includes@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" + integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + get-intrinsic "^1.1.1" + is-string "^1.0.5" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +array.prototype.flat@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" + integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +arrify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + +asap@^2.0.0, asap@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + +asn1.js@^5.2.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +ast-parents@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + integrity sha1-UI/Q8F0MSHddnszaLhdEIyYejdM= + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async-eventemitter@^0.2.2, async-eventemitter@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async@1.x, async@^1.4.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + +async@2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" + integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== + dependencies: + lodash "^4.17.11" + +async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +author-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/author-regex/-/author-regex-1.0.0.tgz#d08885be6b9bbf9439fe087c76287245f0a81450" + integrity sha1-0IiFvmubv5Q5/gh8dihyRfCoFFA= + +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.14, babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" + slash "^1.0.0" + source-map "^0.5.7" + +babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= + +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" + integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-preset-env@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" + integrity sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg== + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^3.2.6" + invariant "^2.2.2" + semver "^5.3.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babelify@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" + integrity sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU= + dependencies: + babel-core "^6.0.14" + object-assign "^4.0.0" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + +backoff@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" + integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= + dependencies: + precond "0.2" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2, base-x@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +bech32@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +before-after-hook@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" + integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ== + +bignumber.js@^9.0.0, bignumber.js@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +bindings@^1.4.0, bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bip39@2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235" + integrity sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA== + dependencies: + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + safe-buffer "^5.0.1" + unorm "^1.3.3" + +bip66@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= + dependencies: + safe-buffer "^5.0.1" + +bl@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +blakejs@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.1.tgz#bf313053978b2cd4c444a48795710be05c785702" + integrity sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg== + +bluebird@^3.5.0, bluebird@^3.5.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.8.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + +body-parser@1.19.0, body-parser@^1.16.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6, browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + dependencies: + bn.js "^5.0.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" + integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.3" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +browserslist@^3.2.6: + version "3.2.8" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" + integrity sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ== + dependencies: + caniuse-lite "^1.0.30000844" + electron-to-chromium "^1.3.47" + +browserslist@^4.16.6: + version "4.17.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.0.tgz#1fcd81ec75b41d6d4994fb0831b92ac18c01649c" + integrity sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g== + dependencies: + caniuse-lite "^1.0.30001254" + colorette "^1.3.0" + electron-to-chromium "^1.3.830" + escalade "^3.1.1" + node-releases "^1.1.75" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" + integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer-xor@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289" + integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ== + dependencies: + safe-buffer "^5.1.1" + +buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bufferutil@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz#66724b756bed23cd7c28c4d306d7994f9943cc6b" + integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== + dependencies: + node-gyp-build "^4.2.0" + +builtins@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" + integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= + +byline@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= + +byte-size@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-7.0.1.tgz#b1daf3386de7ab9d706b941a748dbfc71130dee3" + integrity sha512-crQdqyCwhokxwV1UyDzLZanhkugAgft7vt0qbbdt60C6Zf3CAiGmtUCylbtYwrU6loOUw3euGrNtW1J651ot1A== + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +bytewise-core@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/bytewise-core/-/bytewise-core-1.2.3.tgz#3fb410c7e91558eb1ab22a82834577aa6bd61d42" + integrity sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI= + dependencies: + typewise-core "^1.2" + +bytewise@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/bytewise/-/bytewise-1.1.0.tgz#1d13cbff717ae7158094aa881b35d081b387253e" + integrity sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4= + dependencies: + bytewise-core "^1.2.2" + typewise "^1.0.3" + +cacache@^15.0.5, cacache@^15.2.0: + version "15.3.0" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" + integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== + dependencies: + "@npmcli/fs" "^1.0.0" + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" + fs-minipass "^2.0.0" + glob "^7.1.4" + infer-owner "^1.0.4" + lru-cache "^6.0.0" + minipass "^3.1.1" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" + mkdirp "^1.0.3" + p-map "^4.0.0" + promise-inflight "^1.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.0.2" + unique-filename "^1.1.1" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + +cachedown@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cachedown/-/cachedown-1.0.0.tgz#d43f036e4510696b31246d7db31ebf0f7ac32d15" + integrity sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU= + dependencies: + abstract-leveldown "^2.4.1" + lru-cache "^3.2.0" + +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase-keys@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" + integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== + dependencies: + camelcase "^5.3.1" + map-obj "^4.0.0" + quick-lru "^4.0.1" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + +caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001254: + version "1.0.30001255" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001255.tgz#f3b09b59ab52e39e751a569523618f47c4298ca0" + integrity sha512-F+A3N9jTZL882f/fg/WWVnKSu6IOo3ueLz4zwaOPbPYHNmM/ZaDUyzyJwS1mZhX7Ex5jqTyW599Gdelh5PDYLQ== + +caseless@^0.12.0, caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +cbor@^5.0.2: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + +chai-arrays@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/chai-arrays/-/chai-arrays-2.2.0.tgz#571479cbc5eca81605ed4eed1e8a2a28552d2a25" + integrity sha512-4awrdGI2EH8owJ9I58PXwG4N56/FiM8bsn4CVSNEgr4GKAM6Kq5JPVApUbhUBjDakbZNuRvV7quRSC38PWq/tg== + +chai@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" + integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + pathval "^1.1.1" + type-detect "^4.0.5" + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +"charenc@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc= + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + +checkpoint-store@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" + integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= + dependencies: + functional-red-black-tree "^1.0.1" + +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +chokidar@3.5.2, chokidar@^3.4.0: + version "3.5.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chownr@^1.1.1, chownr@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cids@^0.7.1: + version "0.7.5" + resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-table3@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== + dependencies: + object-assign "^4.1.0" + string-width "^2.1.1" + optionalDependencies: + colors "^1.1.2" + +cli-table3@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.0.tgz#b7b1bc65ca8e7b5cef9124e13dc2b21e2ce4faee" + integrity sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ== + dependencies: + object-assign "^4.1.0" + string-width "^4.2.0" + optionalDependencies: + colors "^1.1.2" + +cli-width@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +clone@2.1.2, clone@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +cmd-shim@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-4.1.0.tgz#b3a904a6743e9fede4148c6f3800bf2a08135bdd" + integrity sha512-lb9L7EM4I/ZRVuljLPEtUJOP+xiQVknZ4ZMpMgEp4JzNldPb27HU03hi6K1/6CoIuit/Zm/LQXySErFeXxDprw== + dependencies: + mkdirp-infer-owner "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" + integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== + +colors@^1.1.2, colors@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +columnify@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" + integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= + dependencies: + strip-ansi "^3.0.0" + wcwidth "^1.0.0" + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + +command-line-args@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" + integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== + dependencies: + array-back "^2.0.0" + find-replace "^1.0.3" + typical "^2.6.1" + +commander@2.18.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== + +commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +commander@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + +compare-func@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" + integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA== + dependencies: + array-ify "^1.0.0" + dot-prop "^5.1.0" + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.1, concat-stream@^1.6.0, concat-stream@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +concat-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" + integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.0.2" + typedarray "^0.0.6" + +config-chain@^1.1.12: + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-hash@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +conventional-changelog-angular@^5.0.12: + version "5.0.12" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" + integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== + dependencies: + compare-func "^2.0.0" + q "^1.5.1" + +conventional-changelog-core@^4.2.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.3.tgz#ce44d4bbba4032e3dc14c00fcd5b53fc00b66433" + integrity sha512-MwnZjIoMRL3jtPH5GywVNqetGILC7g6RQFvdb8LRU/fA/338JbeWAku3PZ8yQ+mtVRViiISqJlb0sOz0htBZig== + dependencies: + add-stream "^1.0.0" + conventional-changelog-writer "^5.0.0" + conventional-commits-parser "^3.2.0" + dateformat "^3.0.0" + get-pkg-repo "^4.0.0" + git-raw-commits "^2.0.8" + git-remote-origin-url "^2.0.0" + git-semver-tags "^4.1.1" + lodash "^4.17.15" + normalize-package-data "^3.0.0" + q "^1.5.1" + read-pkg "^3.0.0" + read-pkg-up "^3.0.0" + through2 "^4.0.0" + +conventional-changelog-preset-loader@^2.3.4: + version "2.3.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" + integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== + +conventional-changelog-writer@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-5.0.0.tgz#c4042f3f1542f2f41d7d2e0d6cad23aba8df8eec" + integrity sha512-HnDh9QHLNWfL6E1uHz6krZEQOgm8hN7z/m7tT16xwd802fwgMN0Wqd7AQYVkhpsjDUx/99oo+nGgvKF657XP5g== + dependencies: + conventional-commits-filter "^2.0.7" + dateformat "^3.0.0" + handlebars "^4.7.6" + json-stringify-safe "^5.0.1" + lodash "^4.17.15" + meow "^8.0.0" + semver "^6.0.0" + split "^1.0.0" + through2 "^4.0.0" + +conventional-commits-filter@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" + integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== + dependencies: + lodash.ismatch "^4.4.0" + modify-values "^1.0.0" + +conventional-commits-parser@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz#ba44f0b3b6588da2ee9fd8da508ebff50d116ce2" + integrity sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA== + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.1" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" + trim-off-newlines "^1.0.0" + +conventional-recommended-bump@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz#cfa623285d1de554012f2ffde70d9c8a22231f55" + integrity sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw== + dependencies: + concat-stream "^2.0.0" + conventional-changelog-preset-loader "^2.3.4" + conventional-commits-filter "^2.0.7" + conventional-commits-parser "^3.2.0" + git-raw-commits "^2.0.8" + git-semver-tags "^4.1.1" + meow "^8.0.0" + q "^1.5.1" + +convert-source-map@^1.5.1, convert-source-map@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +cookie@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + +cookiejar@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" + integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js-pure@^3.0.1: + version "3.17.2" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.17.2.tgz#ba6311b6aa1e2f2adeba4ac6ec51a9ff40bdc1af" + integrity sha512-2VV7DlIbooyTI7Bh+yzOOWL9tGwLnQKHno7qATE+fqZzDKYr6llVjVQOzpD/QLZFgXDPb8T71pJokHEZHEYJhQ== + +core-js@^2.4.0, core-js@^2.5.0: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cors@^2.8.1: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cosmiconfig@^5.0.7: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + +cosmiconfig@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" + integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + +crc-32@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208" + integrity sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA== + dependencies: + exit-on-epipe "~1.0.1" + printj "~1.1.0" + +create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-fetch@^2.1.0, cross-fetch@^2.1.1: + version "2.2.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.5.tgz#afaf5729f3b6c78d89c9296115c9f142541a5705" + integrity sha512-xqYAhQb4NhCJSRym03dwxpP1bYXpK3y7UN83Bo2WFi3x1Zmzn0SL/6xGoPr+gpt4WmNrgCCX3HPysvOwFOW36w== + dependencies: + node-fetch "2.6.1" + whatwg-fetch "2.0.4" + +cross-spawn@^6.0.0, cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.2, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +"crypt@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= + +crypto-browserify@3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +dargs@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" + integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +dateformat@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" + integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== + +death@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" + integrity sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg= + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + dependencies: + ms "2.1.2" + +debug@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +debug@^3.1.0, debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debuglog@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" + integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= + +decamelize-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= + dependencies: + decamelize "^1.1.0" + map-obj "^1.0.0" + +decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +decimal.js@10.3.1: + version "10.3.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" + integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +decompress-response@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== + dependencies: + mimic-response "^2.0.0" + +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= + +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + +deep-equal@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@^0.1.3, deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + +deferred-leveldown@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" + integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== + dependencies: + abstract-leveldown "~2.6.0" + +deferred-leveldown@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz#0b0570087827bf480a23494b398f04c128c19a20" + integrity sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww== + dependencies: + abstract-leveldown "~5.0.0" + inherits "^2.0.3" + +deferred-leveldown@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" + integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== + dependencies: + abstract-leveldown "~6.2.1" + inherits "^2.0.3" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +defined@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@^1.1.2, depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= + +detect-indent@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" + integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== + +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +detect-port@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.3.0.tgz#d9c40e9accadd4df5cac6a782aefd014d573d1f1" + integrity sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ== + dependencies: + address "^1.0.1" + debug "^2.6.0" + +dezalgo@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" + integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= + dependencies: + asap "^2.0.0" + wrappy "1" + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + +dot-prop@^5.1.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== + dependencies: + is-obj "^2.0.0" + +dot-prop@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" + integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== + dependencies: + is-obj "^2.0.0" + +dotignore@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" + integrity sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw== + dependencies: + minimatch "^3.0.4" + +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +duplexer@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.3.47, electron-to-chromium@^1.3.830: + version "1.3.832" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.832.tgz#b947205525a7825eff9b39566140d5471241c244" + integrity sha512-x7lO8tGoW0CyV53qON4Lb5Rok9ipDelNdBIAiYUZ03dqy4u9vohMM1qV047+s/hiyJiqUWX/3PNwkX3kexX5ig== + +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +encode-utf8@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +encoding-down@5.0.4, encoding-down@~5.0.0: + version "5.0.4" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-5.0.4.tgz#1e477da8e9e9d0f7c8293d320044f8b2cd8e9614" + integrity sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw== + dependencies: + abstract-leveldown "^5.0.0" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + xtend "^4.0.1" + +encoding-down@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" + integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== + dependencies: + abstract-leveldown "^6.2.1" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + +encoding@^0.1.11, encoding@^0.1.12: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + +end-of-stream@^1.1.0, end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enquirer@^2.3.0, enquirer@^2.3.5, enquirer@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +envinfo@^7.7.4: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + +errno@~0.1.1: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0, error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2, es-abstract@^1.18.5: + version "1.18.6" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.6.tgz#2c44e3ea7a6255039164d26559777a6d978cb456" + integrity sha512-kAeIT4cku5eNLNuUKhlmtuk1/TRZvQoYccn6TO0cSVdf1kzB0T7+dYuVK9MWM7l+/53W2Q8M7N2c6MQvhXFcUQ== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.1" + is-regex "^1.1.4" + is-string "^1.0.7" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +eslint-config-prettier@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" + integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== + +eslint-config-standard@^16.0.2: + version "16.0.3" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516" + integrity sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg== + +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + +eslint-module-utils@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534" + integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q== + dependencies: + debug "^3.2.7" + pkg-dir "^2.0.0" + +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.23.2: + version "2.24.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz#2c8cd2e341f3885918ee27d18479910ade7bb4da" + integrity sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q== + dependencies: + array-includes "^3.1.3" + array.prototype.flat "^1.2.4" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.6.2" + find-up "^2.0.0" + has "^1.0.3" + is-core-module "^2.6.0" + minimatch "^3.0.4" + object.values "^1.1.4" + pkg-up "^2.0.0" + read-pkg-up "^3.0.0" + resolve "^1.20.0" + tsconfig-paths "^3.11.0" + +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-5.1.0.tgz#fb2188fb734e4557993733b41aa1a688f46c6f24" + integrity sha512-NGmI6BH5L12pl7ScQHbg7tvtk4wPxxj8yPHH47NvSmMtFneC077PSeY3huFj06ZWZvtbfxSPt3RuOQD5XcR4ng== + +eslint-plugin-standard@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-5.0.0.tgz#c43f6925d669f177db46f095ea30be95476b1ee4" + integrity sha512-eSIXPc9wBM4BrniMzJRBm2uoVuXz2EPa+NXPk2+itrVt+r5SbKFERx/IgrK/HmfjddyKVz2f+j+7gBRvu19xLg== + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-utils@^2.0.0, eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint@^5.6.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.2.2" + js-yaml "^3.13.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.11" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" + +eslint@^7.26.0, eslint@^7.32.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + +esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.0.1, esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0, esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +eth-block-tracker@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz#95cd5e763c7293e0b1b2790a2a39ac2ac188a5e1" + integrity sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug== + dependencies: + eth-query "^2.1.0" + ethereumjs-tx "^1.3.3" + ethereumjs-util "^5.1.3" + ethjs-util "^0.1.3" + json-rpc-engine "^3.6.0" + pify "^2.3.0" + tape "^4.6.3" + +eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" + integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + +eth-gas-reporter@^0.2.20: + version "0.2.22" + resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.22.tgz#bbe91f5d7b22433d26f099eeb5b20118ced0e575" + integrity sha512-L1FlC792aTf3j/j+gGzSNlGrXKSxNPXQNk6TnV5NNZ2w3jnQCRyJjDl0zUo25Cq2t90IS5vGdbkwqFQK7Ce+kw== + dependencies: + "@ethersproject/abi" "^5.0.0-beta.146" + "@solidity-parser/parser" "^0.12.0" + cli-table3 "^0.5.0" + colors "^1.1.2" + ethereumjs-util "6.2.0" + ethers "^4.0.40" + fs-readdir-recursive "^1.1.0" + lodash "^4.17.14" + markdown-table "^1.1.3" + mocha "^7.1.1" + req-cwd "^2.0.0" + request "^2.88.0" + request-promise-native "^1.0.5" + sha1 "^1.1.1" + sync-request "^6.0.0" + +eth-json-rpc-infura@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz#26702a821067862b72d979c016fd611502c6057f" + integrity sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw== + dependencies: + cross-fetch "^2.1.1" + eth-json-rpc-middleware "^1.5.0" + json-rpc-engine "^3.4.0" + json-rpc-error "^2.0.0" + +eth-json-rpc-middleware@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz#5c9d4c28f745ccb01630f0300ba945f4bef9593f" + integrity sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q== + dependencies: + async "^2.5.0" + eth-query "^2.1.2" + eth-tx-summary "^3.1.2" + ethereumjs-block "^1.6.0" + ethereumjs-tx "^1.3.3" + ethereumjs-util "^5.1.2" + ethereumjs-vm "^2.1.0" + fetch-ponyfill "^4.0.0" + json-rpc-engine "^3.6.0" + json-rpc-error "^2.0.0" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + tape "^4.6.3" + +eth-lib@0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + +eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" + integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= + dependencies: + json-rpc-random-id "^1.0.0" + xtend "^4.0.1" + +eth-sig-util@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.0.tgz#75133b3d7c20a5731af0690c385e184ab942b97e" + integrity sha512-4eFkMOhpGbTxBQ3AMzVf0haUX2uTur7DpWiHzWyTURa28BVJJtOkcb9Ok5TV0YvEPG61DODPW7ZUATbJTslioQ== + dependencies: + buffer "^5.2.1" + elliptic "^6.4.0" + ethereumjs-abi "0.6.5" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.0" + tweetnacl-util "^0.15.0" + +eth-sig-util@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" + integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= + dependencies: + ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" + ethereumjs-util "^5.1.1" + +eth-sig-util@^2.5.2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.5.4.tgz#577b01fe491b6bf59b0464be09633e20c1677bc5" + integrity sha512-aCMBwp8q/4wrW4QLsF/HYBOSA7TpLKmkVwP3pYQNkEEseW2Rr8Z5Uxc9/h6HX+OG3tuHo+2bINVSihIeBfym6A== + dependencies: + ethereumjs-abi "0.6.8" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.0" + +eth-sig-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.1.tgz#8753297c83a3f58346bd13547b59c4b2cd110c96" + integrity sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.0" + +eth-tx-summary@^3.1.2: + version "3.2.4" + resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" + integrity sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg== + dependencies: + async "^2.1.2" + clone "^2.0.0" + concat-stream "^1.5.1" + end-of-stream "^1.1.0" + eth-query "^2.0.2" + ethereumjs-block "^1.4.1" + ethereumjs-tx "^1.1.1" + ethereumjs-util "^5.0.1" + ethereumjs-vm "^2.6.0" + through2 "^2.0.3" + +ethashjs@~0.0.7: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ethashjs/-/ethashjs-0.0.8.tgz#227442f1bdee409a548fb04136e24c874f3aa6f9" + integrity sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw== + dependencies: + async "^2.1.2" + buffer-xor "^2.0.1" + ethereumjs-util "^7.0.2" + miller-rabin "^4.0.0" + +ethereum-bloom-filters@^1.0.6: + version "1.0.10" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" + integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== + dependencies: + js-sha3 "^0.8.0" + +ethereum-common@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" + integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== + +ethereum-common@^0.0.18: + version "0.0.18" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" + integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= + +ethereum-cryptography@^0.1.2, ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereum-waffle@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-3.4.0.tgz#990b3c6c26db9c2dd943bf26750a496f60c04720" + integrity sha512-ADBqZCkoSA5Isk486ntKJVjFEawIiC+3HxNqpJqONvh3YXBTNiRfXvJtGuAFLXPG91QaqkGqILEHANAo7j/olQ== + dependencies: + "@ethereum-waffle/chai" "^3.4.0" + "@ethereum-waffle/compiler" "^3.4.0" + "@ethereum-waffle/mock-contract" "^3.3.0" + "@ethereum-waffle/provider" "^3.4.0" + ethers "^5.0.1" + +ethereumjs-abi@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" + integrity sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE= + dependencies: + bn.js "^4.10.0" + ethereumjs-util "^4.3.0" + +ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": + version "0.6.8" + resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-account@3.0.0, ethereumjs-account@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz#728f060c8e0c6e87f1e987f751d3da25422570a9" + integrity sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA== + dependencies: + ethereumjs-util "^6.0.0" + rlp "^2.2.1" + safe-buffer "^5.1.1" + +ethereumjs-account@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" + integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== + dependencies: + ethereumjs-util "^5.0.0" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-block@2.2.2, ethereumjs-block@^2.2.2, ethereumjs-block@~2.2.0, ethereumjs-block@~2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" + integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== + dependencies: + async "^2.0.1" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.1" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" + integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== + dependencies: + async "^2.0.1" + ethereum-common "0.2.0" + ethereumjs-tx "^1.2.2" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-blockchain@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz#30f2228dc35f6dcf94423692a6902604ae34960f" + integrity sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ== + dependencies: + async "^2.6.1" + ethashjs "~0.0.7" + ethereumjs-block "~2.2.2" + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.1.0" + flow-stoplight "^1.0.0" + level-mem "^3.0.1" + lru-cache "^5.1.1" + rlp "^2.2.2" + semaphore "^1.1.0" + +ethereumjs-common@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz#d3e82fc7c47c0cef95047f431a99485abc9bb1cd" + integrity sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ== + +ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" + integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== + +ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== + dependencies: + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" + +ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3: + version "1.3.7" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" + integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== + dependencies: + ethereum-common "^0.0.18" + ethereumjs-util "^5.0.0" + +ethereumjs-util@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960" + integrity sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + ethjs-util "0.1.6" + keccak "^2.0.0" + rlp "^2.2.3" + secp256k1 "^3.0.1" + +ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0, ethereumjs-util@^6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethereumjs-util@^4.3.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz#f4bf9b3b515a484e3cc8781d61d9d980f7c83bd0" + integrity sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w== + dependencies: + bn.js "^4.8.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + rlp "^2.0.0" + +ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5, ethereumjs-util@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" + integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "^0.1.3" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.2, ethereumjs-util@^7.0.7, ethereumjs-util@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz#e2b43a30bfcdbcb432a4eb42bd5f2393209b3fd5" + integrity sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.4" + +ethereumjs-vm@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-4.2.0.tgz#e885e861424e373dbc556278f7259ff3fca5edab" + integrity sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + core-js-pure "^3.0.1" + ethereumjs-account "^3.0.0" + ethereumjs-block "^2.2.2" + ethereumjs-blockchain "^4.0.3" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.2" + ethereumjs-util "^6.2.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + util.promisify "^1.0.0" + +ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" + integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + ethereumjs-account "^2.0.3" + ethereumjs-block "~2.2.0" + ethereumjs-common "^1.1.0" + ethereumjs-util "^6.0.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + +ethereumjs-wallet@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz#685e9091645cee230ad125c007658833991ed474" + integrity sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA== + dependencies: + aes-js "^3.1.1" + bs58check "^2.1.2" + ethereum-cryptography "^0.1.3" + ethereumjs-util "^6.0.0" + randombytes "^2.0.6" + safe-buffer "^5.1.2" + scryptsy "^1.2.1" + utf8 "^3.0.0" + uuid "^3.3.2" + +ethers@^4.0.32, ethers@^4.0.40: + version "4.0.49" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.49.tgz#0eb0e9161a0c8b4761be547396bbe2fb121a8894" + integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== + dependencies: + aes-js "3.0.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethers@^5.0.0, ethers@^5.0.1, ethers@^5.0.2, ethers@^5.4.0, ethers@^5.4.4: + version "5.4.6" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.6.tgz#fe0a023956b5502c947f58e82fbcf9a73e5e75b6" + integrity sha512-F7LXARyB/Px3AQC6/QKedWZ8eqCkgOLORqL4B/F0Mag/K+qJSFGqsR36EaOZ6fKg3ZonI+pdbhb4A8Knt/43jQ== + dependencies: + "@ethersproject/abi" "5.4.1" + "@ethersproject/abstract-provider" "5.4.1" + "@ethersproject/abstract-signer" "5.4.1" + "@ethersproject/address" "5.4.0" + "@ethersproject/base64" "5.4.0" + "@ethersproject/basex" "5.4.0" + "@ethersproject/bignumber" "5.4.1" + "@ethersproject/bytes" "5.4.0" + "@ethersproject/constants" "5.4.0" + "@ethersproject/contracts" "5.4.1" + "@ethersproject/hash" "5.4.0" + "@ethersproject/hdnode" "5.4.0" + "@ethersproject/json-wallets" "5.4.0" + "@ethersproject/keccak256" "5.4.0" + "@ethersproject/logger" "5.4.1" + "@ethersproject/networks" "5.4.2" + "@ethersproject/pbkdf2" "5.4.0" + "@ethersproject/properties" "5.4.1" + "@ethersproject/providers" "5.4.5" + "@ethersproject/random" "5.4.0" + "@ethersproject/rlp" "5.4.0" + "@ethersproject/sha2" "5.4.0" + "@ethersproject/signing-key" "5.4.0" + "@ethersproject/solidity" "5.4.0" + "@ethersproject/strings" "5.4.0" + "@ethersproject/transactions" "5.4.0" + "@ethersproject/units" "5.4.0" + "@ethersproject/wallet" "5.4.0" + "@ethersproject/web" "5.4.0" + "@ethersproject/wordlists" "5.4.0" + +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + +ethjs-util@0.1.6, ethjs-util@^0.1.3: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +eventemitter3@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== + +eventemitter3@^4.0.4: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +events@^3.0.0, events@^3.2.0, events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exit-on-epipe@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" + integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw== + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + +express@^4.14.0: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +ext@^1.1.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.5.0.tgz#e93b97ae0cb23f8370380f6107d2d2b7887687ad" + integrity sha512-+ONcYoWj/SoQwUofMr94aGu05Ou4FepKi7N7b+O8T4jVfyIsZQV1/xeS8jpaBzF0csAk0KLXoHCxU7cKYZjo1Q== + dependencies: + type "^2.5.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fake-merkle-patricia-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" + integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= + dependencies: + checkpoint-store "^1.1.0" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-glob@^3.0.3, fast-glob@^3.1.1: + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fastq@^1.6.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.12.0.tgz#ed7b6ab5d62393fb2cc591c853652a5c318bf794" + integrity sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg== + dependencies: + reusify "^1.0.4" + +fetch-ponyfill@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" + integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= + dependencies: + node-fetch "~1.7.1" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-replace@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= + dependencies: + array-back "^1.0.4" + test-value "^2.1.0" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-yarn-workspace-root@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" + integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== + dependencies: + fs-extra "^4.0.3" + micromatch "^3.1.4" + +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flat@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" + integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== + dependencies: + is-buffer "~2.0.3" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + +flatted@^3.1.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" + integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== + +flow-stoplight@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" + integrity sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s= + +fmix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" + integrity sha1-x7vxJN7ELJ0ZHPuUfQqXeN2YbAw= + dependencies: + imul "^1.0.0" + +follow-redirects@^1.12.1, follow-redirects@^1.14.0: + version "1.14.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.3.tgz#6ada78118d8d24caee595595accdc0ac6abd022e" + integrity sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw== + +for-each@^0.3.3, for-each@~0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-extra@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" + integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^4.0.2, fs-extra@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-minipass@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs-minipass@^2.0.0, fs-minipass@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +ganache-cli@^6.12.2: + version "6.12.2" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" + integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== + dependencies: + ethereumjs-util "6.2.1" + source-map-support "0.5.12" + yargs "13.2.4" + +ganache-core@^2.13.2: + version "2.13.2" + resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.13.2.tgz#27e6fc5417c10e6e76e2e646671869d7665814a3" + integrity sha512-tIF5cR+ANQz0+3pHWxHjIwHqFXcVo0Mb+kcsNhglNFALcYo49aQpnS9dqHartqPfMFjiHh/qFoD3mYK0d/qGgw== + dependencies: + abstract-leveldown "3.0.0" + async "2.6.2" + bip39 "2.5.0" + cachedown "1.0.0" + clone "2.1.2" + debug "3.2.6" + encoding-down "5.0.4" + eth-sig-util "3.0.0" + ethereumjs-abi "0.6.8" + ethereumjs-account "3.0.0" + ethereumjs-block "2.2.2" + ethereumjs-common "1.5.0" + ethereumjs-tx "2.1.2" + ethereumjs-util "6.2.1" + ethereumjs-vm "4.2.0" + heap "0.2.6" + keccak "3.0.1" + level-sublevel "6.6.4" + levelup "3.1.1" + lodash "4.17.20" + lru-cache "5.1.1" + merkle-patricia-tree "3.0.0" + patch-package "6.2.2" + seedrandom "3.0.1" + source-map-support "0.5.12" + tmp "0.1.0" + web3-provider-engine "14.2.1" + websocket "1.0.32" + optionalDependencies: + ethereumjs-wallet "0.6.5" + web3 "1.2.11" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-caller-file@^2.0.1, get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-pkg-repo@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-4.2.0.tgz#a585cffc33ba5dde2cdcf68cdea1d96ead9ae0e8" + integrity sha512-eiSexNxIsij+l+IZzkqT52t4Lh+0ChN9l6Z3oennXLQT8OaJNvp9ecoXpmZ220lPYMwwM1KDal4w4ZA+smVLHA== + dependencies: + "@hutson/parse-repository-url" "^3.0.0" + hosted-git-info "^4.0.0" + through2 "^2.0.0" + yargs "^17.0.1" + +get-port@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + integrity sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw= + +get-port@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" + integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^4.0.0, get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +ghost-testrpc@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" + integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== + dependencies: + chalk "^2.4.2" + node-emoji "^1.10.0" + +git-raw-commits@^2.0.8: + version "2.0.10" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" + integrity sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ== + dependencies: + dargs "^7.0.0" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" + +git-remote-origin-url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" + integrity sha1-UoJlna4hBxRaERJhEq0yFuxfpl8= + dependencies: + gitconfiglocal "^1.0.0" + pify "^2.3.0" + +git-semver-tags@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" + integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== + dependencies: + meow "^8.0.0" + semver "^6.0.0" + +git-up@^4.0.0: + version "4.0.5" + resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.5.tgz#e7bb70981a37ea2fb8fe049669800a1f9a01d759" + integrity sha512-YUvVDg/vX3d0syBsk/CKUTib0srcQME0JyHkL5BaYdwLsiCslPWmDSi8PUMo9pXYjrryMcmsCoCgsTpSCJEQaA== + dependencies: + is-ssh "^1.3.0" + parse-url "^6.0.0" + +git-url-parse@^11.4.4: + version "11.6.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.6.0.tgz#c634b8de7faa66498a2b88932df31702c67df605" + integrity sha512-WWUxvJs5HsyHL6L08wOusa/IXYtMuCAhrMmnTjQPpBU0TTHyDhnOATNH3xNQz7YOQUsqIIPTGr4xiVti1Hsk5g== + dependencies: + git-up "^4.0.0" + +gitconfiglocal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + integrity sha1-QdBF84UaXqiPA/JMocYXgRRGS5s= + dependencies: + ini "^1.3.2" + +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= + +glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.1.7, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + +globals@^11.1.0, globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^13.6.0, globals@^13.9.0: + version "13.11.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.11.0.tgz#40ef678da117fe7bd2e28f1fab24951bd0255be7" + integrity sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g== + dependencies: + type-fest "^0.20.2" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + +globby@^11.0.2, globby@^11.0.3: + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + +got@9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + +got@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +handlebars@^4.0.1, handlebars@^4.7.6: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +hard-rejection@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" + integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== + +hardhat-abi-exporter@^2.2.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/hardhat-abi-exporter/-/hardhat-abi-exporter-2.3.0.tgz#f7aeb56f2ceef1ccdb75a5b8d81dc80cbbfeefc4" + integrity sha512-9EVhogHgFWsi4Bc46tv+WirOR+auGBZrv9V5/qAHBjOqYiZPbNXoFUo/yQhOAsF8Bz4Q9p4jHpdeQXnYt7g6Yw== + +hardhat-contract-sizer@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/hardhat-contract-sizer/-/hardhat-contract-sizer-2.0.3.tgz#604455fd803865f81c29f60364e863eaa19395a7" + integrity sha512-iaixOzWxwOSIIE76cl2uk4m9VXI1hKU3bFt+gl7jDhyb2/JB2xOp5wECkfWqAoc4V5lD4JtjldZlpSTbzX+nPQ== + dependencies: + cli-table3 "^0.6.0" + colors "^1.4.0" + +hardhat-dependency-compiler@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/hardhat-dependency-compiler/-/hardhat-dependency-compiler-1.1.1.tgz#0bfe713d450a7fdad14a210b7a9b8a32e56cc744" + integrity sha512-2xubH8aPojhMGbILFlfL28twu6l/5Tyrj4Dpkogvycse6YegKW9GuGA3rnbPH0KP+Nv2xT626ZuR2Ys+w3ifPw== + +hardhat-deploy@^0.8.11: + version "0.8.11" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.8.11.tgz#faa20def76f031101db81c5b71d7388e0475b794" + integrity sha512-PJIYckR9lYvGMHxaIb8esvZw9k+gW2xPCUYf4XJTQ3f1fLTXhA86AOhPQsfyBr+MY11/D+UUerIP88tl+PW2+g== + dependencies: + "@ethersproject/abi" "^5.3.1" + "@ethersproject/abstract-signer" "^5.3.0" + "@ethersproject/address" "^5.3.0" + "@ethersproject/bignumber" "^5.3.0" + "@ethersproject/bytes" "^5.3.0" + "@ethersproject/contracts" "^5.3.0" + "@ethersproject/providers" "^5.3.1" + "@ethersproject/solidity" "^5.3.0" + "@ethersproject/transactions" "^5.3.0" + "@ethersproject/wallet" "^5.3.0" + "@types/qs" "^6.9.4" + axios "^0.21.1" + chalk "^4.1.1" + chokidar "^3.4.0" + debug "^4.1.1" + enquirer "^2.3.6" + form-data "^4.0.0" + fs-extra "^10.0.0" + match-all "^1.2.6" + murmur-128 "^0.2.1" + qs "^6.9.4" + +hardhat-gas-reporter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.4.tgz#59e3137e38e0dfeac2e4f90d5c74160b50ad4829" + integrity sha512-G376zKh81G3K9WtDA+SoTLWsoygikH++tD1E7llx+X7J+GbIqfwhDKKgvJjcnEesMrtR9UqQHK02lJuXY1RTxw== + dependencies: + eth-gas-reporter "^0.2.20" + sha1 "^1.1.1" + +hardhat@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.6.0.tgz#a00a44d36559a880c170dca6363cc33f7545364b" + integrity sha512-NEM2pe11QXWXB7k49heOLQA9vxihG4DJ0712KjMT9NYSZgLOMcWswJ3tvn+/ND6vzLn6Z4pqr2x/kWSfllWFuw== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/blockchain" "^5.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + "@ethereumjs/vm" "^5.5.2" + "@ethersproject/abi" "^5.1.2" + "@sentry/node" "^5.18.1" + "@solidity-parser/parser" "^0.11.0" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + eth-sig-util "^2.5.2" + ethereum-cryptography "^0.1.2" + ethereumjs-abi "^0.6.8" + ethereumjs-util "^7.1.0" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "^7.1.3" + https-proxy-agent "^5.0.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + lodash "^4.17.11" + merkle-patricia-tree "^4.2.0" + mnemonist "^0.38.0" + mocha "^7.1.2" + node-fetch "^2.6.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + slash "^3.0.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + "true-case-path" "^2.2.1" + tsort "0.0.1" + uuid "^3.3.2" + ws "^7.4.6" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + +has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has-unicode@^2.0.0, has-unicode@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3, has@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +heap@0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" + integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961" + integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg== + dependencies: + lru-cache "^6.0.0" + +http-basic@^8.1.1: + version "8.1.3" + resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" + integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== + dependencies: + caseless "^0.12.0" + concat-stream "^1.6.2" + http-response-object "^3.0.1" + parse-cache-control "^1.0.1" + +http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@1.7.3, http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= + +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + +http-response-object@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" + integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== + dependencies: + "@types/node" "^10.0.3" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +humanize-duration@^3.26.0: + version "3.27.0" + resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.27.0.tgz#3f781b7cf8022ad587f76b9839b60bc2b29636b2" + integrity sha512-qLo/08cNc3Tb0uD7jK0jAcU5cnqCM0n568918E7R2XhMr/+7F37p4EY062W/stg7tmzvknNn9b/1+UhVRzsYrQ== + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= + dependencies: + ms "^2.0.0" + +iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== + dependencies: + punycode "2.1.0" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore-walk@^3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" + integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== + dependencies: + minimatch "^3.0.4" + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.1.1, ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + +immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + +immediate@~3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" + integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= + +immutable@^4.0.0-rc.12: + version "4.0.0-rc.14" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.14.tgz#29ba96631ec10867d1348515ac4e6bdba462f071" + integrity sha512-pfkvmRKJSoW7JFx0QeYlAmT+kNYvn5j0u7bnpNq4N2RCvHSTlLT208G8jgaquNe+Q8kCPHKOSpxJkyvLDpYq0w== + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-local@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" + integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imul@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" + integrity sha1-nVhnFh6LPelsLDjV3HyxAvNeKsk= + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +infer-owner@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +init-package-json@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-2.0.4.tgz#9f9f66cd5934e6d5f645150e15013d384d0b90d2" + integrity sha512-gUACSdZYka+VvnF90TsQorC+1joAVWNI724vBNj3RD0LLMeDss2IuzaeiQs0T4YzKs76BPHtrp/z3sn2p+KDTw== + dependencies: + glob "^7.1.1" + npm-package-arg "^8.1.2" + promzard "^0.3.0" + read "~1.0.1" + read-package-json "^4.0.0" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" + validate-npm-package-name "^3.0.0" + +inquirer@^6.2.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + +inquirer@^7.3.3: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.19" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +invariant@2, invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + +ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-buffer@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + +is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" + integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== + dependencies: + has "^1.0.3" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== + +is-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" + integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= + +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU= + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number-object@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== + +is-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== + +is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-obj@^2.0.0, is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + +is-regex@^1.0.4, is-regex@^1.1.4, is-regex@~1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-retry-allowed@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + +is-ssh@^1.3.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.3.tgz#7f133285ccd7f2c2c7fc897b771b53d95a2b2c7e" + integrity sha512-NKzJmQzJfEEma3w5cJNcUMxoXfDjz0Zj0eyCalHn2E6VOwlzjZo0yuO2fcBSf8zhFuVCL/82/r5gRcoi6aEPVQ== + dependencies: + protocols "^1.1.0" + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-text-path@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= + dependencies: + text-extensions "^1.0.0" + +is-typed-array@^1.1.3, is-typed-array@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.8.tgz#cbaa6585dc7db43318bc5b89523ea384a6f65e79" + integrity sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-abstract "^1.18.5" + foreach "^2.0.5" + has-tostringtag "^1.0.0" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-url@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + +javascript-natural-sort@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz#f9e2303d4507f6d74355a73664d1440fb5a0ef59" + integrity sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k= + +js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz#9d4ff447241792e1d0a232f6ef927302bb0c62a9" + integrity sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA== + dependencies: + async "^2.0.1" + babel-preset-env "^1.7.0" + babelify "^7.3.0" + json-rpc-error "^2.0.0" + promise-to-callback "^1.0.0" + safe-event-emitter "^1.0.1" + +json-rpc-error@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02" + integrity sha1-p6+cICg4tekFxyUOVH8a/3cligI= + dependencies: + inherits "^2.0.1" + +json-rpc-random-id@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" + integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +json5@^2.1.2: + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== + dependencies: + minimist "^1.2.5" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + +jsonparse@^1.2.0, jsonparse@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= + +jsonschema@^1.2.4: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.0.tgz#1afa34c4bc22190d8e42271ec17ac8b3404f87b2" + integrity sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw== + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +keccak@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" + integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +keccak@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-2.1.0.tgz#734ea53f2edcfd0f42cdb8d5f4c358fef052752b" + integrity sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q== + dependencies: + bindings "^1.5.0" + inherits "^2.0.4" + nan "^2.14.0" + safe-buffer "^5.2.0" + +keccak@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" + integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= + optionalDependencies: + graceful-fs "^4.1.9" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +lerna@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-4.0.0.tgz#b139d685d50ea0ca1be87713a7c2f44a5b678e9e" + integrity sha512-DD/i1znurfOmNJb0OBw66NmNqiM8kF6uIrzrJ0wGE3VNdzeOhz9ziWLYiRaZDGGwgbcjOo6eIfcx9O5Qynz+kg== + dependencies: + "@lerna/add" "4.0.0" + "@lerna/bootstrap" "4.0.0" + "@lerna/changed" "4.0.0" + "@lerna/clean" "4.0.0" + "@lerna/cli" "4.0.0" + "@lerna/create" "4.0.0" + "@lerna/diff" "4.0.0" + "@lerna/exec" "4.0.0" + "@lerna/import" "4.0.0" + "@lerna/info" "4.0.0" + "@lerna/init" "4.0.0" + "@lerna/link" "4.0.0" + "@lerna/list" "4.0.0" + "@lerna/publish" "4.0.0" + "@lerna/run" "4.0.0" + "@lerna/version" "4.0.0" + import-local "^3.0.2" + npmlog "^4.1.2" + +level-codec@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" + integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== + dependencies: + buffer "^5.6.0" + +level-codec@~7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" + integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== + +level-concat-iterator@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" + integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== + +level-errors@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" + integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== + dependencies: + errno "~0.1.1" + +level-errors@^2.0.0, level-errors@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" + integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== + dependencies: + errno "~0.1.1" + +level-errors@~1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" + integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== + dependencies: + errno "~0.1.1" + +level-iterator-stream@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz#ccfff7c046dcf47955ae9a86f46dfa06a31688b4" + integrity sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig== + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.5" + xtend "^4.0.0" + +level-iterator-stream@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" + integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= + dependencies: + inherits "^2.0.1" + level-errors "^1.0.3" + readable-stream "^1.0.33" + xtend "^4.0.0" + +level-iterator-stream@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz#2c98a4f8820d87cdacab3132506815419077c730" + integrity sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g== + dependencies: + inherits "^2.0.1" + readable-stream "^2.3.6" + xtend "^4.0.0" + +level-iterator-stream@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" + integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== + dependencies: + inherits "^2.0.4" + readable-stream "^3.4.0" + xtend "^4.0.2" + +level-mem@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-3.0.1.tgz#7ce8cf256eac40f716eb6489654726247f5a89e5" + integrity sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg== + dependencies: + level-packager "~4.0.0" + memdown "~3.0.0" + +level-mem@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-5.0.1.tgz#c345126b74f5b8aa376dc77d36813a177ef8251d" + integrity sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg== + dependencies: + level-packager "^5.0.3" + memdown "^5.0.0" + +level-packager@^5.0.3: + version "5.1.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.1.tgz#323ec842d6babe7336f70299c14df2e329c18939" + integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== + dependencies: + encoding-down "^6.3.0" + levelup "^4.3.2" + +level-packager@~4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-4.0.1.tgz#7e7d3016af005be0869bc5fa8de93d2a7f56ffe6" + integrity sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q== + dependencies: + encoding-down "~5.0.0" + levelup "^3.0.0" + +level-post@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/level-post/-/level-post-1.0.7.tgz#19ccca9441a7cc527879a0635000f06d5e8f27d0" + integrity sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew== + dependencies: + ltgt "^2.1.2" + +level-sublevel@6.6.4: + version "6.6.4" + resolved "https://registry.yarnpkg.com/level-sublevel/-/level-sublevel-6.6.4.tgz#f7844ae893919cd9d69ae19d7159499afd5352ba" + integrity sha512-pcCrTUOiO48+Kp6F1+UAzF/OtWqLcQVTVF39HLdZ3RO8XBoXt+XVPKZO1vVr1aUoxHZA9OtD2e1v7G+3S5KFDA== + dependencies: + bytewise "~1.1.0" + level-codec "^9.0.0" + level-errors "^2.0.0" + level-iterator-stream "^2.0.3" + ltgt "~2.1.1" + pull-defer "^0.2.2" + pull-level "^2.0.3" + pull-stream "^3.6.8" + typewiselite "~1.0.0" + xtend "~4.0.0" + +level-supports@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" + integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== + dependencies: + xtend "^4.0.2" + +level-ws@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" + integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= + dependencies: + readable-stream "~1.0.15" + xtend "~2.1.1" + +level-ws@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-1.0.0.tgz#19a22d2d4ac57b18cc7c6ecc4bd23d899d8f603b" + integrity sha512-RXEfCmkd6WWFlArh3X8ONvQPm8jNpfA0s/36M4QzLqrLEIt1iJE9WBHLZ5vZJK6haMjJPJGJCQWfjMNnRcq/9Q== + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.8" + xtend "^4.0.1" + +level-ws@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-2.0.0.tgz#207a07bcd0164a0ec5d62c304b4615c54436d339" + integrity sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA== + dependencies: + inherits "^2.0.3" + readable-stream "^3.1.0" + xtend "^4.0.1" + +levelup@3.1.1, levelup@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-3.1.1.tgz#c2c0b3be2b4dc316647c53b42e2f559e232d2189" + integrity sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg== + dependencies: + deferred-leveldown "~4.0.0" + level-errors "~2.0.0" + level-iterator-stream "~3.0.0" + xtend "~4.0.0" + +levelup@^1.2.1: + version "1.3.9" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" + integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ== + dependencies: + deferred-leveldown "~1.2.1" + level-codec "~7.0.0" + level-errors "~1.0.3" + level-iterator-stream "~1.3.0" + prr "~1.0.1" + semver "~5.4.1" + xtend "~4.0.0" + +levelup@^4.3.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.4.0.tgz#f89da3a228c38deb49c48f88a70fb71f01cafed6" + integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== + dependencies: + deferred-leveldown "~5.3.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +libnpmaccess@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-4.0.3.tgz#dfb0e5b0a53c315a2610d300e46b4ddeb66e7eec" + integrity sha512-sPeTSNImksm8O2b6/pf3ikv4N567ERYEpeKRPSmqlNt1dTZbvgpJIzg5vAhXHpw2ISBsELFRelk0jEahj1c6nQ== + dependencies: + aproba "^2.0.0" + minipass "^3.1.1" + npm-package-arg "^8.1.2" + npm-registry-fetch "^11.0.0" + +libnpmpublish@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-4.0.2.tgz#be77e8bf5956131bcb45e3caa6b96a842dec0794" + integrity sha512-+AD7A2zbVeGRCFI2aO//oUmapCwy7GHqPXFJh3qpToSRNU+tXKJ2YFUgjt04LPPAf2dlEH95s6EhIHM1J7bmOw== + dependencies: + normalize-package-data "^3.0.2" + npm-package-arg "^8.1.2" + npm-registry-fetch "^11.0.0" + semver "^7.1.3" + ssri "^8.0.1" + +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +load-json-file@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-6.2.0.tgz#5c7770b42cafa97074ca2848707c61662f4251a1" + integrity sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ== + dependencies: + graceful-fs "^4.1.15" + parse-json "^5.0.0" + strip-bom "^4.0.0" + type-fest "^0.6.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.ismatch@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" + integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.template@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + +lodash@4.17.20: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +looper@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" + integrity sha1-Zs0Md0rz1P7axTeU90LbVtqPCew= + +looper@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749" + integrity sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k= + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lru-cache@5.1.1, lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" + integrity sha1-cXibO39Tmb7IVl3aOKow0qCX7+4= + dependencies: + pseudomap "^1.0.1" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= + +ltgt@^2.1.2, ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + +ltgt@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34" + integrity sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ= + +make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-dir@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +make-fetch-happen@^8.0.9: + version "8.0.14" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222" + integrity sha512-EsS89h6l4vbfJEtBZnENTOFk8mCRpY5ru36Xe5bcX1KYIli2mkSHqoFsp5O1wMDvTJJzxe/4THpCTtygjeeGWQ== + dependencies: + agentkeepalive "^4.1.3" + cacache "^15.0.5" + http-cache-semantics "^4.1.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^6.0.0" + minipass "^3.1.3" + minipass-collect "^1.0.2" + minipass-fetch "^1.3.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + promise-retry "^2.0.1" + socks-proxy-agent "^5.0.0" + ssri "^8.0.0" + +make-fetch-happen@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" + integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== + dependencies: + agentkeepalive "^4.1.3" + cacache "^15.2.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^6.0.0" + minipass "^3.1.3" + minipass-collect "^1.0.2" + minipass-fetch "^1.3.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.2" + promise-retry "^2.0.1" + socks-proxy-agent "^6.0.0" + ssri "^8.0.0" + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-obj@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7" + integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ== + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +markdown-table@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" + integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== + +match-all@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" + integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== + +mcl-wasm@^0.7.1: + version "0.7.9" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" + integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memdown@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" + integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + dependencies: + abstract-leveldown "~2.7.1" + functional-red-black-tree "^1.0.1" + immediate "^3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + +memdown@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-5.1.0.tgz#608e91a9f10f37f5b5fe767667a8674129a833cb" + integrity sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw== + dependencies: + abstract-leveldown "~6.2.1" + functional-red-black-tree "~1.0.1" + immediate "~3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.2.0" + +memdown@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-3.0.0.tgz#93aca055d743b20efc37492e9e399784f2958309" + integrity sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA== + dependencies: + abstract-leveldown "~5.0.0" + functional-red-black-tree "~1.0.1" + immediate "~3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + +meow@^8.0.0: + version "8.1.2" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" + integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "4.1.0" + normalize-package-data "^3.0.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.18.0" + yargs-parser "^20.2.3" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.2.3, merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +merkle-patricia-tree@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz#448d85415565df72febc33ca362b8b614f5a58f8" + integrity sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ== + dependencies: + async "^2.6.1" + ethereumjs-util "^5.2.0" + level-mem "^3.0.1" + level-ws "^1.0.0" + readable-stream "^3.0.6" + rlp "^2.0.0" + semaphore ">=1.0.1" + +merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" + integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g== + dependencies: + async "^1.4.2" + ethereumjs-util "^5.0.0" + level-ws "0.0.0" + levelup "^1.2.1" + memdown "^1.0.0" + readable-stream "^2.0.0" + rlp "^2.0.0" + semaphore ">=1.0.1" + +merkle-patricia-tree@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.1.tgz#fc43e7b162e597a0720ccdd702bf1d49765691d2" + integrity sha512-25reMgrT8PhJy0Ba0U7fMZD2oobS1FPWB9vQa0uBpJYIQYYuFXEHoqEkTqA/UzX+s9br3pmUVVY/TOsFt/x0oQ== + dependencies: + "@types/levelup" "^4.3.0" + ethereumjs-util "^7.1.0" + level-mem "^5.0.1" + level-ws "^2.0.0" + readable-stream "^3.6.0" + rlp "^2.2.4" + semaphore-async-await "^1.5.1" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +micromatch@^4.0.2, micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== + +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== + dependencies: + mime-db "1.49.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +mimic-fn@^2.0.0, mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +mimic-response@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" + integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + dependencies: + dom-walk "^0.1.0" + +min-indent@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist-options@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" + integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + kind-of "^6.0.3" + +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@~1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== + dependencies: + minipass "^3.0.0" + +minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.4.1.tgz#d75e0091daac1b0ffd7e9d41629faff7d0c1f1b6" + integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== + dependencies: + minipass "^3.1.0" + minipass-sized "^1.0.3" + minizlib "^2.0.0" + optionalDependencies: + encoding "^0.1.12" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-json-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" + integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== + dependencies: + jsonparse "^1.3.1" + minipass "^3.0.0" + +minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + +minipass@^2.6.0, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" + integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== + dependencies: + yallist "^4.0.0" + +minizlib@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +minizlib@^2.0.0, minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + +mkdirp-infer-owner@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz#55d3b368e7d89065c38f32fd38e638f0ab61d316" + integrity sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw== + dependencies: + chownr "^2.0.0" + infer-owner "^1.0.4" + mkdirp "^1.0.3" + +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + dependencies: + mkdirp "*" + +mkdirp@*, mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@0.5.5, mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@^0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mnemonist@^0.38.0: + version "0.38.3" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.3.tgz#35ec79c1c1f4357cfda2fe264659c2775ccd7d9d" + integrity sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw== + dependencies: + obliterator "^1.6.1" + +mocha@^7.1.1, mocha@^7.1.2: + version "7.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" + integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mocha@^9.0.2, mocha@^9.0.3: + version "9.1.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.1.1.tgz#33df2eb9c6262434630510c5f4283b36efda9b61" + integrity sha512-0wE74YMgOkCgBUj8VyIDwmLUjTsS13WV1Pg7l0SHea2qzZzlq7MDnfbPsHKcELBRk3+izEVkRofjmClpycudCA== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.2" + debug "4.3.1" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.7" + growl "1.10.5" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "3.0.4" + ms "2.1.3" + nanoid "3.1.23" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.1.5" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mock-fs@^4.1.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" + integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== + +modify-values@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" + integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.0.0, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + +multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + +multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + +multimatch@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6" + integrity sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA== + dependencies: + "@types/minimatch" "^3.0.3" + array-differ "^3.0.0" + array-union "^2.1.0" + arrify "^2.0.1" + minimatch "^3.0.4" + +murmur-128@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" + integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== + dependencies: + encode-utf8 "^1.0.2" + fmix "^0.1.0" + imul "^1.0.0" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +mute-stream@0.0.8, mute-stream@~0.0.4: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +nan@^2.14.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" + integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== + +nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" + integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= + +nanoid@3.1.23: + version "3.1.23" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" + integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +negotiator@0.6.2, negotiator@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-abi@^2.18.0, node-abi@^2.21.0, node-abi@^2.7.0: + version "2.30.1" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" + integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== + dependencies: + semver "^5.4.1" + +node-addon-api@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.0.2.tgz#04bc7b83fd845ba785bb6eae25bc857e1ef75681" + integrity sha512-+D4s2HCnxPd5PjjI0STKwncjXTUKKqm74MDMz9OPXavjsGmjkvwgLtA5yoxJUdmpj52+2u+RrXgPipahKczMKg== + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-addon-api@^3.0.2: + version "3.2.1" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" + integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== + +node-emoji@^1.10.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== + dependencies: + lodash "^4.17.21" + +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +node-fetch@^2.6.0, node-fetch@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.2.tgz#986996818b73785e47b1965cc34eb093a1d464d0" + integrity sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA== + +node-fetch@~1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-gyp-build@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + +node-gyp@^5.0.2: + version "5.1.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" + integrity sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.2" + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.1.2" + request "^2.88.0" + rimraf "^2.6.3" + semver "^5.7.1" + tar "^4.4.12" + which "^1.3.1" + +node-gyp@^7.1.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.1.2.tgz#21a810aebb187120251c3bcec979af1587b188ae" + integrity sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.3" + nopt "^5.0.0" + npmlog "^4.1.2" + request "^2.88.2" + rimraf "^3.0.2" + semver "^7.3.2" + tar "^6.0.2" + which "^2.0.2" + +node-hid@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-1.3.0.tgz#346a468505cee13d69ccd760052cbaf749f66a41" + integrity sha512-BA6G4V84kiNd1uAChub/Z/5s/xS3EHBCxotQ0nyYrUG65mXewUDHE1tWOSqA2dp3N+mV0Ffq9wo2AW9t4p/G7g== + dependencies: + bindings "^1.5.0" + nan "^2.14.0" + node-abi "^2.18.0" + prebuild-install "^5.3.4" + +node-hid@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-2.1.1.tgz#f83c8aa0bb4e6758b5f7383542477da93f67359d" + integrity sha512-Skzhqow7hyLZU93eIPthM9yjot9lszg9xrKxESleEs05V2NcbUptZc5HFqzjOkSmL0sFlZFr3kmvaYebx06wrw== + dependencies: + bindings "^1.5.0" + node-addon-api "^3.0.2" + prebuild-install "^6.0.0" + +node-releases@^1.1.75: + version "1.1.75" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" + integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw== + +nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== + +noop-logger@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" + integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= + +nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= + dependencies: + abbrev "1" + +nopt@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + +normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-package-data@^3.0.0, normalize-package-data@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" + integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== + dependencies: + hosted-git-info "^4.0.1" + is-core-module "^2.5.0" + semver "^7.3.4" + validate-npm-package-license "^3.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-url@^4.1.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" + integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== + +normalize-url@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + +npm-bundled@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" + integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-install-checks@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-4.0.0.tgz#a37facc763a2fde0497ef2c6d0ac7c3fbe00d7b4" + integrity sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w== + dependencies: + semver "^7.1.1" + +npm-lifecycle@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz#9882d3642b8c82c815782a12e6a1bfeed0026309" + integrity sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g== + dependencies: + byline "^5.0.0" + graceful-fs "^4.1.15" + node-gyp "^5.0.2" + resolve-from "^4.0.0" + slide "^1.1.6" + uid-number "0.0.6" + umask "^1.1.0" + which "^1.3.1" + +npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + +npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.0, npm-package-arg@^8.1.2: + version "8.1.5" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.5.tgz#3369b2d5fe8fdc674baa7f1786514ddc15466e44" + integrity sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q== + dependencies: + hosted-git-info "^4.0.1" + semver "^7.3.4" + validate-npm-package-name "^3.0.0" + +npm-packlist@^2.1.4: + version "2.2.2" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-2.2.2.tgz#076b97293fa620f632833186a7a8f65aaa6148c8" + integrity sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg== + dependencies: + glob "^7.1.6" + ignore-walk "^3.0.3" + npm-bundled "^1.1.1" + npm-normalize-package-bin "^1.0.1" + +npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz#7b5484ca2c908565f43b7f27644f36bb816f5148" + integrity sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA== + dependencies: + npm-install-checks "^4.0.0" + npm-normalize-package-bin "^1.0.1" + npm-package-arg "^8.1.2" + semver "^7.3.4" + +npm-registry-fetch@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz#68c1bb810c46542760d62a6a965f85a702d43a76" + integrity sha512-jmlgSxoDNuhAtxUIG6pVwwtz840i994dL14FoNVZisrmZW5kWd63IUTNv1m/hyRSGSqWjCUp/YZlS1BJyNp9XA== + dependencies: + make-fetch-happen "^9.0.1" + minipass "^3.1.3" + minipass-fetch "^1.3.0" + minipass-json-stream "^1.0.1" + minizlib "^2.0.0" + npm-package-arg "^8.0.0" + +npm-registry-fetch@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-9.0.0.tgz#86f3feb4ce00313bc0b8f1f8f69daae6face1661" + integrity sha512-PuFYYtnQ8IyVl6ib9d3PepeehcUeHN9IO5N/iCRhyg9tStQcqGQBRVHmfmMWPDERU3KwZoHFvbJ4FPXPspvzbA== + dependencies: + "@npmcli/ci-detect" "^1.0.0" + lru-cache "^6.0.0" + make-fetch-happen "^8.0.9" + minipass "^3.1.3" + minipass-fetch "^1.3.0" + minipass-json-stream "^1.0.1" + minizlib "^2.0.0" + npm-package-arg "^8.0.0" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +npmlog@^4.0.1, npmlog@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4, object-assign@^4.0.0, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.11.0, object-inspect@^1.9.0, object-inspect@~1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== + +object-is@^1.0.1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" + integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" + integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +object.values@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" + integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.2" + +obliterator@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-1.6.1.tgz#dea03e8ab821f6c4d96a299e17aef6a3af994ef3" + integrity sha512-9WXswnqINnnhOG/5SLimUlzuU1hFJUc8zkwyD59Sd+dPOMf05PmnYG/d6Q7HZ+KmgkZJa1PxRso6QdM3sTNHig== + +oboe@2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" + integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= + dependencies: + http-https "^1.0.0" + +oboe@2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" + integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80= + dependencies: + http-https "^1.0.0" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map-series@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" + integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q== + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-pipe@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-3.1.0.tgz#48b57c922aa2e1af6a6404cb7c6bf0eb9cc8e60e" + integrity sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw== + +p-queue@^6.6.2: + version "6.6.2" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" + integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ== + dependencies: + eventemitter3 "^4.0.4" + p-timeout "^3.2.0" + +p-reduce@^2.0.0, p-reduce@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a" + integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw== + +p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + +p-timeout@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" + integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== + dependencies: + p-finally "^1.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +p-waterfall@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-2.1.1.tgz#63153a774f472ccdc4eb281cdb2967fcf158b2ee" + integrity sha512-RRTnDb2TBG/epPRI2yYXsimO0v3BXC8Yd3ogr1545IaqKK17VGhbWVeGGN+XfCm/08OK8635nH31c8bATkHuSw== + dependencies: + p-reduce "^2.0.0" + +pacote@^11.2.6: + version "11.3.5" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-11.3.5.tgz#73cf1fc3772b533f575e39efa96c50be8c3dc9d2" + integrity sha512-fT375Yczn4zi+6Hkk2TBe1x1sP8FgFsEIZ2/iWaXY2r/NkhDJfxbcn5paz1+RTFCyNf+dPnaoBDJoAxXSU8Bkg== + dependencies: + "@npmcli/git" "^2.1.0" + "@npmcli/installed-package-contents" "^1.0.6" + "@npmcli/promise-spawn" "^1.2.0" + "@npmcli/run-script" "^1.8.2" + cacache "^15.0.5" + chownr "^2.0.0" + fs-minipass "^2.1.0" + infer-owner "^1.0.4" + minipass "^3.1.3" + mkdirp "^1.0.3" + npm-package-arg "^8.0.1" + npm-packlist "^2.1.4" + npm-pick-manifest "^6.0.0" + npm-registry-fetch "^11.0.0" + promise-retry "^2.0.1" + read-package-json-fast "^2.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.1.0" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.6" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" + integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== + dependencies: + asn1.js "^5.2.0" + browserify-aes "^1.0.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-author@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parse-author/-/parse-author-2.0.0.tgz#d3460bf1ddd0dfaeed42da754242e65fb684a81f" + integrity sha1-00YL8d3Q367tQtp1QkLmX7aEqB8= + dependencies: + author-regex "^1.0.0" + +parse-cache-control@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" + integrity sha1-juqz5U+laSD+Fro493+iGqzC104= + +parse-headers@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.4.tgz#9eaf2d02bed2d1eff494331ce3df36d7924760bf" + integrity sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw== + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parse-path@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf" + integrity sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA== + dependencies: + is-ssh "^1.3.0" + protocols "^1.4.0" + qs "^6.9.4" + query-string "^6.13.8" + +parse-url@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-6.0.0.tgz#f5dd262a7de9ec00914939220410b66cff09107d" + integrity sha512-cYyojeX7yIIwuJzledIHeLUBVJ6COVLeT4eF+2P6aKVzwvgKQPndCBv3+yQ7pcWjqToYwaligxzSYNNmGoMAvw== + dependencies: + is-ssh "^1.3.0" + normalize-url "^6.1.0" + parse-path "^4.0.0" + protocols "^1.4.0" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +patch-package@6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.2.2.tgz#71d170d650c65c26556f0d0fbbb48d92b6cc5f39" + integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^1.2.1" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + +patch-package@^6.2.2: + version "6.4.7" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" + integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^2.0.0" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + open "^7.4.2" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + +path-browserify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" + integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= + dependencies: + find-up "^2.1.0" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postinstall-postinstall@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" + integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== + +prebuild-install@^5.3.3, prebuild-install@^5.3.4: + version "5.3.6" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.6.tgz#7c225568d864c71d89d07f8796042733a3f54291" + integrity sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg== + dependencies: + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^2.7.0" + noop-logger "^0.1.1" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + which-pm-runs "^1.0.0" + +prebuild-install@^6.0.0: + version "6.1.4" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" + integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== + dependencies: + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^2.21.0" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + +precond@0.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" + integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +prettier-package-json@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/prettier-package-json/-/prettier-package-json-2.6.0.tgz#624eeb604a4c19af146c1d1c824d31afd2690e2a" + integrity sha512-CS7utu4Jfm6xxCrIA4zZiOtNIwZhq0EyHnK01vmliV2QRU+L6/Ywy1tB6uUpT9Lwt5qpvRMHNApa6jxoRHfafA== + dependencies: + commander "^4.0.1" + cosmiconfig "^7.0.0" + fs-extra "^10.0.0" + glob "^7.1.6" + minimatch "^3.0.4" + parse-author "^2.0.0" + sort-object-keys "^1.1.3" + sort-order "^1.0.1" + +prettier-plugin-solidity@^1.0.0-beta.17: + version "1.0.0-beta.17" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.17.tgz#fc0fe977202b6503763a338383efeceaa6c7661e" + integrity sha512-YFkxV/rHi1mphi17/XKcJ9QjZlb+L/J0yY2erix21BZfzPv2BN9dfmSRGr/poDp/FBOFSW+jteP2BCMe7HndVQ== + dependencies: + "@solidity-parser/parser" "^0.13.2" + emoji-regex "^9.2.2" + escape-string-regexp "^4.0.0" + semver "^7.3.5" + solidity-comments-extractor "^0.0.7" + string-width "^4.2.2" + +prettier@^1.14.3: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + +prettier@^2.1.2, prettier@^2.3.1, prettier@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" + integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== + +printj@~1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" + integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== + +private@^0.1.6, private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + +promise-to-callback@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" + integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= + dependencies: + is-fn "^1.0.0" + set-immediate-shim "^1.0.1" + +promise@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" + integrity sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q== + dependencies: + asap "~2.0.6" + +promzard@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" + integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= + dependencies: + read "1" + +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + +protocols@^1.1.0, protocols@^1.4.0: + version "1.4.8" + resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" + integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== + +proxy-addr@~2.0.5: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pull-cat@^1.1.9: + version "1.1.11" + resolved "https://registry.yarnpkg.com/pull-cat/-/pull-cat-1.1.11.tgz#b642dd1255da376a706b6db4fa962f5fdb74c31b" + integrity sha1-tkLdElXaN2pwa220+pYvX9t0wxs= + +pull-defer@^0.2.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/pull-defer/-/pull-defer-0.2.3.tgz#4ee09c6d9e227bede9938db80391c3dac489d113" + integrity sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA== + +pull-level@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pull-level/-/pull-level-2.0.4.tgz#4822e61757c10bdcc7cf4a03af04c92734c9afac" + integrity sha512-fW6pljDeUThpq5KXwKbRG3X7Ogk3vc75d5OQU/TvXXui65ykm+Bn+fiktg+MOx2jJ85cd+sheufPL+rw9QSVZg== + dependencies: + level-post "^1.0.7" + pull-cat "^1.1.9" + pull-live "^1.0.1" + pull-pushable "^2.0.0" + pull-stream "^3.4.0" + pull-window "^2.1.4" + stream-to-pull-stream "^1.7.1" + +pull-live@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pull-live/-/pull-live-1.0.1.tgz#a4ecee01e330155e9124bbbcf4761f21b38f51f5" + integrity sha1-pOzuAeMwFV6RJLu89HYfIbOPUfU= + dependencies: + pull-cat "^1.1.9" + pull-stream "^3.4.0" + +pull-pushable@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/pull-pushable/-/pull-pushable-2.2.0.tgz#5f2f3aed47ad86919f01b12a2e99d6f1bd776581" + integrity sha1-Xy867UethpGfAbEqLpnW8b13ZYE= + +pull-stream@^3.2.3, pull-stream@^3.4.0, pull-stream@^3.6.8: + version "3.6.14" + resolved "https://registry.yarnpkg.com/pull-stream/-/pull-stream-3.6.14.tgz#529dbd5b86131f4a5ed636fdf7f6af00781357ee" + integrity sha512-KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew== + +pull-window@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/pull-window/-/pull-window-2.1.4.tgz#fc3b86feebd1920c7ae297691e23f705f88552f0" + integrity sha1-/DuG/uvRkgx64pdpHiP3BfiFUvA= + dependencies: + looper "^2.0.0" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +q@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +qs@^6.4.0, qs@^6.7.0, qs@^6.9.4: + version "6.10.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" + integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== + dependencies: + side-channel "^1.0.4" + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +query-string@^6.13.8: + version "6.14.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" + integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +quick-lru@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" + integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +raw-body@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" + integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== + dependencies: + bytes "3.1.0" + http-errors "1.7.3" + iconv-lite "0.4.24" + unpipe "1.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-cmd-shim@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz#4a50a71d6f0965364938e9038476f7eede3928d9" + integrity sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw== + +read-package-json-fast@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz#323ca529630da82cb34b36cc0b996693c98c2b83" + integrity sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ== + dependencies: + json-parse-even-better-errors "^2.3.0" + npm-normalize-package-bin "^1.0.1" + +read-package-json@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.2.tgz#6992b2b66c7177259feb8eaac73c3acd28b9222a" + integrity sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA== + dependencies: + glob "^7.1.1" + json-parse-even-better-errors "^2.3.0" + normalize-package-data "^2.0.0" + npm-normalize-package-bin "^1.0.0" + +read-package-json@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-3.0.1.tgz#c7108f0b9390257b08c21e3004d2404c806744b9" + integrity sha512-aLcPqxovhJTVJcsnROuuzQvv6oziQx4zd3JvG0vGCL5MjTONUc4uJ90zCBC6R7W7oUKBNoR/F8pkyfVwlbxqng== + dependencies: + glob "^7.1.1" + json-parse-even-better-errors "^2.3.0" + normalize-package-data "^3.0.0" + npm-normalize-package-bin "^1.0.0" + +read-package-json@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-4.1.1.tgz#153be72fce801578c1c86b8ef2b21188df1b9eea" + integrity sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw== + dependencies: + glob "^7.1.1" + json-parse-even-better-errors "^2.3.0" + normalize-package-data "^3.0.0" + npm-normalize-package-bin "^1.0.0" + +read-package-tree@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" + integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw== + dependencies: + read-package-json "^2.0.0" + readdir-scoped-modules "^1.0.0" + util-promisify "^2.1.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= + dependencies: + find-up "^2.0.0" + read-pkg "^3.0.0" + +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== + dependencies: + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + +read@1, read@~1.0.1: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= + dependencies: + mute-stream "~0.0.4" + +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.0, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^1.0.33: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@~1.0.15: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readdir-scoped-modules@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" + integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== + dependencies: + debuglog "^1.0.1" + dezalgo "^1.0.0" + graceful-fs "^4.1.2" + once "^1.3.0" + +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + dependencies: + resolve "^1.1.6" + +recursive-readdir@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== + dependencies: + minimatch "3.0.4" + +redent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" + integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== + dependencies: + indent-string "^4.0.0" + strip-indent "^3.0.0" + +regenerate@^1.2.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexp.prototype.flags@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" + integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +regexpp@^3.0.0, regexpp@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= + dependencies: + jsesc "~0.5.0" + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +req-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" + integrity sha1-1AgrTURZgDZkD7c93qAe1T20nrw= + dependencies: + req-from "^2.0.0" + +req-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" + integrity sha1-10GI5H+TeW9Kpx327jWuaJ8+DnA= + dependencies: + resolve-from "^3.0.0" + +request-promise-core@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" + integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== + dependencies: + lodash "^4.17.19" + +request-promise-native@^1.0.5: + version "1.0.9" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" + integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== + dependencies: + request-promise-core "1.1.4" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.79.0, request@^2.85.0, request@^2.88.0, request@^2.88.2: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= + +require-from-string@^2.0.0, require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= + +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0, resolve@^1.8.1, resolve@~1.20.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +resumer@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" + integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= + dependencies: + through "~2.3.4" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +rimraf@^2.2.8, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3, rlp@^2.2.4, rlp@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" + integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== + dependencies: + bn.js "^4.11.1" + +run-async@^2.2.0, run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + +rxjs@6, rxjs@^6.4.0, rxjs@^6.6.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-event-emitter@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" + integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== + dependencies: + events "^3.0.0" + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sc-istanbul@^0.4.5: + version "0.4.6" + resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" + integrity sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g== + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + +scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +scryptsy@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" + integrity sha1-oyJfpLJST4AnAHYeKFW987LZIWM= + dependencies: + pbkdf2 "^3.0.3" + +secp256k1@^3.0.1: + version "3.8.0" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" + integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== + dependencies: + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" + drbg.js "^1.0.1" + elliptic "^6.5.2" + nan "^2.14.0" + safe-buffer "^5.1.2" + +secp256k1@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" + integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== + dependencies: + elliptic "^6.5.2" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +seedrandom@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.1.tgz#eb3dde015bcf55df05a233514e5df44ef9dce083" + integrity sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg== + +semaphore-async-await@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" + integrity sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo= + +semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" + integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +semver@~5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== + +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +servify@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== + dependencies: + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +sha1@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" + integrity sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg= + dependencies: + charenc ">= 0.0.1" + crypt ">= 0.0.1" + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shelljs@^0.8.3: + version "0.8.4" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" + integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^2.7.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" + integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" + +simple-get@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" + integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== + dependencies: + decompress-response "^4.2.0" + once "^1.3.1" + simple-concat "^1.0.0" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slide@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= + +smart-buffer@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +snyk@^1.677.0: + version "1.700.0" + resolved "https://registry.yarnpkg.com/snyk/-/snyk-1.700.0.tgz#a7739a60d0309a942d2756847ede0240e28266e8" + integrity sha512-nhhgv2Dh8Wh/qrt5gjS+RrQjEUfwEOU4W6KZnnQrmVAfFwZ4Uis+pXcoTTJtsg/xJ0/eXV/v2UxA6PKPkYMeOw== + +socks-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz#032fb583048a29ebffec2e6a73fca0761f48177e" + integrity sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ== + dependencies: + agent-base "^6.0.2" + debug "4" + socks "^2.3.3" + +socks-proxy-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.0.0.tgz#9f8749cdc05976505fa9f9a958b1818d0e60573b" + integrity sha512-FIgZbQWlnjVEQvMkylz64/rUggGtrKstPnx8OZyYFG0tAFR8CSBtpXxSwbFLHyeXFn/cunFL7MpuSOvDSOPo9g== + dependencies: + agent-base "^6.0.2" + debug "^4.3.1" + socks "^2.6.1" + +socks@^2.3.3, socks@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" + integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA== + dependencies: + ip "^1.1.5" + smart-buffer "^4.1.0" + +solc@0.6.12, solc@^0.6.3: + version "0.6.12" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.12.tgz#48ac854e0c729361b22a7483645077f58cba080e" + integrity sha512-Lm0Ql2G9Qc7yPP2Ba+WNmzw2jwsrd3u4PobHYlSOxaut3TtUbj9+5ZrT6f4DUpNPEoBaFUOEg9Op9C0mk7ge9g== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solc@0.7.6: + version "0.7.6" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.6.tgz#21fc5dc11b85fcc518c181578b454f3271c27252" + integrity sha512-WsR/W7CXwh2VnmZapB4JrsDeLlshoKBz5Pz/zYNulB6LBsOEHI2Zj/GeKLMFcvv57OHiXHvxq5ZOQB+EdqxlxQ== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solc@^0.4.20: + version "0.4.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" + integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== + dependencies: + fs-extra "^0.30.0" + memorystream "^0.3.1" + require-from-string "^1.1.0" + semver "^5.3.0" + yargs "^4.7.1" + +solhint@^3.3.6: + version "3.3.6" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.6.tgz#abe9af185a9a7defefba480047b3e42cbe9a1210" + integrity sha512-HWUxTAv2h7hx3s3hAab3ifnlwb02ZWhwFU/wSudUHqteMS3ll9c+m1FlGn9V8ztE2rf3Z82fQZA005Wv7KpcFA== + dependencies: + "@solidity-parser/parser" "^0.13.2" + ajv "^6.6.1" + antlr4 "4.7.1" + ast-parents "0.0.1" + chalk "^2.4.2" + commander "2.18.0" + cosmiconfig "^5.0.7" + eslint "^5.6.0" + fast-diff "^1.1.2" + glob "^7.1.3" + ignore "^4.0.6" + js-yaml "^3.12.0" + lodash "^4.17.11" + semver "^6.3.0" + optionalDependencies: + prettier "^1.14.3" + +solidity-comments-extractor@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" + integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== + +solidity-coverage@^0.7.16: + version "0.7.17" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.17.tgz#5139de8f6666d4755d88f453d8e35632a7bb3444" + integrity sha512-Erw2hd2xdACAvDX8jUdYkmgJlIIazGznwDJA5dhRaw4def2SisXN9jUjneeyOZnl/E7j6D3XJYug4Zg9iwodsg== + dependencies: + "@solidity-parser/parser" "^0.13.2" + "@truffle/provider" "^0.2.24" + chalk "^2.4.2" + death "^1.1.0" + detect-port "^1.3.0" + fs-extra "^8.1.0" + ganache-cli "^6.12.2" + ghost-testrpc "^0.0.2" + global-modules "^2.0.0" + globby "^10.0.1" + jsonschema "^1.2.4" + lodash "^4.17.15" + node-emoji "^1.10.0" + pify "^4.0.1" + recursive-readdir "^2.2.2" + sc-istanbul "^0.4.5" + semver "^7.3.4" + shelljs "^0.8.3" + web3-utils "^1.3.0" + +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= + dependencies: + is-plain-obj "^1.0.0" + +sort-keys@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-4.2.0.tgz#6b7638cee42c506fff8c1cecde7376d21315be18" + integrity sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg== + dependencies: + is-plain-obj "^2.0.0" + +sort-object-keys@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" + integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== + +sort-order@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sort-order/-/sort-order-1.0.1.tgz#d822b8cdb90ea6a9df968c4bd45987cf548199e6" + integrity sha1-2CK4zbkOpqnfloxL1FmHz1SBmeY= + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@0.5.12: + version "0.5.12" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== + dependencies: + source-map "^0.5.6" + +source-map-support@^0.5.13: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= + dependencies: + amdefine ">=0.0.4" + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.10" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== + +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +split2@^3.0.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + +split@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== + dependencies: + through "2" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +ssri@^8.0.0, ssri@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" + integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== + dependencies: + minipass "^3.1.1" + +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= + +stream-to-pull-stream@^1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz#4161aa2d2eb9964de60bfa1af7feaf917e874ece" + integrity sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg== + dependencies: + looper "^3.0.0" + pull-stream "^3.2.3" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trim@~1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz#6014689baf5efaf106ad031a5fa45157666ed1bd" + integrity sha512-hWCk/iqf7lp0/AgTF7/ddO1IWtSNPASjlzCicV5irAVdE1grjsneK26YG6xACMBEdCvO8fUST0UzDMh/2Qy+9Q== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= + dependencies: + is-hex-prefixed "1.0.0" + +strip-indent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" + integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== + dependencies: + min-indent "^1.0.0" + +strip-json-comments@2.0.1, strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strong-log-transformer@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" + integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== + dependencies: + duplexer "^0.1.1" + minimist "^1.2.0" + through "^2.3.4" + +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= + dependencies: + has-flag "^1.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + +sync-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" + integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== + dependencies: + http-response-object "^3.0.1" + sync-rpc "^1.2.1" + then-request "^6.0.0" + +sync-rpc@^1.2.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" + integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== + dependencies: + get-port "^3.1.0" + +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +table@^6.0.9: + version "6.7.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" + integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== + dependencies: + ajv "^8.0.1" + lodash.clonedeep "^4.5.0" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + +tape@^4.6.3: + version "4.14.0" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.14.0.tgz#e4d46097e129817175b90925f2385f6b1bcfa826" + integrity sha512-z0+WrUUJuG6wIdWrl4W3rTte2CR26G6qcPOj3w1hfRdcmhF3kHBhOBW9VHsPVAkz08ZmGzp7phVpDupbLzrYKQ== + dependencies: + call-bind "~1.0.2" + deep-equal "~1.1.1" + defined "~1.0.0" + dotignore "~0.1.2" + for-each "~0.3.3" + glob "~7.1.7" + has "~1.0.3" + inherits "~2.0.4" + is-regex "~1.1.3" + minimist "~1.2.5" + object-inspect "~1.11.0" + resolve "~1.20.0" + resumer "~0.0.0" + string.prototype.trim "~1.2.4" + through "~2.3.8" + +tar-fs@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-stream@^2.1.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + +tar@^4.0.2, tar@^4.4.12: + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== + dependencies: + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + +tar@^6.0.2, tar@^6.1.0: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + +temp-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= + +temp-write@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-4.0.0.tgz#cd2e0825fc826ae72d201dc26eef3bf7e6fc9320" + integrity sha512-HIeWmj77uOOHb0QX7siN3OtwV3CTntquin6TNVg6SHOqCP3hYKmox90eeFOGaY1MqJ9WYDDjkyZrW6qS5AWpbw== + dependencies: + graceful-fs "^4.1.15" + is-stream "^2.0.0" + make-dir "^3.0.0" + temp-dir "^1.0.0" + uuid "^3.3.2" + +test-value@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= + dependencies: + array-back "^1.0.3" + typical "^2.6.0" + +testrpc@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" + integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== + +text-extensions@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" + integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +then-request@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" + integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== + dependencies: + "@types/concat-stream" "^1.6.0" + "@types/form-data" "0.0.33" + "@types/node" "^8.0.0" + "@types/qs" "^6.2.31" + caseless "~0.12.0" + concat-stream "^1.6.0" + form-data "^2.2.0" + http-basic "^8.1.1" + http-response-object "^3.0.1" + promise "^8.0.0" + qs "^6.4.0" + +through2@^2.0.0, through2@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through2@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" + integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== + dependencies: + readable-stream "3" + +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3.4, through@~2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + +tmp@0.0.33, tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +tmp@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877" + integrity sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw== + dependencies: + rimraf "^2.6.3" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +tough-cookie@^2.3.3, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== + dependencies: + punycode "^2.1.1" + +trim-newlines@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" + integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== + +trim-off-newlines@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +"true-case-path@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-2.2.1.tgz#c5bf04a5bbec3fd118be4084461b3a27c4d796bf" + integrity sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q== + +ts-essentials@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" + integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== + +ts-essentials@^6.0.3: + version "6.0.7" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-6.0.7.tgz#5f4880911b7581a873783740ce8b94da163d18a6" + integrity sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw== + +ts-essentials@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + +ts-generator@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.1.1.tgz#af46f2fb88a6db1f9785977e9590e7bcd79220ab" + integrity sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ== + dependencies: + "@types/mkdirp" "^0.5.2" + "@types/prettier" "^2.1.1" + "@types/resolve" "^0.0.8" + chalk "^2.4.1" + glob "^7.1.2" + mkdirp "^0.5.1" + prettier "^2.1.2" + resolve "^1.8.1" + ts-essentials "^1.0.0" + +ts-node@^10.2.0: + version "10.2.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.1.tgz#4cc93bea0a7aba2179497e65bb08ddfc198b3ab5" + integrity sha512-hCnyOyuGmD5wHleOQX6NIjJtYVIO8bPP8F2acWkB4W06wdlkgyvJtubO/I9NkI88hCFECbsEgoLc0VNkYmcSfw== + dependencies: + "@cspotcode/source-map-support" "0.6.1" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + yn "3.1.1" + +tsconfig-paths@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" + integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y= + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl-util@^0.15.0: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +tweetnacl@^1.0.0, tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.18.0: + version "0.18.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" + integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== + +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" + integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== + +typechain@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-3.0.0.tgz#d5a47700831f238e43f7429b987b4bb54849b92e" + integrity sha512-ft4KVmiN3zH4JUFu2WJBrwfHeDf772Tt2d8bssDTo/YcckKW2D+OwFrHXRC6hJvO3mHjFQTihoMV6fJOi0Hngg== + dependencies: + command-line-args "^4.0.7" + debug "^4.1.1" + fs-extra "^7.0.0" + js-sha3 "^0.8.0" + lodash "^4.17.15" + ts-essentials "^6.0.3" + ts-generator "^0.1.1" + +typechain@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-5.1.2.tgz#c8784d6155a8e69397ca47f438a3b4fb2aa939da" + integrity sha512-FuaCxJd7BD3ZAjVJoO+D6TnqKey3pQdsqOBsC83RKYWKli5BDhdf0TPkwfyjt20TUlZvOzJifz+lDwXsRkiSKA== + dependencies: + "@types/prettier" "^2.1.1" + command-line-args "^4.0.7" + debug "^4.1.1" + fs-extra "^7.0.0" + glob "^7.1.6" + js-sha3 "^0.8.0" + lodash "^4.17.15" + mkdirp "^1.0.4" + prettier "^2.1.2" + ts-essentials "^7.0.1" + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +typescript@^4.3.5: + version "4.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" + integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== + +typewise-core@^1.2, typewise-core@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/typewise-core/-/typewise-core-1.2.0.tgz#97eb91805c7f55d2f941748fa50d315d991ef195" + integrity sha1-l+uRgFx/VdL5QXSPpQ0xXZke8ZU= + +typewise@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typewise/-/typewise-1.0.3.tgz#1067936540af97937cc5dcf9922486e9fa284651" + integrity sha1-EGeTZUCvl5N8xdz5kiSG6fooRlE= + dependencies: + typewise-core "^1.2.0" + +typewiselite@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e" + integrity sha1-yIgvobsQksBgBal/NO9chQjjZk4= + +typical@^2.6.0, typical@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= + +u2f-api@0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720" + integrity sha512-fqLNg8vpvLOD5J/z4B6wpPg4Lvowz1nJ9xdHcCzdUPKcFE/qNCceV2gNZxSJd5vhAZemHr/K/hbzVA0zxB5mkg== + +uglify-js@^3.1.4: + version "3.14.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.2.tgz#d7dd6a46ca57214f54a2d0a43cad0f35db82ac99" + integrity sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A== + +uid-number@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + +umask@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" + integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= + +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + +underscore@1.12.1: + version "1.12.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" + integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== + +underscore@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unorm@^1.3.3: + version "1.6.0" + resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" + integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" + integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + +url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" + integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= + +url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +usb@^1.6.3: + version "1.7.2" + resolved "https://registry.yarnpkg.com/usb/-/usb-1.7.2.tgz#9b2072b400f3fa311079a41cbb4459323cbd5ab0" + integrity sha512-SfVSItgsD9+YfEpcK1UZ8tQ7e8GdxQ0xoQtB773omNBKTVj3IuFJNKjwSnpE58FGcV4tUoKLHmBMc018RUY5SA== + dependencies: + bindings "^1.4.0" + node-addon-api "3.0.2" + prebuild-install "^5.3.3" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +utf-8-validate@^5.0.2: + version "5.0.5" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1" + integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ== + dependencies: + node-gyp-build "^4.2.0" + +utf8@3.0.0, utf8@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util-promisify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" + integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM= + dependencies: + object.getownpropertydescriptors "^2.0.3" + +util.promisify@^1.0.0, util.promisify@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" + integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + for-each "^0.3.3" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.1" + +util@^0.12.0: + version "0.12.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" + integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + safe-buffer "^5.1.2" + which-typed-array "^1.1.2" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= + +uuid@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + +validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +validate-npm-package-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" + integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= + dependencies: + builtins "^1.0.3" + +varint@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +wcwidth@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +web3-bzz@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" + integrity sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + +web3-bzz@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.4.0.tgz#78a5db3544624b6709b2554094d931639f6f85b8" + integrity sha512-KhXmz8hcfGsqhplB7NrekAeNkG2edHjXV4bL3vnXde8RGMWpabpSNxuwiGv+dv/3nWlrHatH0vGooONYCkP5TA== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.12.1" + +web3-bzz@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.5.2.tgz#a04feaa19462cff6d5a8c87dad1aca4619d9dfc8" + integrity sha512-W/sPCdA+XQ9duUYKHAwf/g69cbbV8gTCRsa1MpZwU7spXECiyJ2EvD/QzAZ+UpJk3GELXFF/fUByeZ3VRQKF2g== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + +web3-core-helpers@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" + integrity sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.11" + web3-utils "1.2.11" + +web3-core-helpers@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.4.0.tgz#5cbed46dd325b9498f6fafb15aed4a4295cce514" + integrity sha512-8Ebq0nmRfzw7iPoXbIRHEWOuPh+1cOV3OOEvKm5Od3McZOjja914vdk+DM3MgmbSpDzYJRFM6KoF0+Z/U/1bPw== + dependencies: + underscore "1.12.1" + web3-eth-iban "1.4.0" + web3-utils "1.4.0" + +web3-core-helpers@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.5.2.tgz#b6bd5071ca099ba3f92dfafb552eed2b70af2795" + integrity sha512-U7LJoeUdQ3aY9t5gU7t/1XpcApsWm+4AcW5qKl/44ZxD44w0Dmsq1c5zJm3GuLr/a9MwQfXK4lpmvxVQWHHQRg== + dependencies: + web3-eth-iban "1.5.2" + web3-utils "1.5.2" + +web3-core-method@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" + integrity sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.9.1" + web3-core-helpers "1.2.11" + web3-core-promievent "1.2.11" + web3-core-subscriptions "1.2.11" + web3-utils "1.2.11" + +web3-core-method@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.4.0.tgz#0e26001e4029d359731b25a82e0bed4d1bef8392" + integrity sha512-KW9922fEkgKu8zDcJR8Iikg/epsuWMArAUVTipKVwzAI5TVdvOMRgSe/b7IIDRUIeoeXMARmJ+PrAlx+IU2acQ== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + underscore "1.12.1" + web3-core-helpers "1.4.0" + web3-core-promievent "1.4.0" + web3-core-subscriptions "1.4.0" + web3-utils "1.4.0" + +web3-core-method@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.5.2.tgz#d1d602657be1000a29d11e3ca3bf7bc778dea9a5" + integrity sha512-/mC5t9UjjJoQmJJqO5nWK41YHo+tMzFaT7Tp7jDCQsBkinE68KsUJkt0jzygpheW84Zra0DVp6q19gf96+cugg== + dependencies: + "@ethereumjs/common" "^2.4.0" + "@ethersproject/transactions" "^5.0.0-beta.135" + web3-core-helpers "1.5.2" + web3-core-promievent "1.5.2" + web3-core-subscriptions "1.5.2" + web3-utils "1.5.2" + +web3-core-promievent@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" + integrity sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA== + dependencies: + eventemitter3 "4.0.4" + +web3-core-promievent@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.4.0.tgz#531644dab287e83653d983aeb3d9daa0f894f775" + integrity sha512-YEwko22kcry7lHwbe0k80BrjXCZ+73jMdvZtptRH5k2B+XZ1XtmXwYL1PFIlZy9V0zgZijdg+3GabCnAHjVXAw== + dependencies: + eventemitter3 "4.0.4" + +web3-core-promievent@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.5.2.tgz#2dc9fe0e5bbeb7c360fc1aac5f12b32d9949a59b" + integrity sha512-5DacbJXe98ozSor7JlkTNCy6G8945VunRRkPxMk98rUrg60ECVEM/vuefk1atACzjQsKx6tmLZuHxbJQ64TQeQ== + dependencies: + eventemitter3 "4.0.4" + +web3-core-requestmanager@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" + integrity sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.11" + web3-providers-http "1.2.11" + web3-providers-ipc "1.2.11" + web3-providers-ws "1.2.11" + +web3-core-requestmanager@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.4.0.tgz#39043da0e1a1b1474f85af531df786e6036ef4b3" + integrity sha512-qIwKJO5T0KkUAIL7y9JRSUkk3+LaCwghdUHK8FzbMvq6R1W9lgCBnccqFGEI76EJjHvsiw4kEKBEXowdB3xenQ== + dependencies: + underscore "1.12.1" + util "^0.12.0" + web3-core-helpers "1.4.0" + web3-providers-http "1.4.0" + web3-providers-ipc "1.4.0" + web3-providers-ws "1.4.0" + +web3-core-requestmanager@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.5.2.tgz#43ccc00779394c941b28e6e07e217350fd1ded71" + integrity sha512-oRVW9OrAsXN2JIZt68OEg1Mb1A9a/L3JAGMv15zLEFEnJEGw0KQsGK1ET2kvZBzvpFd5G0EVkYCnx7WDe4HSNw== + dependencies: + util "^0.12.0" + web3-core-helpers "1.5.2" + web3-providers-http "1.5.2" + web3-providers-ipc "1.5.2" + web3-providers-ws "1.5.2" + +web3-core-subscriptions@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" + integrity sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + +web3-core-subscriptions@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.4.0.tgz#ec44e5cfe7bffe0c2a9da330007f88e08e1b5837" + integrity sha512-/UMC9rSLEd0U+h6Qanx6CM29o/cfUyGWgl/HM6O/AIuth9G+34QBuKDa11Gr2Qg6F8Lr9tSFm8QIGVniOx9i5A== + dependencies: + eventemitter3 "4.0.4" + underscore "1.12.1" + web3-core-helpers "1.4.0" + +web3-core-subscriptions@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.5.2.tgz#8eaebde44f81fc13c45b555c4422fe79393da9cf" + integrity sha512-hapI4rKFk22yurtIv0BYvkraHsM7epA4iI8Np+HuH6P9DD0zj/llaps6TXLM9HyacLBRwmOLZmr+pHBsPopUnQ== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.5.2" + +web3-core@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" + integrity sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-requestmanager "1.2.11" + web3-utils "1.2.11" + +web3-core@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.4.0.tgz#db830ed9fa9cca37479c501f0e5bc4201493b46b" + integrity sha512-VRNMNqwzvPeKIet2l9BMApPHoUv0UqwaZH0lZJhG2RBko42w9Xls+pQwfVNSV16j04t/ehm1aLRV2Sx6lzVfRg== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.4.0" + web3-core-method "1.4.0" + web3-core-requestmanager "1.4.0" + web3-utils "1.4.0" + +web3-core@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.5.2.tgz#ca2b9b1ed3cf84d48b31c9bb91f7628f97cfdcd5" + integrity sha512-sebMpQbg3kbh3vHUbHrlKGKOxDWqjgt8KatmTBsTAWj/HwWYVDzeX+2Q84+swNYsm2DrTBVFlqTErFUwPBvyaA== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-core-requestmanager "1.5.2" + web3-utils "1.5.2" + +web3-eth-abi@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" + integrity sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg== + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + underscore "1.9.1" + web3-utils "1.2.11" + +web3-eth-abi@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.4.0.tgz#83f9f0ce48fd6d6b233a30a33bd674b3518e472b" + integrity sha512-FtmWipG/dSSkTGFb72JCwky7Jd0PIvd0kGTInWQwIEZlw5qMOYl61WZ9gwfojFHvHF6q1eKncerQr+MRXHO6zg== + dependencies: + "@ethersproject/abi" "5.0.7" + underscore "1.12.1" + web3-utils "1.4.0" + +web3-eth-abi@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.5.2.tgz#b627eada967f39ae4657ddd61b693cb00d55cb29" + integrity sha512-P3bJbDR5wib4kWGfVeBKBVi27T+AiHy4EJxYM6SMNbpm3DboLDdisu9YBd6INMs8rzxgnprBbGmmyn4jKIDKAA== + dependencies: + "@ethersproject/abi" "5.0.7" + web3-utils "1.5.2" + +web3-eth-accounts@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" + integrity sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw== + dependencies: + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + scrypt-js "^3.0.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-utils "1.2.11" + +web3-eth-accounts@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.4.0.tgz#25fc4b2b582a16b77c1492f27f58c59481156068" + integrity sha512-tETHBvfO3Z7BXZ7HJIwuX7ol6lPefP55X7b4IiX82C1PujHwsxENY7c/3wyxzqKoDyH6zfyEQo17yhxkhsM1oA== + dependencies: + "@ethereumjs/common" "^2.3.0" + "@ethereumjs/tx" "^3.2.1" + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-util "^7.0.10" + scrypt-js "^3.0.1" + underscore "1.12.1" + uuid "3.3.2" + web3-core "1.4.0" + web3-core-helpers "1.4.0" + web3-core-method "1.4.0" + web3-utils "1.4.0" + +web3-eth-accounts@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.5.2.tgz#cf506c21037fa497fe42f1f055980ce4acf83731" + integrity sha512-F8mtzxgEhxfLc66vPi0Gqd6mpscvvk7Ua575bsJ1p9J2X/VtuKgDgpWcU4e4LKeROQ+ouCpAG9//0j9jQuij3A== + dependencies: + "@ethereumjs/common" "^2.3.0" + "@ethereumjs/tx" "^3.2.1" + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-util "^7.0.10" + scrypt-js "^3.0.1" + uuid "3.3.2" + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-utils "1.5.2" + +web3-eth-contract@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" + integrity sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow== + dependencies: + "@types/bn.js" "^4.11.5" + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-promievent "1.2.11" + web3-core-subscriptions "1.2.11" + web3-eth-abi "1.2.11" + web3-utils "1.2.11" + +web3-eth-contract@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.4.0.tgz#604187d1e44365fa0c0592e61ac5a1b5fd7c2eaa" + integrity sha512-GfIhOzfp/ZXKd+1tFEH3ePq0DEsvq9XO5tOsI0REDtEYUj2GNxO5e/x/Fhekk7iLZ7xAqSzDMweFruDQ1fxn0A== + dependencies: + "@types/bn.js" "^4.11.5" + underscore "1.12.1" + web3-core "1.4.0" + web3-core-helpers "1.4.0" + web3-core-method "1.4.0" + web3-core-promievent "1.4.0" + web3-core-subscriptions "1.4.0" + web3-eth-abi "1.4.0" + web3-utils "1.4.0" + +web3-eth-contract@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.5.2.tgz#ffbd799fd01e36596aaadefba323e24a98a23c2f" + integrity sha512-4B8X/IPFxZCTmtENpdWXtyw5fskf2muyc3Jm5brBQRb4H3lVh1/ZyQy7vOIkdphyaXu4m8hBLHzeyKkd37mOUg== + dependencies: + "@types/bn.js" "^4.11.5" + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-core-promievent "1.5.2" + web3-core-subscriptions "1.5.2" + web3-eth-abi "1.5.2" + web3-utils "1.5.2" + +web3-eth-ens@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" + integrity sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-promievent "1.2.11" + web3-eth-abi "1.2.11" + web3-eth-contract "1.2.11" + web3-utils "1.2.11" + +web3-eth-ens@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.4.0.tgz#4e66dfc3bdc6439553482972ffb2a181f1c12cbc" + integrity sha512-jR1KorjU1erpYFpFzsMXAWZnHhqUqWPBq/4+BGVj7/pJ43+A3mrE1eB0zl91Dwc1RTNwOhB02iOj1c9OlpGr3g== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + underscore "1.12.1" + web3-core "1.4.0" + web3-core-helpers "1.4.0" + web3-core-promievent "1.4.0" + web3-eth-abi "1.4.0" + web3-eth-contract "1.4.0" + web3-utils "1.4.0" + +web3-eth-ens@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.5.2.tgz#ecb3708f0e8e2e847e9d89e8428da12c30bba6a4" + integrity sha512-/UrLL42ZOCYge+BpFBdzG8ICugaRS4f6X7PxJKO+zAt+TwNgBpjuWfW/ZYNcuqJun/ZyfcTuj03TXqA1RlNhZQ== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-promievent "1.5.2" + web3-eth-abi "1.5.2" + web3-eth-contract "1.5.2" + web3-utils "1.5.2" + +web3-eth-iban@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" + integrity sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ== + dependencies: + bn.js "^4.11.9" + web3-utils "1.2.11" + +web3-eth-iban@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.4.0.tgz#b54902c019d677b6356d838b3e964f925017c143" + integrity sha512-YNx748VzwiBe0gvtZjvU9BQsooZ9s9sAlmiDWJOMcvMbUTDhC7SvxA7vV/vrnOxL6oGHRh0U/azsYNxxlKiTBw== + dependencies: + bn.js "^4.11.9" + web3-utils "1.4.0" + +web3-eth-iban@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.5.2.tgz#f390ad244ef8a6c94de7c58736b0b80a484abc8e" + integrity sha512-C04YDXuSG/aDwOHSX+HySBGb0KraiAVt+/l1Mw7y/fCUrKC/K0yYzMYqY/uYOcvLtepBPsC4ZfUYWUBZ2PO8Vg== + dependencies: + bn.js "^4.11.9" + web3-utils "1.5.2" + +web3-eth-personal@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" + integrity sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-net "1.2.11" + web3-utils "1.2.11" + +web3-eth-personal@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.4.0.tgz#77420d1f49e36f8c461a61aeabac16045d8592c0" + integrity sha512-8Ip6xZ8plmWqAD4ESbKUIPVV9gfTAFFm0ff1FQIw9I9kYvFlBIPzukvm852w2SftGem+/iRH+2+2mK7HvuKXZQ== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.4.0" + web3-core-helpers "1.4.0" + web3-core-method "1.4.0" + web3-net "1.4.0" + web3-utils "1.4.0" + +web3-eth-personal@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.5.2.tgz#043335a19ab59e119ba61e3bd6c3b8cde8120490" + integrity sha512-nH5N2GiVC0C5XeMEKU16PeFP3Hb3hkPvlR6Tf9WQ+pE+jw1c8eaXBO1CJQLr15ikhUF3s94ICyHcfjzkDsmRbA== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-net "1.5.2" + web3-utils "1.5.2" + +web3-eth@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" + integrity sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ== + dependencies: + underscore "1.9.1" + web3-core "1.2.11" + web3-core-helpers "1.2.11" + web3-core-method "1.2.11" + web3-core-subscriptions "1.2.11" + web3-eth-abi "1.2.11" + web3-eth-accounts "1.2.11" + web3-eth-contract "1.2.11" + web3-eth-ens "1.2.11" + web3-eth-iban "1.2.11" + web3-eth-personal "1.2.11" + web3-net "1.2.11" + web3-utils "1.2.11" + +web3-eth@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.4.0.tgz#6ca2dcbd72d128a225ada1fec0d1e751f8df5200" + integrity sha512-L990eMJeWh4h/Z3M8MJb9HrKq8tqvzdGZ7igdzd6Ba3B/VKgGFAJ/4XIqtLwAJ1Wg5Cj8my60tYY+34c2cLefw== + dependencies: + underscore "1.12.1" + web3-core "1.4.0" + web3-core-helpers "1.4.0" + web3-core-method "1.4.0" + web3-core-subscriptions "1.4.0" + web3-eth-abi "1.4.0" + web3-eth-accounts "1.4.0" + web3-eth-contract "1.4.0" + web3-eth-ens "1.4.0" + web3-eth-iban "1.4.0" + web3-eth-personal "1.4.0" + web3-net "1.4.0" + web3-utils "1.4.0" + +web3-eth@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.5.2.tgz#0f6470df60a2a7d04df4423ca7721db8ed5ad72b" + integrity sha512-DwWQ6TCOUqvYyo7T20S7HpQDPveNHNqOn2Q2F3E8ZFyEjmqT4XsGiwvm08kB/VgQ4e/ANyq/i8PPFSYMT8JKHg== + dependencies: + web3-core "1.5.2" + web3-core-helpers "1.5.2" + web3-core-method "1.5.2" + web3-core-subscriptions "1.5.2" + web3-eth-abi "1.5.2" + web3-eth-accounts "1.5.2" + web3-eth-contract "1.5.2" + web3-eth-ens "1.5.2" + web3-eth-iban "1.5.2" + web3-eth-personal "1.5.2" + web3-net "1.5.2" + web3-utils "1.5.2" + +web3-net@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" + integrity sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg== + dependencies: + web3-core "1.2.11" + web3-core-method "1.2.11" + web3-utils "1.2.11" + +web3-net@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.4.0.tgz#eaea1562dc96ddde6f14e823d2b94886091d2049" + integrity sha512-41WkKobL+KnKC0CY0RZ1KhMMyR/hMFGlbHZQac4KtB7ro1UdXeK+RiYX+GzSr1h7j9Dj+dQZqyBs70cxmL9cPQ== + dependencies: + web3-core "1.4.0" + web3-core-method "1.4.0" + web3-utils "1.4.0" + +web3-net@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.5.2.tgz#58915d7e2dad025d2a08f02c865f3abe61c48eff" + integrity sha512-VEc9c+jfoERhbJIxnx0VPlQDot8Lm4JW/tOWFU+ekHgIiu2zFKj5YxhURIth7RAbsaRsqCb79aE+M0eI8maxVQ== + dependencies: + web3-core "1.5.2" + web3-core-method "1.5.2" + web3-utils "1.5.2" + +web3-provider-engine@14.2.1: + version "14.2.1" + resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz#ef351578797bf170e08d529cb5b02f8751329b95" + integrity sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw== + dependencies: + async "^2.5.0" + backoff "^2.5.0" + clone "^2.0.0" + cross-fetch "^2.1.0" + eth-block-tracker "^3.0.0" + eth-json-rpc-infura "^3.1.0" + eth-sig-util "^1.4.2" + ethereumjs-block "^1.2.2" + ethereumjs-tx "^1.2.0" + ethereumjs-util "^5.1.5" + ethereumjs-vm "^2.3.4" + json-rpc-error "^2.0.0" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + readable-stream "^2.2.9" + request "^2.85.0" + semaphore "^1.0.3" + ws "^5.1.1" + xhr "^2.2.0" + xtend "^4.0.1" + +web3-providers-http@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.11.tgz#1cd03442c61670572d40e4dcdf1faff8bd91e7c6" + integrity sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA== + dependencies: + web3-core-helpers "1.2.11" + xhr2-cookies "1.1.0" + +web3-providers-http@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.4.0.tgz#2d67f85fda00765c1402aede3d7e6cbacaa3091b" + integrity sha512-A9nLF4XGZfDb1KYYuKRwHY1H90Ee/0I0CqQQEELI0yuY9eca50qdCHEg3sJhvqBIG44JCm83amOGxR8wi+76tQ== + dependencies: + web3-core-helpers "1.4.0" + xhr2-cookies "1.1.0" + +web3-providers-http@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.5.2.tgz#94f95fe5572ca54aa2c2ffd42c63956436c9eb0a" + integrity sha512-dUNFJc9IMYDLZnkoQX3H4ZjvHjGO6VRVCqrBrdh84wPX/0da9dOA7DwIWnG0Gv3n9ybWwu5JHQxK4MNQ444lyA== + dependencies: + web3-core-helpers "1.5.2" + xhr2-cookies "1.1.0" + +web3-providers-ipc@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" + integrity sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + +web3-providers-ipc@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.4.0.tgz#cd14e93e2d22689a26587dd2d2101e575d1e2924" + integrity sha512-ul/tSNUI5anhdBGBV+FWFH9EJgO73/G21haFDEXvTnSJQa9/byj401H/E2Xd8BXGk+2XB+CCGLZBiuAjhhhtTA== + dependencies: + oboe "2.1.5" + underscore "1.12.1" + web3-core-helpers "1.4.0" + +web3-providers-ipc@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.5.2.tgz#68a516883c998eeddf60df4cead77baca4fb4aaa" + integrity sha512-SJC4Sivt4g9LHKlRy7cs1jkJgp7bjrQeUndE6BKs0zNALKguxu6QYnzbmuHCTFW85GfMDjhvi24jyyZHMnBNXQ== + dependencies: + oboe "2.1.5" + web3-core-helpers "1.5.2" + +web3-providers-ws@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" + integrity sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg== + dependencies: + eventemitter3 "4.0.4" + underscore "1.9.1" + web3-core-helpers "1.2.11" + websocket "^1.0.31" + +web3-providers-ws@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.4.0.tgz#a4db03fc865a73db62bc15c5da37f930517cfe08" + integrity sha512-E5XfF58RLXuCtGiMSXxXEtjceCfPli+I4MDYCKx/J/bDJ6qvLUM2OnnGEmE7pq1Z03h0xh1ZezaB/qoweK3ZIQ== + dependencies: + eventemitter3 "4.0.4" + underscore "1.12.1" + web3-core-helpers "1.4.0" + websocket "^1.0.32" + +web3-providers-ws@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.5.2.tgz#d336a93ed608b40cdcadfadd1f1bc8d32ea046e0" + integrity sha512-xy9RGlyO8MbJDuKv2vAMDkg+en+OvXG0CGTCM2BTl6l1vIdHpCa+6A/9KV2rK8aU9OBZ7/Pf+Y19517kHVl9RA== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.5.2" + websocket "^1.0.32" + +web3-shh@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" + integrity sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg== + dependencies: + web3-core "1.2.11" + web3-core-method "1.2.11" + web3-core-subscriptions "1.2.11" + web3-net "1.2.11" + +web3-shh@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.4.0.tgz#d22ff8dce16987bef73172191d9e95c3ccf0aa80" + integrity sha512-OZMkMgo+VZnu1ErhIFXW+5ExnPKQg9v8/2DHGVtNEwuC5OHYuAEF5U7MQgbxYJYwbRmxQCt/hA3VwKjnkbmSAA== + dependencies: + web3-core "1.4.0" + web3-core-method "1.4.0" + web3-core-subscriptions "1.4.0" + web3-net "1.4.0" + +web3-shh@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.5.2.tgz#a72a3d903c0708a004db94a72d934a302d880aea" + integrity sha512-wOxOcYt4Sa0AHAI8gG7RulCwVuVjSRS/M/AbFsea3XfJdN6sU13/syY7OdZNjNYuKjYTzxKYrd3dU/K2iqffVw== + dependencies: + web3-core "1.5.2" + web3-core-method "1.5.2" + web3-core-subscriptions "1.5.2" + web3-net "1.5.2" + +web3-utils@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" + integrity sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ== + dependencies: + bn.js "^4.11.9" + eth-lib "0.2.8" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + +web3-utils@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.4.0.tgz#e8cb381c81b242dc1d4ecb397200356d404410e6" + integrity sha512-b8mEhwh/J928Xk+SQFjtqrR2EGPhpknWLcIt9aCpVPVRXiqjUGo/kpOHKz0azu9c6/onEJ9tWXZt0cVjmH0N5Q== + dependencies: + bn.js "^4.11.9" + eth-lib "0.2.8" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.12.1" + utf8 "3.0.0" + +web3-utils@1.5.2, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.5.2.tgz#150982dcb1918ffc54eba87528e28f009ebc03aa" + integrity sha512-quTtTeQJHYSxAwIBOCGEcQtqdVcFWX6mCFNoqnp+mRbq+Hxbs8CGgO/6oqfBx4OvxIOfCpgJWYVHswRXnbEu9Q== + dependencies: + bn.js "^4.11.9" + eth-lib "0.2.8" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + +web3@1.2.11: + version "1.2.11" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" + integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== + dependencies: + web3-bzz "1.2.11" + web3-core "1.2.11" + web3-eth "1.2.11" + web3-eth-personal "1.2.11" + web3-net "1.2.11" + web3-shh "1.2.11" + web3-utils "1.2.11" + +web3@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.4.0.tgz#717c01723226daebab9274be5cb56644de860688" + integrity sha512-faT3pIX+1tuo+wqmUFQPe10MUGaB1UvRYxw9dmVJFLxaRAIfXErSilOf3jFhSwKbbPNkwG0bTiudCLN9JgeS7A== + dependencies: + web3-bzz "1.4.0" + web3-core "1.4.0" + web3-eth "1.4.0" + web3-eth-personal "1.4.0" + web3-net "1.4.0" + web3-shh "1.4.0" + web3-utils "1.4.0" + +web3@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.5.2.tgz#736ca2f39048c63964203dd811f519400973e78d" + integrity sha512-aapKLdO8t7Cos6tZLeeQUtCJvTiPMlLcHsHHDLSBZ/VaJEucSTxzun32M8sp3BmF4waDEmhY+iyUM1BKvtAcVQ== + dependencies: + web3-bzz "1.5.2" + web3-core "1.5.2" + web3-eth "1.5.2" + web3-eth-personal "1.5.2" + web3-net "1.5.2" + web3-shh "1.5.2" + web3-utils "1.5.2" + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + +websocket@1.0.32: + version "1.0.32" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.32.tgz#1f16ddab3a21a2d929dec1687ab21cfdc6d3dbb1" + integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +websocket@^1.0.31, websocket@^1.0.32: + version "1.0.34" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" + integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +whatwg-fetch@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== + +whatwg-url@^8.4.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== + dependencies: + lodash "^4.7.0" + tr46 "^2.1.0" + webidl-conversions "^6.1.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which-pm-runs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" + integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= + +which-typed-array@^1.1.2: + version "1.1.7" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.7.tgz#2761799b9a22d4b8660b3c1b40abaa7739691793" + integrity sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-abstract "^1.18.5" + foreach "^2.0.5" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.7" + +which@1.3.1, which@^1.1.1, which@^1.2.9, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@2.0.2, which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3, wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= + +word-wrap@^1.2.3, word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +workerpool@6.1.5: + version "6.1.5" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.5.tgz#0f7cf076b6215fd7e1da903ff6f22ddd1886b581" + integrity sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw== + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^2.4.2: + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + +write-json-file@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" + integrity sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ== + dependencies: + detect-indent "^5.0.0" + graceful-fs "^4.1.15" + make-dir "^2.1.0" + pify "^4.0.1" + sort-keys "^2.0.0" + write-file-atomic "^2.4.2" + +write-json-file@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-4.3.0.tgz#908493d6fd23225344af324016e4ca8f702dd12d" + integrity sha512-PxiShnxf0IlnQuMYOPPhPkhExoCQuTUNPOa/2JWCYTmBquU9njyyDuwRKN26IZBlp4yn1nt+Agh2HOOBl+55HQ== + dependencies: + detect-indent "^6.0.0" + graceful-fs "^4.1.15" + is-plain-obj "^2.0.0" + make-dir "^3.0.0" + sort-keys "^4.0.0" + write-file-atomic "^3.0.0" + +write-pkg@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-4.0.0.tgz#675cc04ef6c11faacbbc7771b24c0abbf2a20039" + integrity sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA== + dependencies: + sort-keys "^2.0.0" + type-fest "^0.4.1" + write-json-file "^3.2.0" + +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@^3.0.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + +ws@^5.1.1: + version "5.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d" + integrity sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA== + dependencies: + async-limiter "~1.0.0" + +ws@^7.4.6: + version "7.5.4" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.4.tgz#56bfa20b167427e138a7795de68d134fe92e21f9" + integrity sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg== + +xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== + dependencies: + xhr-request "^1.1.0" + +xhr-request@^1.0.1, xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== + dependencies: + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" + +xhr2-cookies@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" + integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= + dependencies: + cookiejar "^2.1.1" + +xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + +xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= + dependencies: + object-keys "~0.4.0" + +y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yaml@^1.10.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + integrity sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ= + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs-parser@^20.2.2, yargs-parser@^20.2.3: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@16.2.0, yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^17.0.1: + version "17.1.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.1.1.tgz#c2a8091564bdb196f7c0a67c1d12e5b85b8067ba" + integrity sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + integrity sha1-wMQpJMpKqmsObaFznfshZDn53cA= + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From f6781bc0ad1c10a025edc580140d73a31739025e Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 9 Sep 2021 01:05:04 +0200 Subject: [PATCH 062/164] update readme --- packages/v3/migration/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 72633540a..09665d52b 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -79,7 +79,7 @@ yarn hh migrate --network mainnet 1. `Migrate` will look for the network data folder or create one if it doesn't exist. -2. Run every migration file in the migrations folder by order of execution starting from the latestMigration timestamp OR the lowest number found. +2. Run every migration file in the migrations folder by order of execution starting from the latestMigration timestamp. 3. Update the state on the go. From b45cef9b129db8cf2d2cc701d577d78e4b138d4a Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 9 Sep 2021 01:54:31 +0200 Subject: [PATCH 063/164] add loader --- packages/v3/migration/engine/utils.ts | 12 ------------ packages/v3/migration/index.ts | 8 ++++---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils.ts index c676ef1e1..74b4a7879 100644 --- a/packages/v3/migration/engine/utils.ts +++ b/packages/v3/migration/engine/utils.ts @@ -1,23 +1,11 @@ /* eslint-disable @typescript-eslint/no-var-requires */ import fs from 'fs-extra'; -import path from 'path'; export const importCsjOrEsModule = (filePath: string) => { const imported = require(filePath); return imported.default || imported; }; -export const initEngineAndStartTask = (pathToAction: string) => { - return (taskArgs: any, hre: any) => { - const actualPath = path.isAbsolute(pathToAction) - ? pathToAction - : path.join(hre.config.paths.root, pathToAction); - const action = importCsjOrEsModule(actualPath); - const start = importCsjOrEsModule(path.join(hre.config.paths.root, 'migration/engine/index.ts')); - return start(taskArgs, hre, action); - }; -}; - export const isMigrationFolderValid = (path: string) => { if (!fs.existsSync(path)) return false; if (!fs.readdirSync(path).find((f: string) => f === 'state.json')) return false; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index 64916aabe..6fe283e49 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,5 +1,5 @@ +import { loader } from './engine/loader'; import { defaultArgs } from './engine/types'; -import { initEngineAndStartTask } from './engine/utils'; import { task, types } from 'hardhat/config'; import path from 'path'; @@ -10,13 +10,13 @@ task('migrate', 'Migrate the network') .addFlag('ledger', 'Signing from a ledger') .addParam('ledgerPath', 'Ledger path', "m/44'/60'/0'/0", types.string) .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) - .addParam('confirmationToWait', 'Number of confirmation to wait', 1, types.int) + .addParam('minBlockConfirmations', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(initEngineAndStartTask(path.join(PATH_TO_TASKS_FOLDER, 'migrate.ts'))); + .setAction(loader(path.join(PATH_TO_TASKS_FOLDER, 'migrate.ts'))); export type createMigrationParamTask = { migrationName: string; }; task('create-migration', 'Create a migration file') .addPositionalParam('migrationName', 'Name of the migration name') - .setAction(initEngineAndStartTask(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); + .setAction(loader(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); From 3c87a161f1e51c3675da139ba98deb7576cf9413 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 9 Sep 2021 01:55:17 +0200 Subject: [PATCH 064/164] fix: add loader --- packages/v3/migration/engine/loader.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/v3/migration/engine/loader.ts diff --git a/packages/v3/migration/engine/loader.ts b/packages/v3/migration/engine/loader.ts new file mode 100644 index 000000000..c7763e306 --- /dev/null +++ b/packages/v3/migration/engine/loader.ts @@ -0,0 +1,13 @@ +import { importCsjOrEsModule } from './utils'; +import path from 'path'; + +export const loader = (pathToAction: string) => { + return (taskArgs: any, hre: any) => { + const actualPath = path.isAbsolute(pathToAction) + ? pathToAction + : path.join(hre.config.paths.root, pathToAction); + const task = importCsjOrEsModule(actualPath); + const start = importCsjOrEsModule(path.join(hre.config.paths.root, 'migration/engine/index.ts')); + return start(taskArgs, hre, task); + }; +}; From 239c971854785002acc7efb35622ceec97a3d386 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 9 Sep 2021 01:57:10 +0200 Subject: [PATCH 065/164] add feature in readme --- packages/v3/migration/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 09665d52b..becbf4a41 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -6,6 +6,7 @@ - [x] Revert support - [x] Deploy proxy - [x] Upgrade proxy +- [x] Save ABI and Bytecode of each deployed contract ### Data From 5024dd6a6d9bf0c9910d0b13239b5172536cee9d Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 10 Sep 2021 01:32:54 +0200 Subject: [PATCH 066/164] add word list ability to create migrations + improve overall architecture --- packages/v3/migration/README.md | 2 +- packages/v3/migration/engine/engine.ts | 35 +++-- packages/v3/migration/engine/index.ts | 2 +- packages/v3/migration/engine/loader.ts | 12 +- packages/v3/migration/engine/migrate.ts | 140 ++++++++++++------ packages/v3/migration/engine/types.ts | 1 - packages/v3/migration/index.ts | 12 +- .../v3/migration/tasks/createMigration.ts | 11 +- packages/v3/migration/tasks/migrate.ts | 2 +- 9 files changed, 144 insertions(+), 73 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index becbf4a41..04597fe9a 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -67,7 +67,7 @@ Creates a migration file based on a template. ### How to create a migration file ? ``` -yarn hh create-migration migrationFileName +yarn hh create-migration do migration for me pls ``` If you don't use this CLI to generate your migration files, bear in mind that the format is as follow: "X_testfile.ts" with X representing the timestamp of the migration (i.e its order). diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index c20b9fefa..1f7155f13 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -4,7 +4,7 @@ import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './con import { initExecutionFunctions } from './executionFunctions'; import { initIO } from './io'; import { log } from './logger'; -import { migrate } from './migrate'; +import { migrate, migrateOneDown, migrateOneUp } from './migrate'; import { defaultArgs, ExecutionSettings, NetworkSettings } from './types'; import { isMigrationFolderValid } from './utils'; import { Overrides, Signer } from 'ethers'; @@ -26,18 +26,29 @@ export class Engine { readonly overrides: Overrides; // needed paths + readonly pathToRoot: string; readonly pathToNetworkFolder: string; readonly pathToNetworkDeploymentsFolder: string; // init additional functionnalities readonly IO = initIO(this); readonly executionFunctions = initExecutionFunctions(this); + // readonly migrate = () => migrate(this); + // + readonly migrateOneUp = migrateOneUp; + readonly migrateOneDown = migrateOneDown; // migration info migration = defaultMigration; - constructor(hre: HardhatRuntimeEnvironment, args: defaultArgs, signer: Signer, signerAddress: string) { + constructor( + hre: HardhatRuntimeEnvironment, + args: defaultArgs, + signer: Signer, + signerAddress: string, + pathToRoot: string + ) { this.hre = hre; // init network settings @@ -46,18 +57,14 @@ export class Engine { networkName: networkName, isFork: networkName.startsWith(FORK_PREFIX), isHardhat: networkName === 'hardhat', - isTestnet: networkName === 'rinkeby', originalNetwork: networkName.startsWith(FORK_PREFIX) ? networkName.substring(FORK_PREFIX.length) : networkName }; // init paths - this.pathToNetworkFolder = path.join( - hre.config.paths.root, - MIGRATION_DATA_FOLDER, - this.networkSettings.networkName - ); + this.pathToRoot = pathToRoot; + this.pathToNetworkFolder = path.join(this.pathToRoot, MIGRATION_DATA_FOLDER, this.networkSettings.networkName); this.pathToNetworkDeploymentsFolder = path.join(this.pathToNetworkFolder, 'deployments'); // init basics @@ -81,8 +88,11 @@ export class Engine { this.init(); } + // + // engine healthcheck checkForFailures = () => { + // some configuration should only reserve for forked network or hardhat networks const isForkOrHardhat = this.networkSettings.isFork || this.networkSettings.networkName === 'hardhat'; if (this.executionSettings.confirmationToWait <= 1 && !isForkOrHardhat) { throw new Error( @@ -104,8 +114,13 @@ export class Engine { }; initMigrationDefaultFolder = () => { + // init the network folder fs.mkdirSync(this.pathToNetworkFolder); + + // init the network deployment folder fs.mkdirSync(path.join(this.pathToNetworkFolder, 'deployments')); + + // initialize the first state to default this.IO.state.write(defaultMigration.state); }; @@ -116,7 +131,7 @@ export class Engine { // check if the original network folder is valid and copy it into the current network folder try { const pathToOriginalNetworkFolder = path.join( - this.hre.config.paths.root, + this.pathToRoot, MIGRATION_DATA_FOLDER, this.networkSettings.originalNetwork ); @@ -149,7 +164,7 @@ export class Engine { this.migration.state = this.IO.state.fetch(this.pathToNetworkFolder); // generate migration files - const pathToMigrationFiles = path.join(this.hre.config.paths.root, MIGRATION_FOLDER); + const pathToMigrationFiles = path.join(this.pathToRoot, MIGRATION_FOLDER); const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index 28af0bdc1..b22ab5a42 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -12,7 +12,7 @@ export default async (args: defaultArgs, hre: hre, task: (a: any, b: hre) => any ? new LedgerSigner(ethers.provider, 'hid', args.ledgerPath) : (await ethers.getSigners())[0]; - engine = new Engine(hre, args, signer, await signer.getAddress()); + engine = new Engine(hre, args, signer, await signer.getAddress(), hre.config.paths.root); // follow to the actual task return task(args, hre); diff --git a/packages/v3/migration/engine/loader.ts b/packages/v3/migration/engine/loader.ts index c7763e306..3d851ab06 100644 --- a/packages/v3/migration/engine/loader.ts +++ b/packages/v3/migration/engine/loader.ts @@ -1,13 +1,19 @@ import { importCsjOrEsModule } from './utils'; import path from 'path'; -export const loader = (pathToAction: string) => { +export const taskLoader = (pathToAction: string) => { return (taskArgs: any, hre: any) => { const actualPath = path.isAbsolute(pathToAction) ? pathToAction : path.join(hre.config.paths.root, pathToAction); const task = importCsjOrEsModule(actualPath); - const start = importCsjOrEsModule(path.join(hre.config.paths.root, 'migration/engine/index.ts')); - return start(taskArgs, hre, task); + return task(taskArgs, hre); + }; +}; + +export const migrationLoader = (pathToAction: string) => { + return (taskArgs: any, hre: any) => { + const loader = importCsjOrEsModule(path.join(hre.config.paths.root, 'migration/engine/index.ts')); + return loader(taskArgs, hre, taskLoader(pathToAction)); }; }; diff --git a/packages/v3/migration/engine/migrate.ts b/packages/v3/migration/engine/migrate.ts index ea4b5b200..eadcf1f97 100644 --- a/packages/v3/migration/engine/migrate.ts +++ b/packages/v3/migration/engine/migrate.ts @@ -1,7 +1,65 @@ import { Engine } from './engine'; import { log } from './logger'; -import { Migration } from './types'; +import { Migration, SystemState } from './types'; import { importCsjOrEsModule } from './utils'; +import fs from 'fs'; +import path from 'path'; +import { exit } from 'process'; + +export const migrateOneUp = async ( + migration: Migration, + timestamp: number, + oldNetworkState: any, + currentNetworkState: any +) => { + let newNetworkState: any; + + try { + newNetworkState = await migration.up(currentNetworkState); + + try { + await migration.healthCheck(oldNetworkState, newNetworkState); + log.success('Health check success ✨ '); + } catch (e: any) { + log.error('Health check failed'); + log.error(e.stack); + return undefined; + } + } catch (e: any) { + log.error('Migration up failed'); + log.error(e.stack); + log.error('Aborting.'); + exit(-1); + } + + return { + migrationState: { latestMigration: timestamp }, + networkState: newNetworkState + }; +}; + +export const migrateOneDown = async ( + migration: Migration, + oldNetworkSystemState: SystemState, + currentNetworkState: any +) => { + let newNetworkState: any; + try { + newNetworkState = await migration.down(oldNetworkSystemState.networkState, currentNetworkState); + } catch (e: any) { + log.error('Migration down failed'); + log.error(e.stack); + log.error('Aborting.'); + exit(-1); + } + + return { + migrationState: { + latestMigration: oldNetworkSystemState.migrationState.latestMigration + }, + networkState: newNetworkState + }; +}; export const migrate = async (engine: Engine) => { // if there is no migration to run, exit @@ -14,66 +72,56 @@ export const migrate = async (engine: Engine) => { let index = 0; for (; index < engine.migration.migrationsData.length; index++) { - engine.migration.currentMigrationData = engine.migration.migrationsData[index]; + const migrationData = engine.migration.migrationsData[index]; - const migration: Migration = importCsjOrEsModule(engine.migration.currentMigrationData.fullPath); + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + log.info(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - log.info( - `Executing ${engine.migration.currentMigrationData.fileName}, timestamp: ${engine.migration.currentMigrationData.migrationTimestamp}` + // save the current migration data + engine.migration.currentMigrationData = migrationData; + + const newSystemState = await migrateOneUp( + migration, + migrationData.migrationTimestamp, + engine.migration.stateSaves[index].networkState, + engine.migration.state.networkState ); + if (!newSystemState) break; - try { - engine.migration.state.networkState = await migration.up(engine.migration.state.networkState); - - try { - await migration.healthCheck( - engine.migration.stateSaves[index].networkState, - engine.migration.state.networkState - ); - log.success('Health check success ✨ '); - } catch (e: any) { - log.error('Health check failed'); - log.error(e.stack); - break; - } - - // if health check passed, update the state and write it to the system - engine.migration.state = { - migrationState: { latestMigration: engine.migration.currentMigrationData.migrationTimestamp }, - networkState: engine.migration.state.networkState - }; - engine.IO.state.write(engine.migration.state); - engine.migration.stateSaves.push({ ...engine.migration.state }); - } catch (e: any) { - log.error('Migration execution failed'); - log.error(e.stack); - log.error('Aborting.'); - return; - } + // update migration state + engine.migration.state = newSystemState; + + // add current state to saves + engine.migration.stateSaves.push({ ...newSystemState }); + + // write state to disk + engine.IO.state.write(newSystemState); } // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert if (index !== engine.migration.migrationsData.length) { - log.warning('Reverting ...'); - - engine.migration.currentMigrationData = engine.migration.migrationsData[index]; - log.info( - `Reverting ${engine.migration.currentMigrationData.fileName}, timestamp: ${engine.migration.currentMigrationData.migrationTimestamp}` - ); + const migrationData = engine.migration.migrationsData[index]; - const migration: Migration = importCsjOrEsModule(engine.migration.currentMigrationData.fullPath); + const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); - engine.migration.state.networkState = await migration.down( - engine.migration.stateSaves[index].networkState, + const newSystemState = await migrateOneDown( + migration, + engine.migration.stateSaves[index], engine.migration.state.networkState ); - // if revert passed, update the state and write it to the system - engine.migration.state.migrationState = { - latestMigration: engine.migration.stateSaves[index].migrationState.latestMigration - }; + // update migration state + engine.migration.state = newSystemState; + // write state to disk engine.IO.state.write(engine.migration.state); + + // remove current migration deployment file + fs.rmSync( + path.join(engine.pathToNetworkDeploymentsFolder, engine.migration.currentMigrationData.fileName + '.json'), + { force: true } + ); log.success(`${engine.migration.currentMigrationData.fileName} reverted`); } diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index a3a06582c..ce5f575f2 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -29,7 +29,6 @@ export type NetworkSettings = { networkName: string; isFork: boolean; isHardhat: boolean; - isTestnet: boolean; originalNetwork: string; }; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index 6fe283e49..b3793e0f9 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,4 +1,4 @@ -import { loader } from './engine/loader'; +import { migrationLoader, taskLoader } from './engine/loader'; import { defaultArgs } from './engine/types'; import { task, types } from 'hardhat/config'; import path from 'path'; @@ -12,11 +12,13 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('minBlockConfirmations', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(loader(path.join(PATH_TO_TASKS_FOLDER, 'migrate.ts'))); + .setAction(migrationLoader(path.join(PATH_TO_TASKS_FOLDER, 'migrate.ts'))); export type createMigrationParamTask = { - migrationName: string; + wordList: string[]; + customTimestamp: number; }; task('create-migration', 'Create a migration file') - .addPositionalParam('migrationName', 'Name of the migration name') - .setAction(loader(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); + .addVariadicPositionalParam('wordList', 'Name of the migration') + .addParam('customTimestamp', 'Custom timestamp of the migration') + .setAction(taskLoader(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts index 14b0d7663..bd83d517c 100644 --- a/packages/v3/migration/tasks/createMigration.ts +++ b/packages/v3/migration/tasks/createMigration.ts @@ -1,5 +1,5 @@ import { createMigrationParamTask } from '../../migration'; -import { MIGRATION_FOLDER } from '../../migration/engine/engine'; +import { MIGRATION_FOLDER } from '../../migration/engine/constant'; import { log } from '../engine/logger'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; @@ -54,13 +54,14 @@ export default migration; `; - if (args.migrationName === '') { - throw new Error('File name cannot be empty'); + let migrationName = ''; + for (const a of args.wordList) { + migrationName += '_' + a; } - const migrationTimestamp = Date.now(); + const migrationTimestamp = args.customTimestamp || Date.now(); - const fileName = `${migrationTimestamp}_${args.migrationName}.ts`; + const fileName = `${migrationTimestamp}${migrationName}.ts`; const pathToNewMigrationFile = path.join(hre.config.paths.root, MIGRATION_FOLDER, fileName); fs.writeFileSync(pathToNewMigrationFile, templateMigrationFile); diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index 946f659c0..8b0848470 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -1,4 +1,4 @@ -import { engine } from '../engine'; +import { engine } from '../../migration/engine'; export default async () => { await engine.migrate(); From 1c5ee4cd315915cecd5492303d4611d799cdf590 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Sun, 12 Sep 2021 19:07:21 +0200 Subject: [PATCH 067/164] add tests + fix typos + add custom console --- packages/v3/.gitignore | 4 +++ packages/v3/hardhat.extended.config.ts | 3 +- packages/v3/migration/engine/engine.ts | 2 -- packages/v3/migration/engine/index.ts | 31 +++++++++++++++--- .../engine/{loader.ts => loaders.ts} | 4 +-- packages/v3/migration/engine/logger.ts | 32 ++++++++++++------- packages/v3/migration/index.ts | 4 +-- packages/v3/migration/test/engine.test.ts | 19 +++++++++++ packages/v3/migration/test/helpers/init.ts | 22 +++++++++++++ .../migration/test/singleMigrations/basic.ts | 29 +++++++++++++++++ .../migration/test/singleMigrations/throw.ts | 25 +++++++++++++++ packages/v3/package.json | 1 + 12 files changed, 153 insertions(+), 23 deletions(-) rename packages/v3/migration/engine/{loader.ts => loaders.ts} (81%) create mode 100644 packages/v3/migration/test/engine.test.ts create mode 100644 packages/v3/migration/test/helpers/init.ts create mode 100644 packages/v3/migration/test/singleMigrations/basic.ts create mode 100644 packages/v3/migration/test/singleMigrations/throw.ts diff --git a/packages/v3/.gitignore b/packages/v3/.gitignore index 5f3a4f460..a5134abed 100644 --- a/packages/v3/.gitignore +++ b/packages/v3/.gitignore @@ -27,3 +27,7 @@ config.json migration/data/hardhat migration/data/localhost migration/data/fork* + +migration/test/migration/data/hardhat +migration/test/migration/data/localhost +migration/test/migration/data/fork* \ No newline at end of file diff --git a/packages/v3/hardhat.extended.config.ts b/packages/v3/hardhat.extended.config.ts index 9f13eb0ef..61cdc780d 100644 --- a/packages/v3/hardhat.extended.config.ts +++ b/packages/v3/hardhat.extended.config.ts @@ -1,5 +1,4 @@ import './migration'; -import { log } from './migration/engine/logger'; import fs from 'fs'; import path from 'path'; @@ -35,7 +34,7 @@ export const FORK_CONFIG = (() => { const urlNetworkToFork: string = getNetworkUrl(networkToFork); if (!urlNetworkToFork) { - log.error(`${networkToFork} config is not present in the config.json file, aborting.`); + console.log(`${networkToFork} config is not present in the config.json file, aborting.`); process.exit(-1); } diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index 1f7155f13..ae73a196d 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -88,8 +88,6 @@ export class Engine { this.init(); } - // - // engine healthcheck checkForFailures = () => { // some configuration should only reserve for forked network or hardhat networks diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index b22ab5a42..88b834a5f 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -1,19 +1,42 @@ import { Engine } from './engine'; import { defaultArgs } from './types'; +import { Signer } from '@ethersproject/abstract-signer'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; import { ethers } from 'hardhat'; import { HardhatRuntimeEnvironment as hre } from 'hardhat/types'; export let engine: Engine; -export default async (args: defaultArgs, hre: hre, task: (a: any, b: hre) => any) => { - // init signer +// extra config +export let test = false; + +const initSigner = async (args: defaultArgs) => { const signer = args.ledger ? new LedgerSigner(ethers.provider, 'hid', args.ledgerPath) : (await ethers.getSigners())[0]; - engine = new Engine(hre, args, signer, await signer.getAddress(), hre.config.paths.root); + const signerAddress = await signer.getAddress(); + + return { signer, signerAddress }; +}; + +export const initEngine = async ( + args: defaultArgs, + hre: hre, + signer: Signer, + signerAddress: string, + pathToRoot: string, + isTest: boolean +) => { + test = isTest; + engine = new Engine(hre, args, signer, signerAddress, pathToRoot); +}; + +export default async (args: defaultArgs, hre: hre, task: (a: any, b: hre) => any) => { + const { signer, signerAddress } = await initSigner(args); + + await initEngine(args, hre, signer, signerAddress, hre.config.paths.root, false); - // follow to the actual task + // now that engine is initialized, go to the actual task return task(args, hre); }; diff --git a/packages/v3/migration/engine/loader.ts b/packages/v3/migration/engine/loaders.ts similarity index 81% rename from packages/v3/migration/engine/loader.ts rename to packages/v3/migration/engine/loaders.ts index 3d851ab06..2471e68ae 100644 --- a/packages/v3/migration/engine/loader.ts +++ b/packages/v3/migration/engine/loaders.ts @@ -1,7 +1,7 @@ import { importCsjOrEsModule } from './utils'; import path from 'path'; -export const taskLoader = (pathToAction: string) => { +export const basicTaskLoader = (pathToAction: string) => { return (taskArgs: any, hre: any) => { const actualPath = path.isAbsolute(pathToAction) ? pathToAction @@ -14,6 +14,6 @@ export const taskLoader = (pathToAction: string) => { export const migrationLoader = (pathToAction: string) => { return (taskArgs: any, hre: any) => { const loader = importCsjOrEsModule(path.join(hre.config.paths.root, 'migration/engine/index.ts')); - return loader(taskArgs, hre, taskLoader(pathToAction)); + return loader(taskArgs, hre, basicTaskLoader(pathToAction)); }; }; diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts index 641185225..129aef1a8 100644 --- a/packages/v3/migration/engine/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -1,25 +1,35 @@ +import { test } from './'; import { Engine } from './engine'; import { ExecutionSettings } from './types'; import chalk from 'chalk'; import { Overrides } from 'ethers'; +// in order to prevent printing in tests +const customConsole = { + log: (...any: Parameters) => { + if (!test) { + console.log(any); + } + } +}; + export const palette = { - white: (...str: string[]) => console.log(`${str}`), - magenta: (...str: string[]) => console.log(chalk.magenta(`${str}`)), - yellow: (...str: string[]) => console.log(chalk.yellow(`${str}`)) + white: (...str: string[]) => customConsole.log(`${str}`), + magenta: (...str: string[]) => customConsole.log(chalk.magenta(`${str}`)), + yellow: (...str: string[]) => customConsole.log(chalk.yellow(`${str}`)) }; export const log = { - warning: (...str: string[]) => console.log(chalk.cyanBright(`⚠️ ${str}`)), - info: (...str: string[]) => console.log(chalk.rgb(0, 0, 0).bgWhiteBright(`\n${str}`)), - done: (...str: string[]) => console.log(chalk.yellowBright(...str)), - debug: (...str: string[]) => console.log(chalk.rgb(123, 104, 238).italic(...str)), + warning: (...str: string[]) => customConsole.log(chalk.cyanBright(`⚠️ ${str}`)), + info: (...str: string[]) => customConsole.log(chalk.rgb(0, 0, 0).bgWhiteBright(`\n${str}`)), + done: (...str: string[]) => customConsole.log(chalk.yellowBright(...str)), + debug: (...str: string[]) => customConsole.log(chalk.rgb(123, 104, 238).italic(...str)), basicExecutionHeader: (head: string, body: string, args: any[]) => { let space = ' '; for (let i = 0; i < head.length; i++) space += ' '; - return console.log( + return customConsole.log( chalk.underline.rgb( 255, 165, @@ -32,9 +42,9 @@ export const log = { ); }, - greyed: (...str: string[]) => console.log(chalk.grey(...str)), - success: (...str: string[]) => console.log(chalk.greenBright(...str)), - error: (...str: string[]) => console.log(chalk.red(`⛔️ ${str}`)), + greyed: (...str: string[]) => customConsole.log(chalk.grey(...str)), + success: (...str: string[]) => customConsole.log(chalk.greenBright(...str)), + error: (...str: string[]) => customConsole.log(chalk.red(`⛔️ ${str}`)), migrationConfig: ( signerAddress: string, diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index b3793e0f9..9fdcb0861 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,4 +1,4 @@ -import { migrationLoader, taskLoader } from './engine/loader'; +import { migrationLoader, basicTaskLoader } from './engine/loaders'; import { defaultArgs } from './engine/types'; import { task, types } from 'hardhat/config'; import path from 'path'; @@ -21,4 +21,4 @@ export type createMigrationParamTask = { task('create-migration', 'Create a migration file') .addVariadicPositionalParam('wordList', 'Name of the migration') .addParam('customTimestamp', 'Custom timestamp of the migration') - .setAction(taskLoader(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); + .setAction(basicTaskLoader(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); diff --git a/packages/v3/migration/test/engine.test.ts b/packages/v3/migration/test/engine.test.ts new file mode 100644 index 000000000..eedcb1adb --- /dev/null +++ b/packages/v3/migration/test/engine.test.ts @@ -0,0 +1,19 @@ +import { engine } from '../engine'; +import { initEngine } from './helpers/init'; +import { expect } from 'chai'; + +describe('init engine', () => { + beforeEach(async () => { + await initEngine(); + }); + + it('basic migrate', async () => { + const migration = (await import('./singleMigrations/basic')).default; + expect(await engine.migrateOneUp(migration, 0, {}, {})).to.not.throw; + }); + + it('throw migrate', async () => { + const migration = (await import('./singleMigrations/throw')).default; + expect(await engine.migrateOneUp(migration, 0, {}, {})).to.throw; + }); +}); diff --git a/packages/v3/migration/test/helpers/init.ts b/packages/v3/migration/test/helpers/init.ts new file mode 100644 index 000000000..ad09ace9b --- /dev/null +++ b/packages/v3/migration/test/helpers/init.ts @@ -0,0 +1,22 @@ +import { initEngine as init } from '../../../migration/engine'; +import hre from 'hardhat'; +import path from 'path/posix'; + +export const initEngine = async () => { + const signer = (await hre.ethers.getSigners())[0]; + + await init( + { + reset: true, + ledger: false, + ledgerPath: '', + gasPrice: 0, + minBlockConfirmations: 0 + }, + hre, + signer, + signer.address, + path.join(hre.config.paths.root, 'migration', 'test'), + true + ); +}; diff --git a/packages/v3/migration/test/singleMigrations/basic.ts b/packages/v3/migration/test/singleMigrations/basic.ts new file mode 100644 index 000000000..1cb105e3b --- /dev/null +++ b/packages/v3/migration/test/singleMigrations/basic.ts @@ -0,0 +1,29 @@ +import { engine } from '../../engine'; +import { deployedContract, Migration } from '../../engine/types'; + +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; + +type InitialState = {}; + +type NextState = { + BNT: deployedContract; +}; + +const migration: Migration = { + up: async (initialState: InitialState): Promise => { + const BNT = await contracts.TestERC20Token.deploy('Bancor Network Token', 'BNT', 100000000000); + + return { + BNT: BNT.address + }; + }, + + healthCheck: async (initialState: any, newState: any) => {}, + + down: async (initialState: InitialState, newState: NextState): Promise => { + return initialState; + } +}; + +export default migration; diff --git a/packages/v3/migration/test/singleMigrations/throw.ts b/packages/v3/migration/test/singleMigrations/throw.ts new file mode 100644 index 000000000..6b32ad34d --- /dev/null +++ b/packages/v3/migration/test/singleMigrations/throw.ts @@ -0,0 +1,25 @@ +import { engine } from '../../engine'; +import { deployedContract, Migration } from '../../engine/types'; + +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; + +type InitialState = {}; + +type NextState = {}; + +const migration: Migration = { + up: async (initialState: InitialState): Promise => { + return {}; + }, + + healthCheck: async (initialState: any, newState: any) => { + throw new Error(''); + }, + + down: async (initialState: InitialState, newState: NextState): Promise => { + return initialState; + } +}; + +export default migration; diff --git a/packages/v3/package.json b/packages/v3/package.json index 344d083c7..e9e008194 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -22,6 +22,7 @@ "hh": "hardhat", "migrate": "hardhat migrate", "create-migration": "hardhat create-migration", + "test-migration": "yarn build && hardhat test migration/test/engine.test.ts", "build": "hardhat compile", "rebuild": "yarn clean && yarn build", "test": "yarn build && hardhat test", From 9046ab098bce590f8203523d72466828f0c0b90c Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Sun, 12 Sep 2021 19:28:11 +0200 Subject: [PATCH 068/164] fix logging --- packages/v3/migration/engine/logger.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts index 129aef1a8..838a1d059 100644 --- a/packages/v3/migration/engine/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -6,9 +6,9 @@ import { Overrides } from 'ethers'; // in order to prevent printing in tests const customConsole = { - log: (...any: Parameters) => { + log: (text: any) => { if (!test) { - console.log(any); + console.log(text); } } }; From 07740744da7ad263b30d14e6289355e7f095a6e0 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 14 Sep 2021 18:09:01 +0200 Subject: [PATCH 069/164] Add migration exemples + add rinkeby data folder + update README.md + add extra configuration --- packages/v3/hardhat.config.ts | 9 +- packages/v3/hardhat.extended.config.ts | 102 ++++++++++++------ packages/v3/migration/README.md | 62 +++++++++-- packages/v3/migration/data/mainnet/state.json | 13 +-- packages/v3/migration/data/rinkeby/state.json | 6 ++ packages/v3/migration/engine/engine.ts | 4 +- .../v3/migration/exemples/0_deploy_basics.ts | 58 ++++++++++ .../1_deploy_proxyAdmin.ts | 0 .../2_deploy_networkSettings.ts | 0 .../3_deploy_network.ts | 0 .../4_deploy_vault.ts | 0 .../5_deploy_networkTokenPool.ts | 0 .../6_deploy_pendingWithdrawals.ts | 0 .../7_deploy_liquidityPoolCollection.ts | 0 .../8_deploy_initializeBancorNetwork.ts | 0 .../9_upgrade_networkSettings.ts | 0 .../migration/migrations/0_deploy_basics.ts | 29 ++--- packages/v3/package.json | 6 +- yarn.lock | 8 +- 19 files changed, 212 insertions(+), 85 deletions(-) create mode 100644 packages/v3/migration/data/rinkeby/state.json create mode 100644 packages/v3/migration/exemples/0_deploy_basics.ts rename packages/v3/migration/{migrations => exemples}/1_deploy_proxyAdmin.ts (100%) rename packages/v3/migration/{migrations => exemples}/2_deploy_networkSettings.ts (100%) rename packages/v3/migration/{migrations => exemples}/3_deploy_network.ts (100%) rename packages/v3/migration/{migrations => exemples}/4_deploy_vault.ts (100%) rename packages/v3/migration/{migrations => exemples}/5_deploy_networkTokenPool.ts (100%) rename packages/v3/migration/{migrations => exemples}/6_deploy_pendingWithdrawals.ts (100%) rename packages/v3/migration/{migrations => exemples}/7_deploy_liquidityPoolCollection.ts (100%) rename packages/v3/migration/{migrations => exemples}/8_deploy_initializeBancorNetwork.ts (100%) rename packages/v3/migration/{migrations => exemples}/9_upgrade_networkSettings.ts (100%) diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index d43822384..3ec39008c 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -1,4 +1,4 @@ -import { configFileNetworks, getEnvKey, hardhatForkedConfig, loadKey } from './hardhat.extended.config'; +import { getEnvKey, configFileNetworks, loadConfigFileKey, MIGRATION_FORK_CONFIG } from './hardhat.extended.config'; import './migration'; import './test/Setup.ts'; import '@nomiclabs/hardhat-ethers'; @@ -10,9 +10,10 @@ import 'hardhat-dependency-compiler'; import 'hardhat-deploy'; import 'hardhat-gas-reporter'; import { HardhatUserConfig } from 'hardhat/config'; +import { NetworkUserConfig } from 'hardhat/types'; import 'solidity-coverage'; -const hardhatDefaultConfig = { +const hardhatDefaultConfig: NetworkUserConfig = { accounts: { count: 10, accountsBalance: '10000000000000000000000000000' @@ -23,7 +24,7 @@ const ci = getEnvKey('CI'); const config: HardhatUserConfig = { networks: { - hardhat: hardhatForkedConfig || hardhatDefaultConfig, + hardhat: MIGRATION_FORK_CONFIG?.hardhatConfig || hardhatDefaultConfig, ...configFileNetworks }, @@ -58,7 +59,7 @@ const config: HardhatUserConfig = { }, etherscan: { - apiKey: loadKey('etherscan') + apiKey: loadConfigFileKey('etherscan') }, contractSizer: { diff --git a/packages/v3/hardhat.extended.config.ts b/packages/v3/hardhat.extended.config.ts index 61cdc780d..efc0a0f8c 100644 --- a/packages/v3/hardhat.extended.config.ts +++ b/packages/v3/hardhat.extended.config.ts @@ -1,54 +1,96 @@ import './migration'; import fs from 'fs'; +import { HardhatNetworkUserConfig, NetworkUserConfig } from 'hardhat/types'; import path from 'path'; +export type ConfigFile = { + keys: { [key: string]: string }; + networks: { [key: string]: { url: string; defaultAccount: string } }; +}; + +const defaultConfigFile = { + keys: {}, + networks: {} +}; + const configPath = path.join(__dirname, '/config.json'); -const configFile = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, 'utf8')) : {}; +const configFile: ConfigFile = fs.existsSync(configPath) + ? JSON.parse(fs.readFileSync(configPath, 'utf8')) + : defaultConfigFile; -export const configFileNetworks = configFile.networks; +// re-create hardhat-like configuration for networks from config file +export const configFileNetworks = (() => { + const networks: { [networkName: string]: NetworkUserConfig | undefined } = {}; + for (const networkName in configFile.networks) { + const defaultAccount = configFile.networks[networkName].defaultAccount; + const accounts = defaultAccount ? [defaultAccount] : []; + + networks[networkName] = { + url: configFile.networks[networkName].url, + accounts: accounts + }; + } + return networks; +})(); // Utilities -export const loadKey = (keyName: string) => { - return configFile.keys ? configFile.keys[keyName] || undefined : undefined; +export const getEnvKey = (envKeyName: string) => { + return process.env[envKeyName] as unknown as T; }; -export const getNetworkUrl = (networkName: string) => { - return configFile.networks - ? configFile.networks[networkName] - ? configFile.networks[networkName].url || undefined - : undefined - : undefined; +export const loadConfigFileKey = (keyName: string) => { + return configFile.keys[keyName] || undefined; }; -export const getEnvKey = (envKeyName: string) => { - return process.env[envKeyName] as unknown as T; +export const loadConfigFileNetwork = (networkName: string) => { + return configFile.networks[networkName] || undefined; +}; + +export type hardhatForkConfig = { + hardhatConfig: HardhatNetworkUserConfig; + // + networkName: string; + networkUrl: string; }; -// Forking configuration export const FORK_PREFIX = 'fork-'; -export const FORK_CONFIG = (() => { +export const MIGRATION_FORK_CONFIG: hardhatForkConfig | undefined = (() => { + // if not migration then exit + if (!getEnvKey('MIGRATION')) return undefined; + + // check if it's a fork const networkToFork: string = getEnvKey('FORK'); - if (!networkToFork) { - return undefined; - } - const urlNetworkToFork: string = getNetworkUrl(networkToFork); - if (!urlNetworkToFork) { + // if it's not a fork, returns + if (!networkToFork) return undefined; + + // if it is a fork, populate with the proper fork config + const networkConfig = loadConfigFileNetwork(networkToFork); + + // check the forked network url + if (!networkConfig?.url) { console.log(`${networkToFork} config is not present in the config.json file, aborting.`); process.exit(-1); } - const FORKED_NETWORK_NAME = FORK_PREFIX + networkToFork; + // get the default account of the forked network + const defaultAccount = (() => { + const networkConfig = configFile.networks[networkToFork]; + if (!networkConfig) return undefined; + + if (!networkConfig.defaultAccount) return undefined; + + return [{ privateKey: networkConfig.defaultAccount, balance: '10000000000000000000000000000' }]; + })(); + return { - networkName: FORKED_NETWORK_NAME, - networkUrl: urlNetworkToFork + hardhatConfig: { + accounts: defaultAccount, + forking: { + url: networkConfig.url + } + }, + networkName: FORK_PREFIX + networkToFork, + networkUrl: networkConfig.url }; })(); - -export const hardhatForkedConfig = FORK_CONFIG - ? { - forking: { - url: FORK_CONFIG.networkUrl - } - } - : undefined; diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 04597fe9a..9fe3c1c56 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -1,17 +1,53 @@ # Migration -## Roadmap +## Pre-requisites + +In order to use this plugin, some keys needs to be set in our config.json file at the root of the v3 package: + +```json +{ + "keys": {}, + "networks": { + "networkName": { + "url": "https://", + "defaultAccount": ["defaultAccountPrivateKey"] + } + } +} +``` + +`networks` represents an object exposing a network name to an url and a default account (REQUIRED if no ledger is set via CLI). If you try to execute a migration to a network without having set those values it will fail. + +`url` represents an endpoint to the network. + +`accounts` represents the default migration user (REQUIRED if not using a Ledger). + +## Features + +### Hardware - [x] Ledger support -- [x] Revert support -- [x] Deploy proxy -- [x] Upgrade proxy + +### Functions + +- [x] Deploy contracts (deploy) +- [x] Contract interaction (execute) +- [x] Deploy proxy (deployProxy) +- [x] Upgrade proxy (upgradeProxy) + +### Engine + +- [x] Revert if migration healthcheck fails - [x] Save ABI and Bytecode of each deployed contract +## Folders + ### Data The `data` folder consists of one designated folder per network. +#### state.json + In each network folder there is a `state.json` file. It represents the migration state and the network state: ```json @@ -26,6 +62,10 @@ In each network folder there is a `state.json` file. It represents the migration `latestMigration`: The timestamp of the latest ran migration. `networkState`: Initial migration state. +#### deployments + +There is also a `deployments` folder that will host, for each migration, the ABI and bytecode of any deployed contract. + ### Migrations The `migrations` folder is home to all migration files. @@ -40,23 +80,25 @@ export interface Migration { } ``` -### Engine +### Exemples + +A serie of migration files to inspire yourself from. + +## Engine The engine is the backbone of the migration system, containing its logic. It also exposes tasks (task is a hardhat concept for CLI scripts). -#### Tasks +### Tasks -##### Migrate +#### Migrate Migrates the system between different states. Call `yarn migrate --help` for more info on params. -#### Subtasks - -##### CreateMigration +#### CreateMigration Creates a migration file based on a template. diff --git a/packages/v3/migration/data/mainnet/state.json b/packages/v3/migration/data/mainnet/state.json index e368a4322..ecd2eabc1 100644 --- a/packages/v3/migration/data/mainnet/state.json +++ b/packages/v3/migration/data/mainnet/state.json @@ -1,15 +1,6 @@ { "migrationState": { - "latestMigration": 0 + "latestMigration": -1 }, - "networkState": { - "BNT": { - "token": "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C", - "governance": "0xa489C2b5b36835A327851Ab917A80562B5AFC244" - }, - "vBNT": { - "token": "0x48Fb253446873234F2fEBbF9BdeAA72d9d387f94", - "governance": "0x0887ae1251E180d7D453aeDEBee26e1639f20113" - } - } + "networkState": {} } diff --git a/packages/v3/migration/data/rinkeby/state.json b/packages/v3/migration/data/rinkeby/state.json new file mode 100644 index 000000000..ecd2eabc1 --- /dev/null +++ b/packages/v3/migration/data/rinkeby/state.json @@ -0,0 +1,6 @@ +{ + "migrationState": { + "latestMigration": -1 + }, + "networkState": {} +} diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index ae73a196d..5fca7f3da 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -1,5 +1,5 @@ import Contracts, { ContractsType } from '../../components/Contracts'; -import { FORK_CONFIG, FORK_PREFIX } from '../../hardhat.extended.config'; +import { MIGRATION_FORK_CONFIG, FORK_PREFIX } from '../../hardhat.extended.config'; import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './constant'; import { initExecutionFunctions } from './executionFunctions'; import { initIO } from './io'; @@ -52,7 +52,7 @@ export class Engine { this.hre = hre; // init network settings - const networkName = FORK_CONFIG ? FORK_CONFIG.networkName : network.name; + const networkName = MIGRATION_FORK_CONFIG?.networkName || network.name; this.networkSettings = { networkName: networkName, isFork: networkName.startsWith(FORK_PREFIX), diff --git a/packages/v3/migration/exemples/0_deploy_basics.ts b/packages/v3/migration/exemples/0_deploy_basics.ts new file mode 100644 index 000000000..6fb8fef81 --- /dev/null +++ b/packages/v3/migration/exemples/0_deploy_basics.ts @@ -0,0 +1,58 @@ +import { engine } from '../engine'; +import { deployedContract, Migration } from '../engine/types'; + +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; + +export type InitialState = unknown; + +export type NextState = InitialState & { + BNT: { token: deployedContract; governance: deployedContract }; + vBNT: { token: deployedContract; governance: deployedContract }; +}; + +const migration: Migration = { + up: async (initialState: InitialState): Promise => { + const BNTToken = await deploy( + contracts.TestERC20Token, + 'Bancor Network Token', + 'BNT', + '100000000000000000000000000' + ); + + const vBNTToken = await deploy( + contracts.TestERC20Token, + 'Bancor Governance Token', + 'vBNT', + '100000000000000000000000000' + ); + + const BNTGovernance = await deploy(contracts.TokenGovernance, BNTToken.address); + const vBNTGovernance = await deploy(contracts.TokenGovernance, vBNTToken.address); + + return { + BNT: { + token: BNTToken.address, + governance: BNTGovernance.address + }, + vBNT: { + token: vBNTToken.address, + governance: vBNTGovernance.address + } + }; + }, + + healthCheck: async (initialState: InitialState, state: NextState) => { + const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); + const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); + if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) + throw new Error('Invalid Role'); + if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) + throw new Error('Invalid Role'); + }, + + down: async (initialState: InitialState, newState: NextState): Promise => { + return initialState; + } +}; +export default migration; diff --git a/packages/v3/migration/migrations/1_deploy_proxyAdmin.ts b/packages/v3/migration/exemples/1_deploy_proxyAdmin.ts similarity index 100% rename from packages/v3/migration/migrations/1_deploy_proxyAdmin.ts rename to packages/v3/migration/exemples/1_deploy_proxyAdmin.ts diff --git a/packages/v3/migration/migrations/2_deploy_networkSettings.ts b/packages/v3/migration/exemples/2_deploy_networkSettings.ts similarity index 100% rename from packages/v3/migration/migrations/2_deploy_networkSettings.ts rename to packages/v3/migration/exemples/2_deploy_networkSettings.ts diff --git a/packages/v3/migration/migrations/3_deploy_network.ts b/packages/v3/migration/exemples/3_deploy_network.ts similarity index 100% rename from packages/v3/migration/migrations/3_deploy_network.ts rename to packages/v3/migration/exemples/3_deploy_network.ts diff --git a/packages/v3/migration/migrations/4_deploy_vault.ts b/packages/v3/migration/exemples/4_deploy_vault.ts similarity index 100% rename from packages/v3/migration/migrations/4_deploy_vault.ts rename to packages/v3/migration/exemples/4_deploy_vault.ts diff --git a/packages/v3/migration/migrations/5_deploy_networkTokenPool.ts b/packages/v3/migration/exemples/5_deploy_networkTokenPool.ts similarity index 100% rename from packages/v3/migration/migrations/5_deploy_networkTokenPool.ts rename to packages/v3/migration/exemples/5_deploy_networkTokenPool.ts diff --git a/packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/exemples/6_deploy_pendingWithdrawals.ts similarity index 100% rename from packages/v3/migration/migrations/6_deploy_pendingWithdrawals.ts rename to packages/v3/migration/exemples/6_deploy_pendingWithdrawals.ts diff --git a/packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/exemples/7_deploy_liquidityPoolCollection.ts similarity index 100% rename from packages/v3/migration/migrations/7_deploy_liquidityPoolCollection.ts rename to packages/v3/migration/exemples/7_deploy_liquidityPoolCollection.ts diff --git a/packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/exemples/8_deploy_initializeBancorNetwork.ts similarity index 100% rename from packages/v3/migration/migrations/8_deploy_initializeBancorNetwork.ts rename to packages/v3/migration/exemples/8_deploy_initializeBancorNetwork.ts diff --git a/packages/v3/migration/migrations/9_upgrade_networkSettings.ts b/packages/v3/migration/exemples/9_upgrade_networkSettings.ts similarity index 100% rename from packages/v3/migration/migrations/9_upgrade_networkSettings.ts rename to packages/v3/migration/exemples/9_upgrade_networkSettings.ts diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index f30a3b90d..ee6f23d81 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -1,5 +1,5 @@ -import { engine } from '../../migration/engine'; -import { deployedContract, Migration } from '../../migration/engine/types'; +import { engine } from '../engine'; +import { deployedContract, Migration } from '../engine/types'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; @@ -7,8 +7,8 @@ const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions export type InitialState = unknown; export type NextState = InitialState & { - BNT: { token: deployedContract; governance: deployedContract }; - vBNT: { token: deployedContract; governance: deployedContract }; + BNT: deployedContract; + vBNT: deployedContract; }; const migration: Migration = { @@ -27,28 +27,15 @@ const migration: Migration = { '100000000000000000000000000' ); - const BNTGovernance = await deploy(contracts.TokenGovernance, BNTToken.address); - const vBNTGovernance = await deploy(contracts.TokenGovernance, vBNTToken.address); - return { - BNT: { - token: BNTToken.address, - governance: BNTGovernance.address - }, - vBNT: { - token: vBNTToken.address, - governance: vBNTGovernance.address - } + BNT: BNTToken.address, + vBNT: vBNTToken.address }; }, healthCheck: async (initialState: InitialState, state: NextState) => { - const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); - const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); - if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new Error('Invalid Role'); - if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new Error('Invalid Role'); + const BNT = await contracts.ERC20.attach(state.BNT); + const vBNT = await contracts.ERC20.attach(state.vBNT); }, down: async (initialState: InitialState, newState: NextState): Promise => { diff --git a/packages/v3/package.json b/packages/v3/package.json index e9e008194..713ab26ba 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -20,8 +20,8 @@ ], "scripts": { "hh": "hardhat", - "migrate": "hardhat migrate", - "create-migration": "hardhat create-migration", + "migrate": "MIGRATION=1 hardhat migrate", + "create-migration": "MIGRATION=1 hardhat create-migration", "test-migration": "yarn build && hardhat test migration/test/engine.test.ts", "build": "hardhat compile", "rebuild": "yarn clean && yarn build", @@ -42,7 +42,7 @@ "hardhat": "2.6.0" }, "devDependencies": { - "@bancor/token-governance": "^0.1.3", + "@bancor/token-governance": "^0.1.4", "@ethersproject/hardware-wallets": "^5.4.0", "@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-etherscan": "^2.1.4", diff --git a/yarn.lock b/yarn.lock index c96009da8..20948dd2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -247,10 +247,10 @@ "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" -"@bancor/token-governance@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.3.tgz#c2099c195769a23ac8222bcb7f4508e5616c4978" - integrity sha512-rRF/eVAdMagDR8y84VnNAQl8UpFlN/DuR7JNQPEnksTb4wbVWqaLgxQ+3JxP/1oTwXUfCAxs5ioKC7aLzb7c/A== +"@bancor/token-governance@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.4.tgz#b0b156781981145d631426e0211151e88be797d9" + integrity sha512-GlxRmt4maRbwEoZPMkqgXhr5L6t02Xf9GogBqh4fvfOFn7grPk7Tdd/THzN7hijfDeDi6/1Ywr3ob+HdQXZT7g== "@bancor/token-governance@bancorprotocol/token-governance": version "0.1.3" From 79b8ea0012b9a6e2f9c4d551255fcef71608a113 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 15 Sep 2021 15:20:26 +0200 Subject: [PATCH 070/164] update token-governance dep + improve extended config + add readme.md details + add history --- packages/v3/components/Contracts.ts | 10 +- packages/v3/hardhat.config.ts | 6 +- packages/v3/hardhat.extended.config.ts | 136 +++++++++--------- packages/v3/migration/README.md | 31 +++- packages/v3/migration/engine/engine.ts | 28 ++-- .../v3/migration/engine/executionFunctions.ts | 13 +- packages/v3/migration/engine/index.ts | 2 + packages/v3/migration/engine/io.ts | 39 ++++- packages/v3/migration/engine/types.ts | 14 +- packages/v3/migration/index.ts | 2 +- .../migration/migrations/0_deploy_basics.ts | 27 ++-- 11 files changed, 196 insertions(+), 112 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 65a71912d..9c3bb7c6e 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -23,7 +23,11 @@ import { TokenHolderUpgradeable__factory, TransparentUpgradeableProxy__factory } from '../typechain'; -import { TokenGovernance__factory } from '@bancor/token-governance'; +import { + TokenGovernance__factory, + SmartToken__factory as BNT_factory, + DSToken__factory as vBNT_factory +} from '@bancor/token-governance'; import { Signer } from '@ethersproject/abstract-signer'; import { ContractFactory } from '@ethersproject/contracts'; import { ethers } from 'hardhat'; @@ -110,7 +114,9 @@ const getContracts = (signer?: Signer) => ({ ), // external contracts - TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer) + TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer), + BNT: deployOrAttach('BNT', BNT_factory, signer), + vBNT: deployOrAttach('vBNT', vBNT_factory, signer) }); export type ContractsType = ReturnType; diff --git a/packages/v3/hardhat.config.ts b/packages/v3/hardhat.config.ts index 3ec39008c..f05b01711 100644 --- a/packages/v3/hardhat.config.ts +++ b/packages/v3/hardhat.config.ts @@ -1,4 +1,4 @@ -import { getEnvKey, configFileNetworks, loadConfigFileKey, MIGRATION_FORK_CONFIG } from './hardhat.extended.config'; +import { getEnvKey, CONFIG, loadConfigFileKey } from './hardhat.extended.config'; import './migration'; import './test/Setup.ts'; import '@nomiclabs/hardhat-ethers'; @@ -24,9 +24,9 @@ const ci = getEnvKey('CI'); const config: HardhatUserConfig = { networks: { - hardhat: MIGRATION_FORK_CONFIG?.hardhatConfig || hardhatDefaultConfig, + hardhat: CONFIG.hardhatForkConfig?.hardhatConfig || hardhatDefaultConfig, - ...configFileNetworks + ...CONFIG.networks }, solidity: { diff --git a/packages/v3/hardhat.extended.config.ts b/packages/v3/hardhat.extended.config.ts index efc0a0f8c..7017c0ece 100644 --- a/packages/v3/hardhat.extended.config.ts +++ b/packages/v3/hardhat.extended.config.ts @@ -1,39 +1,9 @@ import './migration'; import fs from 'fs'; -import { HardhatNetworkUserConfig, NetworkUserConfig } from 'hardhat/types'; +import { NetworkUserConfig } from 'hardhat/types'; import path from 'path'; -export type ConfigFile = { - keys: { [key: string]: string }; - networks: { [key: string]: { url: string; defaultAccount: string } }; -}; - -const defaultConfigFile = { - keys: {}, - networks: {} -}; - -const configPath = path.join(__dirname, '/config.json'); -const configFile: ConfigFile = fs.existsSync(configPath) - ? JSON.parse(fs.readFileSync(configPath, 'utf8')) - : defaultConfigFile; - -// re-create hardhat-like configuration for networks from config file -export const configFileNetworks = (() => { - const networks: { [networkName: string]: NetworkUserConfig | undefined } = {}; - for (const networkName in configFile.networks) { - const defaultAccount = configFile.networks[networkName].defaultAccount; - const accounts = defaultAccount ? [defaultAccount] : []; - - networks[networkName] = { - url: configFile.networks[networkName].url, - accounts: accounts - }; - } - return networks; -})(); - -// Utilities +// utilities export const getEnvKey = (envKeyName: string) => { return process.env[envKeyName] as unknown as T; }; @@ -46,51 +16,73 @@ export const loadConfigFileNetwork = (networkName: string) => { return configFile.networks[networkName] || undefined; }; -export type hardhatForkConfig = { - hardhatConfig: HardhatNetworkUserConfig; - // - networkName: string; - networkUrl: string; -}; +const configFilePath = path.join(__dirname, '/config.json'); +const configFile: { + keys: { [key: string]: string }; + networks: { [key: string]: { url: string; defaultAccount: string } }; +} = fs.existsSync(configFilePath) ? JSON.parse(fs.readFileSync(configFilePath, 'utf8')) : { keys: {}, networks: {} }; export const FORK_PREFIX = 'fork-'; -export const MIGRATION_FORK_CONFIG: hardhatForkConfig | undefined = (() => { - // if not migration then exit - if (!getEnvKey('MIGRATION')) return undefined; - - // check if it's a fork - const networkToFork: string = getEnvKey('FORK'); - - // if it's not a fork, returns - if (!networkToFork) return undefined; - - // if it is a fork, populate with the proper fork config - const networkConfig = loadConfigFileNetwork(networkToFork); - - // check the forked network url - if (!networkConfig?.url) { - console.log(`${networkToFork} config is not present in the config.json file, aborting.`); - process.exit(-1); - } - - // get the default account of the forked network - const defaultAccount = (() => { - const networkConfig = configFile.networks[networkToFork]; - if (!networkConfig) return undefined; - - if (!networkConfig.defaultAccount) return undefined; +export const CONFIG = (() => { + // re-create hardhat-like configuration for networks from config file + const networks = (() => { + const networks: { [networkName: string]: NetworkUserConfig | undefined } = {}; + for (const networkName in configFile.networks) { + const defaultAccount = configFile.networks[networkName].defaultAccount; + const accounts = defaultAccount ? [defaultAccount] : []; + + networks[networkName] = { + url: configFile.networks[networkName].url, + accounts: accounts + }; + } + return networks; + })(); - return [{ privateKey: networkConfig.defaultAccount, balance: '10000000000000000000000000000' }]; + const hardhatForkConfig = (() => { + // if it's not a migration, return undefined + if (!getEnvKey('MIGRATION')) return undefined; + + // check if it's a fork + const networkToFork: string = getEnvKey('FORK'); + + // if it's not a fork, returns + if (!networkToFork) return undefined; + + // if it is a fork, populate with the proper fork config + const networkConfig = loadConfigFileNetwork(networkToFork); + + // check the forked network url + if (!networkConfig?.url) { + console.log(`${networkToFork} config is not present in the config.json file, aborting.`); + process.exit(-1); + } + + // get the default account of the forked network + const defaultAccount = (() => { + const networkConfig = configFile.networks[networkToFork]; + if (!networkConfig) return undefined; + + if (!networkConfig.defaultAccount) return undefined; + + return [{ privateKey: networkConfig.defaultAccount, balance: '10000000000000000000000000000' }]; + })(); + + return { + hardhatConfig: { + accounts: defaultAccount, + forking: { + url: networkConfig.url + } + }, + networkName: FORK_PREFIX + networkToFork, + originalNetworkName: networkToFork, + isFork: true + }; })(); return { - hardhatConfig: { - accounts: defaultAccount, - forking: { - url: networkConfig.url - } - }, - networkName: FORK_PREFIX + networkToFork, - networkUrl: networkConfig.url + networks, + hardhatForkConfig }; })(); diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 9fe3c1c56..555a0dba2 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -20,7 +20,7 @@ In order to use this plugin, some keys needs to be set in our config.json file a `url` represents an endpoint to the network. -`accounts` represents the default migration user (REQUIRED if not using a Ledger). +`defaultAccount` represents the default migration user (REQUIRED if not using a Ledger). ## Features @@ -37,8 +37,10 @@ In order to use this plugin, some keys needs to be set in our config.json file a ### Engine -- [x] Revert if migration healthcheck fails - [x] Save ABI and Bytecode of each deployed contract +- [x] Save states between migrations +- [x] Save execution history of each migrations +- [x] Revert if migration healthcheck fails ## Folders @@ -66,6 +68,31 @@ In each network folder there is a `state.json` file. It represents the migration There is also a `deployments` folder that will host, for each migration, the ABI and bytecode of any deployed contract. +#### history.json + +In each network folder there is a `history.json` file. It represents every execution done by the engine, it looks like this: + +```json +{ + "0_deploy_basics.ts": { + "executions": [ + { + "type": "DEPLOY", + "params": ["Bancor Network Token", "BNT", 18], + "description": "BNT", + "tx": "0x6d9427f3aef3154b6247ef5377e85e9e1be5375b819f3def82bbf53755bf3d62" + }, + { + "type": "DEPLOY", + "params": ["Bancor Governance Token", "vBNT", 18], + "description": "vBNT", + "tx": "0xdf31b607fc7ef31e72c45c2957ac7e84599824d64127bf80e2ccf68543e6e3af" + } + ] + } +} +``` + ### Migrations The `migrations` folder is home to all migration files. diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index 5fca7f3da..43b4844c1 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -1,5 +1,5 @@ import Contracts, { ContractsType } from '../../components/Contracts'; -import { MIGRATION_FORK_CONFIG, FORK_PREFIX } from '../../hardhat.extended.config'; +import { CONFIG } from '../../hardhat.extended.config'; import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './constant'; import { initExecutionFunctions } from './executionFunctions'; import { initIO } from './io'; @@ -28,14 +28,17 @@ export class Engine { // needed paths readonly pathToRoot: string; readonly pathToNetworkFolder: string; + readonly pathToMigrationsFolder: string; readonly pathToNetworkDeploymentsFolder: string; // init additional functionnalities readonly IO = initIO(this); readonly executionFunctions = initExecutionFunctions(this); - // + + // main functions readonly migrate = () => migrate(this); - // + + // secondary functions readonly migrateOneUp = migrateOneUp; readonly migrateOneDown = migrateOneDown; @@ -52,18 +55,18 @@ export class Engine { this.hre = hre; // init network settings - const networkName = MIGRATION_FORK_CONFIG?.networkName || network.name; + const hardhatForkConfig = CONFIG.hardhatForkConfig; + + const networkName = hardhatForkConfig?.networkName || network.name; this.networkSettings = { networkName: networkName, - isFork: networkName.startsWith(FORK_PREFIX), - isHardhat: networkName === 'hardhat', - originalNetwork: networkName.startsWith(FORK_PREFIX) - ? networkName.substring(FORK_PREFIX.length) - : networkName + originalNetwork: hardhatForkConfig?.originalNetworkName || networkName, + isFork: hardhatForkConfig?.isFork || false }; // init paths this.pathToRoot = pathToRoot; + this.pathToMigrationsFolder = path.join(pathToRoot, MIGRATION_FOLDER); this.pathToNetworkFolder = path.join(this.pathToRoot, MIGRATION_DATA_FOLDER, this.networkSettings.networkName); this.pathToNetworkDeploymentsFolder = path.join(this.pathToNetworkFolder, 'deployments'); @@ -162,10 +165,11 @@ export class Engine { this.migration.state = this.IO.state.fetch(this.pathToNetworkFolder); // generate migration files - const pathToMigrationFiles = path.join(this.pathToRoot, MIGRATION_FOLDER); - const allMigrationFiles = fs.readdirSync(pathToMigrationFiles); + const allMigrationFiles = fs.readdirSync(this.pathToMigrationsFolder); const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); - const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(pathToMigrationFiles, fileName)); + const migrationFilesPath = migrationFiles.map((fileName: string) => + path.join(this.pathToMigrationsFolder, fileName) + ); for (const migrationFilePath of migrationFilesPath) { const fileName = path.basename(migrationFilePath); const migrationId = Number(fileName.split('_')[0]); diff --git a/packages/v3/migration/engine/executionFunctions.ts b/packages/v3/migration/engine/executionFunctions.ts index b31b39885..cf655a077 100644 --- a/packages/v3/migration/engine/executionFunctions.ts +++ b/packages/v3/migration/engine/executionFunctions.ts @@ -24,6 +24,12 @@ export const initExecutionFunctions = (engine: Engine) => { } engine.IO.deployment.writeOne(factory.metadata); + engine.IO.history.writeOne({ + type: 'DEPLOY', + params: args, + description: factory.metadata.contractName, + tx: contract.deployTransaction.hash + }); log.success(`Deployed ${factory.metadata.contractName} at ${contract.address} 🚀 !`); return contract; }; @@ -42,7 +48,12 @@ export const initExecutionFunctions = (engine: Engine) => { if (receipt.status !== 1) { throw new Error(`Error executing, tx: ${tx.hash}`); } - + engine.IO.history.writeOne({ + type: 'EXECUTION', + params: args, + description: executionInstruction, + tx: tx.hash + }); log.success(`Executed ✨`); return receipt; }; diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index 88b834a5f..563e84783 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -15,6 +15,8 @@ const initSigner = async (args: defaultArgs) => { ? new LedgerSigner(ethers.provider, 'hid', args.ledgerPath) : (await ethers.getSigners())[0]; + if (!signer) throw new Error("Signer shouldn't be undefined"); + const signerAddress = await signer.getAddress(); return { signer, signerAddress }; diff --git a/packages/v3/migration/engine/io.ts b/packages/v3/migration/engine/io.ts index 99e315a21..110bdc6f2 100644 --- a/packages/v3/migration/engine/io.ts +++ b/packages/v3/migration/engine/io.ts @@ -1,5 +1,5 @@ import { Engine } from './engine'; -import { Deployment, SystemDeployments, SystemState } from './types'; +import { Deployment, History, HistoryExecution, SystemDeployments, SystemState } from './types'; import fs from 'fs'; import path from 'path'; @@ -17,15 +17,48 @@ export const initIO = (engine: Engine) => { return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; } }, + history: { + write: (history: History) => { + fs.writeFileSync( + path.join(engine.pathToNetworkFolder, 'history.json'), + JSON.stringify(history, null, 4) + `\n` + ); + return history; + }, + writeOne: (historyExecution: HistoryExecution) => { + const migrationHistoryFileName = 'history.json'; + + // find the history file in the network folder + const pathToNetworkFolderFiles = fs.readdirSync(engine.pathToNetworkFolder); + const pathToMigrationDeploymentFile = pathToNetworkFolderFiles.find( + (f: string) => f === migrationHistoryFileName + ); + + // if file not found create an empty one + if (!pathToMigrationDeploymentFile) { + engine.IO.history.write({}); + } + + const currentHistory = engine.IO.history.fetch(engine.pathToNetworkFolder); + if (!currentHistory[engine.migration.currentMigrationData.fileName]) { + currentHistory[engine.migration.currentMigrationData.fileName] = { executions: [] }; + } + currentHistory[engine.migration.currentMigrationData.fileName].executions.push(historyExecution); + engine.IO.history.write(currentHistory); + }, + fetch: (pathToHistory: string) => { + return JSON.parse(fs.readFileSync(path.join(pathToHistory, 'history.json'), 'utf-8')) as History; + } + }, deployment: { write: (pathToWrite: string, deployments: SystemDeployments) => { - fs.writeFileSync(path.join(pathToWrite), JSON.stringify(deployments, null, 4) + `\n`); + fs.writeFileSync(pathToWrite, JSON.stringify(deployments, null, 4) + `\n`); return deployments; }, writeOne: (deployment: Deployment) => { const currentMigrationDeploymentFileName = engine.migration.currentMigrationData.fileName + '.json'; - // find the migration file in the network deployments + // find the migration file in the network deployments folder const pathToNetworkMigrationDeploymentFolder = path.join(engine.pathToNetworkFolder, 'deployments'); // read all files into the folder and fetch needed file diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types.ts index ce5f575f2..2edd9c7d0 100644 --- a/packages/v3/migration/engine/types.ts +++ b/packages/v3/migration/engine/types.ts @@ -5,6 +5,19 @@ export type SystemState = { networkState: any; }; +export type HistoryExecution = { + type: 'DEPLOY' | 'EXECUTION'; + params: any[]; + description: string; + tx: string; +}; + +export type History = { + [migrationName: string]: { + executions: HistoryExecution[]; + }; +}; + export type Deployment = { contractName: string; abi: any; // object @@ -28,7 +41,6 @@ export type ExecutionSettings = { export type NetworkSettings = { networkName: string; isFork: boolean; - isHardhat: boolean; originalNetwork: string; }; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index 9fdcb0861..92e953182 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -20,5 +20,5 @@ export type createMigrationParamTask = { }; task('create-migration', 'Create a migration file') .addVariadicPositionalParam('wordList', 'Name of the migration') - .addParam('customTimestamp', 'Custom timestamp of the migration') + .addOptionalParam('customTimestamp', 'Custom timestamp of the migration') .setAction(basicTaskLoader(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/0_deploy_basics.ts index ee6f23d81..ae1524ab6 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/0_deploy_basics.ts @@ -13,19 +13,8 @@ export type NextState = InitialState & { const migration: Migration = { up: async (initialState: InitialState): Promise => { - const BNTToken = await deploy( - contracts.TestERC20Token, - 'Bancor Network Token', - 'BNT', - '100000000000000000000000000' - ); - - const vBNTToken = await deploy( - contracts.TestERC20Token, - 'Bancor Governance Token', - 'vBNT', - '100000000000000000000000000' - ); + const BNTToken = await deploy(contracts.BNT, 'Bancor Network Token', 'BNT', 18); + const vBNTToken = await deploy(contracts.vBNT, 'Bancor Governance Token', 'vBNT', 18); return { BNT: BNTToken.address, @@ -34,8 +23,16 @@ const migration: Migration = { }, healthCheck: async (initialState: InitialState, state: NextState) => { - const BNT = await contracts.ERC20.attach(state.BNT); - const vBNT = await contracts.ERC20.attach(state.vBNT); + const BNT = await contracts.BNT.attach(state.BNT); + const vBNT = await contracts.vBNT.attach(state.vBNT); + + if ((await BNT.owner()) !== (await signer.getAddress())) { + throw new Error("BNT contract doesn't have the right owner"); + } + + if ((await vBNT.owner()) !== (await signer.getAddress())) { + throw new Error("BNT contract doesn't have the right owner"); + } }, down: async (initialState: InitialState, newState: NextState): Promise => { From 281ea017b711f709acdd0da26095820df6639202 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 16 Sep 2021 12:00:09 +0200 Subject: [PATCH 071/164] few fixes --- packages/v3/migration/README.md | 4 ++-- packages/v3/migration/data/mainnet/history.json | 1 + packages/v3/migration/data/rinkeby/history.json | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 packages/v3/migration/data/mainnet/history.json create mode 100644 packages/v3/migration/data/rinkeby/history.json diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 555a0dba2..75792853b 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -2,7 +2,7 @@ ## Pre-requisites -In order to use this plugin, some keys needs to be set in our config.json file at the root of the v3 package: +In order to use this plugin, some keys needs to be set in our `config.json` file at the root of the v3 package: ```json { @@ -10,7 +10,7 @@ In order to use this plugin, some keys needs to be set in our config.json file a "networks": { "networkName": { "url": "https://", - "defaultAccount": ["defaultAccountPrivateKey"] + "defaultAccount": "defaultAccountPrivateKey" } } } diff --git a/packages/v3/migration/data/mainnet/history.json b/packages/v3/migration/data/mainnet/history.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/packages/v3/migration/data/mainnet/history.json @@ -0,0 +1 @@ +{} diff --git a/packages/v3/migration/data/rinkeby/history.json b/packages/v3/migration/data/rinkeby/history.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/packages/v3/migration/data/rinkeby/history.json @@ -0,0 +1 @@ +{} From f454996e3db89eb75ba8179806fc7abba67a2a72 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Sat, 18 Sep 2021 00:35:55 +0200 Subject: [PATCH 072/164] remove useless exemples + remove custom timestamp + renamed files with capitalized letter + typos --- packages/v3/migration/engine/constant.ts | 2 +- packages/v3/migration/engine/engine.ts | 14 ++--- .../v3/migration/engine/executionFunctions.ts | 4 +- packages/v3/migration/engine/index.ts | 4 +- packages/v3/migration/engine/io.ts | 4 +- packages/v3/migration/engine/loaders.ts | 2 +- packages/v3/migration/engine/logger.ts | 6 +- packages/v3/migration/engine/migrate.ts | 8 +-- .../v3/migration/exemples/0_deploy_basics.ts | 58 ------------------- .../migration/exemples/0_deploy_my_token.ts | 35 +++++++++++ .../migration/exemples/1_deploy_proxyAdmin.ts | 33 ----------- .../exemples/2_deploy_networkSettings.ts | 38 ------------ .../v3/migration/exemples/3_deploy_network.ts | 41 ------------- .../v3/migration/exemples/4_deploy_vault.ts | 39 ------------- .../exemples/5_deploy_networkTokenPool.ts | 56 ------------------ .../exemples/6_deploy_pendingWithdrawals.ts | 47 --------------- .../7_deploy_liquidityPoolCollection.ts | 32 ---------- .../8_deploy_initializeBancorNetwork.ts | 33 ----------- .../exemples/9_upgrade_networkSettings.ts | 42 -------------- packages/v3/migration/index.ts | 6 +- ...cs.ts => 1631795969803_deploy_bnt_vbnt.ts} | 7 ++- .../v3/migration/tasks/createMigration.ts | 45 ++++++-------- packages/v3/migration/tasks/migrate.ts | 2 +- packages/v3/migration/test/engine.test.ts | 2 +- packages/v3/migration/test/helpers/init.ts | 2 +- .../migration/test/singleMigrations/basic.ts | 2 +- .../migration/test/singleMigrations/throw.ts | 2 +- 27 files changed, 85 insertions(+), 481 deletions(-) delete mode 100644 packages/v3/migration/exemples/0_deploy_basics.ts create mode 100644 packages/v3/migration/exemples/0_deploy_my_token.ts delete mode 100644 packages/v3/migration/exemples/1_deploy_proxyAdmin.ts delete mode 100644 packages/v3/migration/exemples/2_deploy_networkSettings.ts delete mode 100644 packages/v3/migration/exemples/3_deploy_network.ts delete mode 100644 packages/v3/migration/exemples/4_deploy_vault.ts delete mode 100644 packages/v3/migration/exemples/5_deploy_networkTokenPool.ts delete mode 100644 packages/v3/migration/exemples/6_deploy_pendingWithdrawals.ts delete mode 100644 packages/v3/migration/exemples/7_deploy_liquidityPoolCollection.ts delete mode 100644 packages/v3/migration/exemples/8_deploy_initializeBancorNetwork.ts delete mode 100644 packages/v3/migration/exemples/9_upgrade_networkSettings.ts rename packages/v3/migration/migrations/{0_deploy_basics.ts => 1631795969803_deploy_bnt_vbnt.ts} (85%) diff --git a/packages/v3/migration/engine/constant.ts b/packages/v3/migration/engine/constant.ts index bb0c0425c..955839d1d 100644 --- a/packages/v3/migration/engine/constant.ts +++ b/packages/v3/migration/engine/constant.ts @@ -1,4 +1,4 @@ -import { MigrationData, SystemDeployments, SystemState } from './types'; +import { MigrationData, SystemDeployments, SystemState } from './Types'; export const MIGRATION_FOLDER = 'migration/migrations'; export const MIGRATION_DATA_FOLDER = 'migration/data'; diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index 43b4844c1..1fdd7cdd0 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -1,12 +1,12 @@ import Contracts, { ContractsType } from '../../components/Contracts'; import { CONFIG } from '../../hardhat.extended.config'; -import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './constant'; -import { initExecutionFunctions } from './executionFunctions'; -import { initIO } from './io'; -import { log } from './logger'; -import { migrate, migrateOneDown, migrateOneUp } from './migrate'; -import { defaultArgs, ExecutionSettings, NetworkSettings } from './types'; -import { isMigrationFolderValid } from './utils'; +import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './Constant'; +import { initExecutionFunctions } from './ExecutionFunctions'; +import { initIO } from './Io'; +import { log } from './Logger'; +import { migrate, migrateOneDown, migrateOneUp } from './Migrate'; +import { defaultArgs, ExecutionSettings, NetworkSettings } from './Types'; +import { isMigrationFolderValid } from './Utils'; import { Overrides, Signer } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; import fs from 'fs-extra'; diff --git a/packages/v3/migration/engine/executionFunctions.ts b/packages/v3/migration/engine/executionFunctions.ts index cf655a077..e918a6fec 100644 --- a/packages/v3/migration/engine/executionFunctions.ts +++ b/packages/v3/migration/engine/executionFunctions.ts @@ -1,7 +1,7 @@ import { ContractBuilder, Contract } from '../../components/Contracts'; import { ProxyAdmin } from '../../typechain'; -import { Engine } from './engine'; -import { log } from './logger'; +import { Engine } from './Engine'; +import { log } from './Logger'; import { ContractFactory, ContractReceipt, ContractTransaction } from 'ethers'; type initializeArgs = Parameters | 'skipInit'; diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index 563e84783..2d2e0795d 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -1,5 +1,5 @@ -import { Engine } from './engine'; -import { defaultArgs } from './types'; +import { Engine } from './Engine'; +import { defaultArgs } from './Types'; import { Signer } from '@ethersproject/abstract-signer'; import { LedgerSigner } from '@ethersproject/hardware-wallets'; import { ethers } from 'hardhat'; diff --git a/packages/v3/migration/engine/io.ts b/packages/v3/migration/engine/io.ts index 110bdc6f2..9892fc028 100644 --- a/packages/v3/migration/engine/io.ts +++ b/packages/v3/migration/engine/io.ts @@ -1,5 +1,5 @@ -import { Engine } from './engine'; -import { Deployment, History, HistoryExecution, SystemDeployments, SystemState } from './types'; +import { Engine } from './Engine'; +import { Deployment, History, HistoryExecution, SystemDeployments, SystemState } from './Types'; import fs from 'fs'; import path from 'path'; diff --git a/packages/v3/migration/engine/loaders.ts b/packages/v3/migration/engine/loaders.ts index 2471e68ae..7bd69dc43 100644 --- a/packages/v3/migration/engine/loaders.ts +++ b/packages/v3/migration/engine/loaders.ts @@ -1,4 +1,4 @@ -import { importCsjOrEsModule } from './utils'; +import { importCsjOrEsModule } from './Utils'; import path from 'path'; export const basicTaskLoader = (pathToAction: string) => { diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger.ts index 838a1d059..244c24bec 100644 --- a/packages/v3/migration/engine/logger.ts +++ b/packages/v3/migration/engine/logger.ts @@ -1,6 +1,6 @@ -import { test } from './'; -import { Engine } from './engine'; -import { ExecutionSettings } from './types'; +import { test } from '.'; +import { Engine } from './Engine'; +import { ExecutionSettings } from './Types'; import chalk from 'chalk'; import { Overrides } from 'ethers'; diff --git a/packages/v3/migration/engine/migrate.ts b/packages/v3/migration/engine/migrate.ts index eadcf1f97..c9c193209 100644 --- a/packages/v3/migration/engine/migrate.ts +++ b/packages/v3/migration/engine/migrate.ts @@ -1,7 +1,7 @@ -import { Engine } from './engine'; -import { log } from './logger'; -import { Migration, SystemState } from './types'; -import { importCsjOrEsModule } from './utils'; +import { Engine } from './Engine'; +import { log } from './Logger'; +import { Migration, SystemState } from './Types'; +import { importCsjOrEsModule } from './Utils'; import fs from 'fs'; import path from 'path'; import { exit } from 'process'; diff --git a/packages/v3/migration/exemples/0_deploy_basics.ts b/packages/v3/migration/exemples/0_deploy_basics.ts deleted file mode 100644 index 6fb8fef81..000000000 --- a/packages/v3/migration/exemples/0_deploy_basics.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { engine } from '../engine'; -import { deployedContract, Migration } from '../engine/types'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type InitialState = unknown; - -export type NextState = InitialState & { - BNT: { token: deployedContract; governance: deployedContract }; - vBNT: { token: deployedContract; governance: deployedContract }; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const BNTToken = await deploy( - contracts.TestERC20Token, - 'Bancor Network Token', - 'BNT', - '100000000000000000000000000' - ); - - const vBNTToken = await deploy( - contracts.TestERC20Token, - 'Bancor Governance Token', - 'vBNT', - '100000000000000000000000000' - ); - - const BNTGovernance = await deploy(contracts.TokenGovernance, BNTToken.address); - const vBNTGovernance = await deploy(contracts.TokenGovernance, vBNTToken.address); - - return { - BNT: { - token: BNTToken.address, - governance: BNTGovernance.address - }, - vBNT: { - token: vBNTToken.address, - governance: vBNTGovernance.address - } - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); - const vBNTGovernance = await contracts.TokenGovernance.attach(state.vBNT.governance); - if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new Error('Invalid Role'); - if (!(await vBNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new Error('Invalid Role'); - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/0_deploy_my_token.ts b/packages/v3/migration/exemples/0_deploy_my_token.ts new file mode 100644 index 000000000..369311097 --- /dev/null +++ b/packages/v3/migration/exemples/0_deploy_my_token.ts @@ -0,0 +1,35 @@ +import { engine } from '../engine'; +import { deployedContract, Migration } from '../engine/Types'; +import { BigNumber } from 'ethers'; + +const { signer, contracts } = engine; +const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; + +export type InitialState = unknown; + +export type NextState = InitialState & { + myToken: deployedContract; +}; + +const migration: Migration = { + up: async (initialState: InitialState): Promise => { + const myToken = await deploy(contracts.TestERC20Token, 'My Token', 'MYTKN', '100000000000000000000000000'); + return { + myToken: myToken.address + }; + }, + + healthCheck: async (initialState: InitialState, state: NextState) => { + const myToken = await contracts.TestERC20Token.attach(state.myToken); + + if (!((await myToken.totalSupply()) !== BigNumber.from('100000000000000000000000000'))) { + throw new Error("Total supply isn't correct"); + } + }, + + down: async (initialState: InitialState, newState: NextState): Promise => { + return initialState; + } +}; + +export default migration; diff --git a/packages/v3/migration/exemples/1_deploy_proxyAdmin.ts b/packages/v3/migration/exemples/1_deploy_proxyAdmin.ts deleted file mode 100644 index 5a36adb59..000000000 --- a/packages/v3/migration/exemples/1_deploy_proxyAdmin.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { engine } from '../../migration/engine'; -import { deployedContract, Migration } from '../engine/types'; -import { NextState as InitialState } from './0_deploy_basics'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState & { - proxyAdmin: deployedContract; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const proxyAdmin = await deploy(contracts.ProxyAdmin); - - return { - ...initialState, - - proxyAdmin: proxyAdmin.address - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); - - if ((await proxyAdmin.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/2_deploy_networkSettings.ts b/packages/v3/migration/exemples/2_deploy_networkSettings.ts deleted file mode 100644 index 03b362449..000000000 --- a/packages/v3/migration/exemples/2_deploy_networkSettings.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { engine } from '../../migration/engine'; -import { deployedProxy, Migration } from '../engine/types'; -import { NextState as InitialState } from './1_deploy_proxyAdmin'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState & { - networkSettings: deployedProxy; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); - - const networkSettings = await deployProxy(proxyAdmin, contracts.NetworkSettings, []); - - return { - ...initialState, - - networkSettings: { - proxyContract: networkSettings.proxy.address, - logicContract: networkSettings.logicContractAddress - } - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const networkSettings = await contracts.NetworkSettings.attach(state.networkSettings.proxyContract); - - if ((await networkSettings.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/3_deploy_network.ts b/packages/v3/migration/exemples/3_deploy_network.ts deleted file mode 100644 index c85155ab3..000000000 --- a/packages/v3/migration/exemples/3_deploy_network.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { engine } from '../../migration/engine'; -import { deployedProxy, Migration } from '../engine/types'; -import { NextState as InitialState } from './2_deploy_networkSettings'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState & { - bancorNetwork: deployedProxy; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); - - const bancorNetwork = await deployProxy( - proxyAdmin, - contracts.BancorNetwork, - 'skipInit', - initialState.BNT.governance, - initialState.vBNT.governance, - initialState.networkSettings.proxyContract - ); - - return { - ...initialState, - - bancorNetwork: { - proxyContract: bancorNetwork.proxy.address, - logicContract: bancorNetwork.logicContractAddress - } - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => {}, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/4_deploy_vault.ts b/packages/v3/migration/exemples/4_deploy_vault.ts deleted file mode 100644 index fcb12c4d8..000000000 --- a/packages/v3/migration/exemples/4_deploy_vault.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { engine } from '../../migration/engine'; -import { deployedProxy, Migration } from '../engine/types'; -import { NextState as InitialState } from './3_deploy_network'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState & { - vault: deployedProxy; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); - - const bancorVault = await deployProxy(proxyAdmin, contracts.BancorVault, [], initialState.BNT.token); - - return { - ...initialState, - - vault: { - proxyContract: bancorVault.proxy.address, - logicContract: bancorVault.logicContractAddress - } - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const bancorVault = await contracts.BancorVault.attach(state.vault.proxyContract); - - if (!(await bancorVault.hasRole(await bancorVault.ROLE_ADMIN(), await signer.getAddress()))) - throw new Error('Invalid Owner'); - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/5_deploy_networkTokenPool.ts b/packages/v3/migration/exemples/5_deploy_networkTokenPool.ts deleted file mode 100644 index f37644e58..000000000 --- a/packages/v3/migration/exemples/5_deploy_networkTokenPool.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { engine } from '../../migration/engine'; -import { NETWORK_TOKEN_POOL_TOKEN_NAME, NETWORK_TOKEN_POOL_TOKEN_SYMBOL } from '../../test/helpers/Constants'; -import { deployedContract, deployedProxy, Migration } from '../engine/types'; -import { NextState as InitialState } from './4_deploy_vault'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState & { - networkTokenPool: deployedProxy; - networkPoolToken: deployedContract; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); - - const networkPoolToken = await contracts.PoolToken.deploy( - NETWORK_TOKEN_POOL_TOKEN_NAME, - NETWORK_TOKEN_POOL_TOKEN_SYMBOL, - initialState.BNT.token - ); - - const networkTokenPool = await deployProxy( - proxyAdmin, - contracts.NetworkTokenPool, - 'skipInit', - initialState.bancorNetwork.proxyContract, - initialState.vault.proxyContract, - networkPoolToken.address - ); - - await execute( - 'Transfer token ownership to NetworkTokenPool', - networkPoolToken.transferOwnership, - networkTokenPool.proxy.address - ); - - return { - ...initialState, - - networkTokenPool: { - proxyContract: networkTokenPool.proxy.address, - logicContract: networkTokenPool.logicContractAddress - }, - networkPoolToken: networkPoolToken.address - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => {}, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/6_deploy_pendingWithdrawals.ts b/packages/v3/migration/exemples/6_deploy_pendingWithdrawals.ts deleted file mode 100644 index 0883d0a5d..000000000 --- a/packages/v3/migration/exemples/6_deploy_pendingWithdrawals.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { engine } from '../../migration/engine'; -import { deployedProxy, Migration } from '../engine/types'; -import { NextState as InitialState } from './5_deploy_networkTokenPool'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState & { - pendingWithdrawals: deployedProxy; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); - - const pendingWithdrawals = await deployProxy( - proxyAdmin, - contracts.TestPendingWithdrawals, - [], - initialState.bancorNetwork.proxyContract, - initialState.networkTokenPool.proxyContract - ); - - const networkTokenPool = await contracts.NetworkTokenPool.attach(initialState.networkTokenPool.proxyContract); - await execute('Initialize NetworkTokenPool', networkTokenPool.initialize, pendingWithdrawals.proxy.address); - - return { - ...initialState, - - pendingWithdrawals: { - proxyContract: pendingWithdrawals.proxy.address, - logicContract: pendingWithdrawals.logicContractAddress - } - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const pendingWithdrawals = await contracts.PendingWithdrawals.attach(state.pendingWithdrawals.proxyContract); - - if ((await pendingWithdrawals.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/7_deploy_liquidityPoolCollection.ts b/packages/v3/migration/exemples/7_deploy_liquidityPoolCollection.ts deleted file mode 100644 index 2c04e9bea..000000000 --- a/packages/v3/migration/exemples/7_deploy_liquidityPoolCollection.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { engine } from '../../migration/engine'; -import { deployedContract, Migration } from '../engine/types'; -import { NextState as InitialState } from './6_deploy_pendingWithdrawals'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState & { - poolCollection: deployedContract; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const poolCollection = await deploy(contracts.PoolCollection, initialState.bancorNetwork.proxyContract); - return { - ...initialState, - - poolCollection: poolCollection.address - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const poolCollection = await contracts.PoolCollection.attach(state.poolCollection); - - if ((await poolCollection.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/8_deploy_initializeBancorNetwork.ts b/packages/v3/migration/exemples/8_deploy_initializeBancorNetwork.ts deleted file mode 100644 index 8314aa9f0..000000000 --- a/packages/v3/migration/exemples/8_deploy_initializeBancorNetwork.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { engine } from '../../migration/engine'; -import { Migration } from '../engine/types'; -import { NextState as InitialState } from './7_deploy_liquidityPoolCollection'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const bancorNetwork = await contracts.BancorNetwork.attach(initialState.bancorNetwork.proxyContract); - - await execute( - 'Initialize BancorNetwork', - bancorNetwork.initialize, - initialState.pendingWithdrawals.proxyContract - ); - - return initialState; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const bancorNetwork = await contracts.BancorNetwork.attach(state.bancorNetwork.proxyContract); - - if ((await bancorNetwork.owner()) !== (await signer.getAddress())) throw new Error('Invalid Owner'); - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/exemples/9_upgrade_networkSettings.ts b/packages/v3/migration/exemples/9_upgrade_networkSettings.ts deleted file mode 100644 index 9c29722c5..000000000 --- a/packages/v3/migration/exemples/9_upgrade_networkSettings.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { engine } from '../../migration/engine'; -import { Migration } from '../engine/types'; -import { NextState as InitialState } from './8_deploy_initializeBancorNetwork'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type NextState = InitialState; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const proxyAdmin = await contracts.ProxyAdmin.attach(initialState.proxyAdmin); - const networkSettings = await upgradeProxy( - proxyAdmin, - contracts.NetworkSettings, - initialState.networkSettings.proxyContract, - 'skipInit' - ); - - return { - ...initialState, - networkSettings: { ...initialState.networkSettings, logicContract: networkSettings.logicContractAddress } - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const proxyAdmin = await contracts.ProxyAdmin.attach(state.proxyAdmin); - - const implementationAddress = await proxyAdmin.getProxyImplementation(state.networkSettings.proxyContract); - if ( - implementationAddress !== state.networkSettings.logicContract || - implementationAddress === initialState.networkSettings.logicContract - ) { - throw new Error("Proxy haven't been properly upgraded"); - } - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index 92e953182..97b66e57f 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,5 +1,5 @@ -import { migrationLoader, basicTaskLoader } from './engine/loaders'; -import { defaultArgs } from './engine/types'; +import { migrationLoader, basicTaskLoader } from './engine/Loaders'; +import { defaultArgs } from './engine/Types'; import { task, types } from 'hardhat/config'; import path from 'path'; @@ -16,9 +16,7 @@ task('migrate', 'Migrate the network') export type createMigrationParamTask = { wordList: string[]; - customTimestamp: number; }; task('create-migration', 'Create a migration file') .addVariadicPositionalParam('wordList', 'Name of the migration') - .addOptionalParam('customTimestamp', 'Custom timestamp of the migration') .setAction(basicTaskLoader(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); diff --git a/packages/v3/migration/migrations/0_deploy_basics.ts b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts similarity index 85% rename from packages/v3/migration/migrations/0_deploy_basics.ts rename to packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts index ae1524ab6..e7d7bf72a 100644 --- a/packages/v3/migration/migrations/0_deploy_basics.ts +++ b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts @@ -1,5 +1,5 @@ import { engine } from '../engine'; -import { deployedContract, Migration } from '../engine/types'; +import { deployedContract, Migration } from '../engine/Types'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; @@ -27,11 +27,11 @@ const migration: Migration = { const vBNT = await contracts.vBNT.attach(state.vBNT); if ((await BNT.owner()) !== (await signer.getAddress())) { - throw new Error("BNT contract doesn't have the right owner"); + throw new Error("Signer doesn't match contract's owner"); } if ((await vBNT.owner()) !== (await signer.getAddress())) { - throw new Error("BNT contract doesn't have the right owner"); + throw new Error("Signer doesn't match contract's owner"); } }, @@ -39,4 +39,5 @@ const migration: Migration = { return initialState; } }; + export default migration; diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts index bd83d517c..1b9429092 100644 --- a/packages/v3/migration/tasks/createMigration.ts +++ b/packages/v3/migration/tasks/createMigration.ts @@ -1,48 +1,38 @@ -import { createMigrationParamTask } from '../../migration'; -import { MIGRATION_FOLDER } from '../../migration/engine/constant'; -import { log } from '../engine/logger'; +import { createMigrationParamTask } from '..'; +import { MIGRATION_FOLDER } from '../engine/Constant'; +import { log } from '../engine/Logger'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import path from 'path'; export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { - const templateMigrationFile = `import { engine } from '../../migration/engine'; -import { deployedContract, Migration } from '../../migration/engine/types'; - + const templateMigrationFile = `import { engine } from '../engine'; +import { deployedContract, Migration } from '../engine/Types'; +import { BigNumber } from 'ethers'; + const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; -export type InitialState = {}; +export type InitialState = unknown; export type NextState = InitialState & { - BNT: { token: deployedContract; governance: deployedContract }; + myToken: deployedContract; }; const migration: Migration = { up: async (initialState: InitialState): Promise => { - const BNTToken = await deploy( - contracts.TestERC20Token, - 'Bancor Network Token', - 'BNT', - '100000000000000000000000000' - ); - - const BNTGovernance = await deploy(contracts.TokenGovernance, BNTToken.address); - + const myToken = await deploy(contracts.TestERC20Token, 'My Token', 'MYTKN', '100000000000000000000000000'); return { - ...initialState, - - BNT: { - token: BNTToken.address, - governance: BNTGovernance.address - } + myToken: myToken.address }; }, healthCheck: async (initialState: InitialState, state: NextState) => { - const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); - if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new Error('Invalid Role'); + const myToken = await contracts.TestERC20Token.attach(state.myToken); + + if (!((await myToken.totalSupply()) !== BigNumber.from('100000000000000000000000000'))) { + throw new Error("Total supply isnt' correct"); + } }, down: async (initialState: InitialState, newState: NextState): Promise => { @@ -51,7 +41,6 @@ const migration: Migration = { }; export default migration; - `; let migrationName = ''; @@ -59,7 +48,7 @@ export default migration; migrationName += '_' + a; } - const migrationTimestamp = args.customTimestamp || Date.now(); + const migrationTimestamp = Date.now(); const fileName = `${migrationTimestamp}${migrationName}.ts`; diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate.ts index 8b0848470..946f659c0 100644 --- a/packages/v3/migration/tasks/migrate.ts +++ b/packages/v3/migration/tasks/migrate.ts @@ -1,4 +1,4 @@ -import { engine } from '../../migration/engine'; +import { engine } from '../engine'; export default async () => { await engine.migrate(); diff --git a/packages/v3/migration/test/engine.test.ts b/packages/v3/migration/test/engine.test.ts index eedcb1adb..432d84c4a 100644 --- a/packages/v3/migration/test/engine.test.ts +++ b/packages/v3/migration/test/engine.test.ts @@ -1,5 +1,5 @@ import { engine } from '../engine'; -import { initEngine } from './helpers/init'; +import { initEngine } from './helpers/Init'; import { expect } from 'chai'; describe('init engine', () => { diff --git a/packages/v3/migration/test/helpers/init.ts b/packages/v3/migration/test/helpers/init.ts index ad09ace9b..2f335fbb4 100644 --- a/packages/v3/migration/test/helpers/init.ts +++ b/packages/v3/migration/test/helpers/init.ts @@ -1,4 +1,4 @@ -import { initEngine as init } from '../../../migration/engine'; +import { initEngine as init } from '../../engine'; import hre from 'hardhat'; import path from 'path/posix'; diff --git a/packages/v3/migration/test/singleMigrations/basic.ts b/packages/v3/migration/test/singleMigrations/basic.ts index 1cb105e3b..5bc9e6d2b 100644 --- a/packages/v3/migration/test/singleMigrations/basic.ts +++ b/packages/v3/migration/test/singleMigrations/basic.ts @@ -1,5 +1,5 @@ import { engine } from '../../engine'; -import { deployedContract, Migration } from '../../engine/types'; +import { deployedContract, Migration } from '../../engine/Types'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; diff --git a/packages/v3/migration/test/singleMigrations/throw.ts b/packages/v3/migration/test/singleMigrations/throw.ts index 6b32ad34d..4c6acdd84 100644 --- a/packages/v3/migration/test/singleMigrations/throw.ts +++ b/packages/v3/migration/test/singleMigrations/throw.ts @@ -1,5 +1,5 @@ import { engine } from '../../engine'; -import { deployedContract, Migration } from '../../engine/types'; +import { deployedContract, Migration } from '../../engine/Types'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; From c102576833645f2bc75951ee7327f413c663c03c Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Sat, 18 Sep 2021 16:53:29 +0200 Subject: [PATCH 073/164] change error message --- .../v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts index e7d7bf72a..8b4126f9e 100644 --- a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts +++ b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts @@ -27,11 +27,11 @@ const migration: Migration = { const vBNT = await contracts.vBNT.attach(state.vBNT); if ((await BNT.owner()) !== (await signer.getAddress())) { - throw new Error("Signer doesn't match contract's owner"); + throw new Error("current signer doesn't match contract's owner"); } if ((await vBNT.owner()) !== (await signer.getAddress())) { - throw new Error("Signer doesn't match contract's owner"); + throw new Error("current signer doesn't match contract's owner"); } }, From 4e6bcc494b37211f662007109db4083c2941a016 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 20:56:14 +0100 Subject: [PATCH 074/164] Don't continue the migration after a reset --- packages/v3/migration/engine/engine.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index 1fdd7cdd0..e09c3adad 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -86,6 +86,8 @@ export class Engine { if (args.reset) { this.reset(); + + return; } this.init(); From a42bea139a0a1f8eb38a10591d33cedd67861804 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 20:58:34 +0100 Subject: [PATCH 075/164] constant --> Constants --- .../migration/engine/{constant.ts => Constants.ts} | 0 packages/v3/migration/engine/engine.ts | 2 +- packages/v3/migration/tasks/createMigration.ts | 14 +++++++------- 3 files changed, 8 insertions(+), 8 deletions(-) rename packages/v3/migration/engine/{constant.ts => Constants.ts} (100%) diff --git a/packages/v3/migration/engine/constant.ts b/packages/v3/migration/engine/Constants.ts similarity index 100% rename from packages/v3/migration/engine/constant.ts rename to packages/v3/migration/engine/Constants.ts diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine.ts index e09c3adad..e6d8b60dc 100644 --- a/packages/v3/migration/engine/engine.ts +++ b/packages/v3/migration/engine/engine.ts @@ -1,6 +1,6 @@ import Contracts, { ContractsType } from '../../components/Contracts'; import { CONFIG } from '../../hardhat.extended.config'; -import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './Constant'; +import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './Constants'; import { initExecutionFunctions } from './ExecutionFunctions'; import { initIO } from './Io'; import { log } from './Logger'; diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts index 1b9429092..0c750ee02 100644 --- a/packages/v3/migration/tasks/createMigration.ts +++ b/packages/v3/migration/tasks/createMigration.ts @@ -1,5 +1,5 @@ import { createMigrationParamTask } from '..'; -import { MIGRATION_FOLDER } from '../engine/Constant'; +import { MIGRATION_FOLDER } from '../engine/Constants'; import { log } from '../engine/Logger'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; @@ -12,13 +12,13 @@ import { BigNumber } from 'ethers'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - + export type InitialState = unknown; - + export type NextState = InitialState & { myToken: deployedContract; }; - + const migration: Migration = { up: async (initialState: InitialState): Promise => { const myToken = await deploy(contracts.TestERC20Token, 'My Token', 'MYTKN', '100000000000000000000000000'); @@ -26,15 +26,15 @@ const migration: Migration = { myToken: myToken.address }; }, - + healthCheck: async (initialState: InitialState, state: NextState) => { const myToken = await contracts.TestERC20Token.attach(state.myToken); - + if (!((await myToken.totalSupply()) !== BigNumber.from('100000000000000000000000000'))) { throw new Error("Total supply isnt' correct"); } }, - + down: async (initialState: InitialState, newState: NextState): Promise => { return initialState; } From ab15b1ec422ea16b7e7efcd5ac2ce5419d362cd0 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 20:59:02 +0100 Subject: [PATCH 076/164] Temp rename --- packages/v3/migration/engine/{engine.ts => engine2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{engine.ts => engine2.ts} (100%) diff --git a/packages/v3/migration/engine/engine.ts b/packages/v3/migration/engine/engine2.ts similarity index 100% rename from packages/v3/migration/engine/engine.ts rename to packages/v3/migration/engine/engine2.ts From 9c80e0ed6db6c27d32d9fb53829e28a73c8c3814 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 20:59:33 +0100 Subject: [PATCH 077/164] engine --> Engine --- packages/v3/migration/engine/{engine2.ts => Engine.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{engine2.ts => Engine.ts} (100%) diff --git a/packages/v3/migration/engine/engine2.ts b/packages/v3/migration/engine/Engine.ts similarity index 100% rename from packages/v3/migration/engine/engine2.ts rename to packages/v3/migration/engine/Engine.ts From c27262a4bd428017e2fa945fd77b2e1385f63706 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:04:41 +0100 Subject: [PATCH 078/164] Refactor --- packages/v3/migration/engine/Engine.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index e6d8b60dc..6a888e945 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -31,7 +31,7 @@ export class Engine { readonly pathToMigrationsFolder: string; readonly pathToNetworkDeploymentsFolder: string; - // init additional functionnalities + // init additional functionalities readonly IO = initIO(this); readonly executionFunctions = initExecutionFunctions(this); @@ -55,7 +55,7 @@ export class Engine { this.hre = hre; // init network settings - const hardhatForkConfig = CONFIG.hardhatForkConfig; + const { hardhatForkConfig } = CONFIG; const networkName = hardhatForkConfig?.networkName || network.name; this.networkSettings = { @@ -93,7 +93,7 @@ export class Engine { this.init(); } - // engine healthcheck + // engine health-check checkForFailures = () => { // some configuration should only reserve for forked network or hardhat networks const isForkOrHardhat = this.networkSettings.isFork || this.networkSettings.networkName === 'hardhat'; @@ -108,7 +108,7 @@ export class Engine { }; reset = () => { - log.warning(`Resetting ${this.networkSettings.networkName} migratation folder`); + log.warning(`Resetting ${this.networkSettings.networkName} migration folder`); fs.rmSync(this.pathToNetworkFolder, { recursive: true, force: true @@ -146,7 +146,7 @@ export class Engine { fs.copySync(pathToOriginalNetworkFolder, this.pathToNetworkFolder); } catch { log.error( - `${this.networkSettings.originalNetwork} doesn't have a correct config (needed if you want to fork it), aborting.` + `${this.networkSettings.originalNetwork} doesn't have a correct config (needed if you want to fork it). Aborting` ); process.exit(); } @@ -158,7 +158,7 @@ export class Engine { // if network folder does exist but isn't valid, resetting it. if (!isMigrationFolderValid(this.pathToNetworkFolder)) { - log.warning(`${this.networkSettings.networkName} migratation folder is invalid, resetting it ...`); + log.warning(`${this.networkSettings.networkName} migration folder is invalid, resetting it...`); this.reset(); this.initMigrationDefaultFolder(); } @@ -175,6 +175,7 @@ export class Engine { for (const migrationFilePath of migrationFilesPath) { const fileName = path.basename(migrationFilePath); const migrationId = Number(fileName.split('_')[0]); + // store migration that are only after the latest migration if (migrationId > this.migration.state.migrationState.latestMigration) { this.migration.migrationsData.push({ From b7af9f10dbd8be25352ac26e8190315c7fd90ced Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:04:57 +0100 Subject: [PATCH 079/164] Temp rename --- .../engine/{executionFunctions.ts => executionFunctions2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{executionFunctions.ts => executionFunctions2.ts} (100%) diff --git a/packages/v3/migration/engine/executionFunctions.ts b/packages/v3/migration/engine/executionFunctions2.ts similarity index 100% rename from packages/v3/migration/engine/executionFunctions.ts rename to packages/v3/migration/engine/executionFunctions2.ts From b0626fb41f83bd00ad0cae5d648477f60b910caf Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:05:21 +0100 Subject: [PATCH 080/164] executionFunctions --> ExecutionFunctions --- .../engine/{executionFunctions2.ts => ExecutionFunctions.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{executionFunctions2.ts => ExecutionFunctions.ts} (100%) diff --git a/packages/v3/migration/engine/executionFunctions2.ts b/packages/v3/migration/engine/ExecutionFunctions.ts similarity index 100% rename from packages/v3/migration/engine/executionFunctions2.ts rename to packages/v3/migration/engine/ExecutionFunctions.ts From fc3cc6961b2a3f2a566d4dbaa69c6a64d04df5cf Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:23:38 +0100 Subject: [PATCH 081/164] Refactor --- .../v3/migration/engine/ExecutionFunctions.ts | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/packages/v3/migration/engine/ExecutionFunctions.ts b/packages/v3/migration/engine/ExecutionFunctions.ts index e918a6fec..f01116196 100644 --- a/packages/v3/migration/engine/ExecutionFunctions.ts +++ b/packages/v3/migration/engine/ExecutionFunctions.ts @@ -4,7 +4,7 @@ import { Engine } from './Engine'; import { log } from './Logger'; import { ContractFactory, ContractReceipt, ContractTransaction } from 'ethers'; -type initializeArgs = Parameters | 'skipInit'; +type initializeArgs = Parameters; type proxy = { proxy: Contract; logicContractAddress: string }; export const initExecutionFunctions = (engine: Engine) => { @@ -13,9 +13,10 @@ export const initExecutionFunctions = (engine: Engine) => { ...args: Parameters['deploy']> ): Promise['deploy']>> => { log.basicExecutionHeader('Deploying', `${factory.metadata.contractName} 🚀 `, args); + const contract = await factory.deploy(...([...args, engine.overrides] as any)); - log.debug(`Deployment Tx: `, contract.deployTransaction.hash); + log.debug(`Deployment tx: `, contract.deployTransaction.hash); log.greyed(`Waiting to be mined...`); const receipt = await contract.deployTransaction.wait(engine.executionSettings.confirmationToWait); @@ -30,7 +31,9 @@ export const initExecutionFunctions = (engine: Engine) => { description: factory.metadata.contractName, tx: contract.deployTransaction.hash }); + log.success(`Deployed ${factory.metadata.contractName} at ${contract.address} 🚀 !`); + return contract; }; @@ -42,19 +45,23 @@ export const initExecutionFunctions = (engine: Engine) => { log.basicExecutionHeader('Executing', executionInstruction, args); const tx = await func(...args, engine.overrides); + log.debug(`Executing tx: `, tx.hash); const receipt = await tx.wait(engine.executionSettings.confirmationToWait); if (receipt.status !== 1) { throw new Error(`Error executing, tx: ${tx.hash}`); } + engine.IO.history.writeOne({ type: 'EXECUTION', params: args, description: executionInstruction, tx: tx.hash }); + log.success(`Executed ✨`); + return receipt; }; @@ -62,15 +69,14 @@ export const initExecutionFunctions = (engine: Engine) => { admin: ProxyAdmin, logicContractToDeploy: ContractBuilder, initializeArgs: initializeArgs, - ...ctorArgs: Parameters + ctorArgs: Parameters, + skipInitialization?: boolean ): Promise> => { log.debug('Deploying proxy'); + const logicContract = await deploy(logicContractToDeploy, ...ctorArgs); - const data = - initializeArgs === 'skipInit' - ? [] - : logicContract.interface.encodeFunctionData('initialize', initializeArgs); + const data = skipInitialization ? [] : logicContract.interface.encodeFunctionData('initialize', initializeArgs); const proxy = await deploy( engine.contracts.TransparentUpgradeableProxy, @@ -80,6 +86,7 @@ export const initExecutionFunctions = (engine: Engine) => { ); log.success('Proxy deployed 🚀 '); + return { proxy: await logicContractToDeploy.attach(proxy.address), logicContractAddress: logicContract.address @@ -90,20 +97,20 @@ export const initExecutionFunctions = (engine: Engine) => { admin: ProxyAdmin, logicContractToDeploy: ContractBuilder, proxyAddress: string, - initializeArgs: - | { - params: Parameters; - initializeFctName: string; - } - | 'skipInit', - ...ctorArgs: Parameters + initializeArgs: { + params: Parameters; + initializeFctName: string; + }, + ctorArgs: Parameters, + skipInitialization?: boolean ): Promise> => { log.debug('Upgrading proxy'); + const newLogicContract = await deploy(logicContractToDeploy, ...ctorArgs); - if (initializeArgs === 'skipInit') + if (skipInitialization) { await execute('Upgrading proxy', admin.upgrade, proxyAddress, newLogicContract.address); - else + } else { await execute( `Upgrading proxy and call ${initializeArgs.initializeFctName}`, admin.upgradeAndCall, @@ -111,8 +118,10 @@ export const initExecutionFunctions = (engine: Engine) => { newLogicContract.address, newLogicContract.interface.encodeFunctionData(initializeArgs.initializeFctName, initializeArgs.params) ); + } log.success('Proxy upgraded 🚀 '); + return { proxy: await logicContractToDeploy.attach(proxyAddress), logicContractAddress: newLogicContract.address From 17c1753f3736012b8b1bba563d1a24a2bd6192d3 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:24:14 +0100 Subject: [PATCH 082/164] Style --- packages/v3/migration/engine/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index 2d2e0795d..7c29849dc 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -15,7 +15,9 @@ const initSigner = async (args: defaultArgs) => { ? new LedgerSigner(ethers.provider, 'hid', args.ledgerPath) : (await ethers.getSigners())[0]; - if (!signer) throw new Error("Signer shouldn't be undefined"); + if (!signer) { + throw new Error("Signer shouldn't be undefined"); + } const signerAddress = await signer.getAddress(); From 49aaadb6cd6877cb0de411afba2362257388648a Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:24:31 +0100 Subject: [PATCH 083/164] Temp rename --- packages/v3/migration/engine/{io.ts => io2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{io.ts => io2.ts} (100%) diff --git a/packages/v3/migration/engine/io.ts b/packages/v3/migration/engine/io2.ts similarity index 100% rename from packages/v3/migration/engine/io.ts rename to packages/v3/migration/engine/io2.ts From 1b637a628bfbd7d3455cade0f99493065d98dd06 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:30:28 +0100 Subject: [PATCH 084/164] Replacer + style --- packages/v3/migration/engine/Constants.ts | 3 ++ .../v3/migration/engine/{io2.ts => Io.ts} | 37 ++++++++++++++----- 2 files changed, 31 insertions(+), 9 deletions(-) rename packages/v3/migration/engine/{io2.ts => Io.ts} (79%) diff --git a/packages/v3/migration/engine/Constants.ts b/packages/v3/migration/engine/Constants.ts index 955839d1d..455c888e9 100644 --- a/packages/v3/migration/engine/Constants.ts +++ b/packages/v3/migration/engine/Constants.ts @@ -3,6 +3,9 @@ import { MigrationData, SystemDeployments, SystemState } from './Types'; export const MIGRATION_FOLDER = 'migration/migrations'; export const MIGRATION_DATA_FOLDER = 'migration/data'; +export const MIGRATION_HISTORY_FILE_NAME = 'history.json'; +export const MIGRATION_STATE_FILE_NAME = 'state.json'; + export const defaultMigration: { state: SystemState; deployment: SystemDeployments; diff --git a/packages/v3/migration/engine/io2.ts b/packages/v3/migration/engine/Io.ts similarity index 79% rename from packages/v3/migration/engine/io2.ts rename to packages/v3/migration/engine/Io.ts index 9892fc028..1abf22506 100644 --- a/packages/v3/migration/engine/io2.ts +++ b/packages/v3/migration/engine/Io.ts @@ -1,32 +1,48 @@ -import { Engine } from './Engine'; -import { Deployment, History, HistoryExecution, SystemDeployments, SystemState } from './Types'; +import { BigNumber } from 'ethers'; import fs from 'fs'; import path from 'path'; +import { MIGRATION_HISTORY_FILE_NAME, MIGRATION_STATE_FILE_NAME } from './Constants'; +import { Engine } from './Engine'; +import { Deployment, History, HistoryExecution, SystemDeployments, SystemState } from './Types'; + +const replacer = (_: any, value: any) => { + const { type, hex } = value; + if (type === 'BigNumber') { + return BigNumber.from(hex).toString(); + } + + return value; +}; export const initIO = (engine: Engine) => { return { state: { write: (state: SystemState) => { fs.writeFileSync( - path.join(engine.pathToNetworkFolder, 'state.json'), - JSON.stringify(state, null, 4) + `\n` + path.join(engine.pathToNetworkFolder, MIGRATION_STATE_FILE_NAME), + JSON.stringify(state, replacer, 4) + `\n` ); + return state; }, + fetch: (pathToState: string) => { - return JSON.parse(fs.readFileSync(path.join(pathToState, 'state.json'), 'utf-8')) as SystemState; + return JSON.parse( + fs.readFileSync(path.join(pathToState, MIGRATION_STATE_FILE_NAME), 'utf-8') + ) as SystemState; } }, + history: { write: (history: History) => { fs.writeFileSync( - path.join(engine.pathToNetworkFolder, 'history.json'), - JSON.stringify(history, null, 4) + `\n` + path.join(engine.pathToNetworkFolder, MIGRATION_HISTORY_FILE_NAME), + JSON.stringify(history, replacer, 4) + `\n` ); return history; }, writeOne: (historyExecution: HistoryExecution) => { - const migrationHistoryFileName = 'history.json'; + const migrationHistoryFileName = MIGRATION_HISTORY_FILE_NAME; // find the history file in the network folder const pathToNetworkFolderFiles = fs.readdirSync(engine.pathToNetworkFolder); @@ -47,12 +63,15 @@ export const initIO = (engine: Engine) => { engine.IO.history.write(currentHistory); }, fetch: (pathToHistory: string) => { - return JSON.parse(fs.readFileSync(path.join(pathToHistory, 'history.json'), 'utf-8')) as History; + return JSON.parse( + fs.readFileSync(path.join(pathToHistory, MIGRATION_HISTORY_FILE_NAME), 'utf-8') + ) as History; } }, deployment: { write: (pathToWrite: string, deployments: SystemDeployments) => { fs.writeFileSync(pathToWrite, JSON.stringify(deployments, null, 4) + `\n`); + return deployments; }, writeOne: (deployment: Deployment) => { From 88627f6d9fbb511d14813025cfbc112e06f468b1 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:30:39 +0100 Subject: [PATCH 085/164] Temp rename --- packages/v3/migration/engine/{loaders.ts => loaders2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{loaders.ts => loaders2.ts} (100%) diff --git a/packages/v3/migration/engine/loaders.ts b/packages/v3/migration/engine/loaders2.ts similarity index 100% rename from packages/v3/migration/engine/loaders.ts rename to packages/v3/migration/engine/loaders2.ts From b7547231d4d1a58ec6fc4412f32c40ea9348693f Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:31:02 +0100 Subject: [PATCH 086/164] Capitalize --- packages/v3/migration/engine/{loaders2.ts => Loaders.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{loaders2.ts => Loaders.ts} (100%) diff --git a/packages/v3/migration/engine/loaders2.ts b/packages/v3/migration/engine/Loaders.ts similarity index 100% rename from packages/v3/migration/engine/loaders2.ts rename to packages/v3/migration/engine/Loaders.ts From 843fe0e5443dc8a02b195d7ed34d2bbc44270c55 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:31:33 +0100 Subject: [PATCH 087/164] Style --- packages/v3/migration/engine/Loaders.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/v3/migration/engine/Loaders.ts b/packages/v3/migration/engine/Loaders.ts index 7bd69dc43..d44c1b372 100644 --- a/packages/v3/migration/engine/Loaders.ts +++ b/packages/v3/migration/engine/Loaders.ts @@ -7,6 +7,7 @@ export const basicTaskLoader = (pathToAction: string) => { ? pathToAction : path.join(hre.config.paths.root, pathToAction); const task = importCsjOrEsModule(actualPath); + return task(taskArgs, hre); }; }; @@ -14,6 +15,7 @@ export const basicTaskLoader = (pathToAction: string) => { export const migrationLoader = (pathToAction: string) => { return (taskArgs: any, hre: any) => { const loader = importCsjOrEsModule(path.join(hre.config.paths.root, 'migration/engine/index.ts')); + return loader(taskArgs, hre, basicTaskLoader(pathToAction)); }; }; From b4c711fc2a2f6bcfdfaaae11daf2623e47e43b09 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:31:47 +0100 Subject: [PATCH 088/164] Temp rename --- packages/v3/migration/engine/{logger.ts => logger2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{logger.ts => logger2.ts} (100%) diff --git a/packages/v3/migration/engine/logger.ts b/packages/v3/migration/engine/logger2.ts similarity index 100% rename from packages/v3/migration/engine/logger.ts rename to packages/v3/migration/engine/logger2.ts From 3491d9e5b44d7c84ba3c60ff249050a6a1950c93 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:32:02 +0100 Subject: [PATCH 089/164] Capitalize --- packages/v3/migration/engine/{logger2.ts => Logger.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{logger2.ts => Logger.ts} (100%) diff --git a/packages/v3/migration/engine/logger2.ts b/packages/v3/migration/engine/Logger.ts similarity index 100% rename from packages/v3/migration/engine/logger2.ts rename to packages/v3/migration/engine/Logger.ts From 38823f52e2457a922ac03abded572013a6fe7cfe Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:32:40 +0100 Subject: [PATCH 090/164] Style --- packages/v3/migration/engine/Logger.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/engine/Logger.ts b/packages/v3/migration/engine/Logger.ts index 244c24bec..e4b8dd1a1 100644 --- a/packages/v3/migration/engine/Logger.ts +++ b/packages/v3/migration/engine/Logger.ts @@ -1,8 +1,8 @@ +import chalk from 'chalk'; +import { Overrides } from 'ethers'; import { test } from '.'; import { Engine } from './Engine'; import { ExecutionSettings } from './Types'; -import chalk from 'chalk'; -import { Overrides } from 'ethers'; // in order to prevent printing in tests const customConsole = { From a4c005ebfba865bf13522a840a0a727cd0e20eaa Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:33:05 +0100 Subject: [PATCH 091/164] Temp rename --- packages/v3/migration/engine/{migrate.ts => migrate2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{migrate.ts => migrate2.ts} (100%) diff --git a/packages/v3/migration/engine/migrate.ts b/packages/v3/migration/engine/migrate2.ts similarity index 100% rename from packages/v3/migration/engine/migrate.ts rename to packages/v3/migration/engine/migrate2.ts From 9c528e15e25be54084277b0b58642fb8359a3a99 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:33:25 +0100 Subject: [PATCH 092/164] Capitalize --- packages/v3/migration/engine/{migrate2.ts => Migrate.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{migrate2.ts => Migrate.ts} (100%) diff --git a/packages/v3/migration/engine/migrate2.ts b/packages/v3/migration/engine/Migrate.ts similarity index 100% rename from packages/v3/migration/engine/migrate2.ts rename to packages/v3/migration/engine/Migrate.ts From e1fc2ef653ecfc1853f086e601d7ea9bae6b71e1 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:35:52 +0100 Subject: [PATCH 093/164] Style --- packages/v3/migration/engine/Migrate.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/v3/migration/engine/Migrate.ts b/packages/v3/migration/engine/Migrate.ts index c9c193209..c03075cba 100644 --- a/packages/v3/migration/engine/Migrate.ts +++ b/packages/v3/migration/engine/Migrate.ts @@ -19,16 +19,19 @@ export const migrateOneUp = async ( try { await migration.healthCheck(oldNetworkState, newNetworkState); + log.success('Health check success ✨ '); } catch (e: any) { log.error('Health check failed'); log.error(e.stack); + return undefined; } } catch (e: any) { log.error('Migration up failed'); log.error(e.stack); log.error('Aborting.'); + exit(-1); } @@ -50,6 +53,7 @@ export const migrateOneDown = async ( log.error('Migration down failed'); log.error(e.stack); log.error('Aborting.'); + exit(-1); } @@ -65,16 +69,18 @@ export const migrate = async (engine: Engine) => { // if there is no migration to run, exit if (engine.migration.migrationsData.length === 0) { log.done(`Nothing to migrate ⚡️`); + return; } engine.migration.stateSaves.push({ ...engine.migration.state }); let index = 0; - for (; index < engine.migration.migrationsData.length; index++) { + while (index++ < engine.migration.migrationsData.length) { const migrationData = engine.migration.migrationsData[index]; const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + log.info(`Executing ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); // save the current migration data @@ -86,7 +92,10 @@ export const migrate = async (engine: Engine) => { engine.migration.stateSaves[index].networkState, engine.migration.state.networkState ); - if (!newSystemState) break; + + if (!newSystemState) { + break; + } // update migration state engine.migration.state = newSystemState; @@ -98,11 +107,13 @@ export const migrate = async (engine: Engine) => { engine.IO.state.write(newSystemState); } - // if the index of the latest migration is not equal to the length of the migrationsData array then an error occured an we should revert + // if the index of the latest migration is not equal to the length of the migrationsData array then an error occurred + // an we should revert if (index !== engine.migration.migrationsData.length) { const migrationData = engine.migration.migrationsData[index]; const migration: Migration = importCsjOrEsModule(migrationData.fullPath); + log.info(`Reverting ${migrationData.fileName}, timestamp: ${migrationData.migrationTimestamp}`); const newSystemState = await migrateOneDown( @@ -122,6 +133,7 @@ export const migrate = async (engine: Engine) => { path.join(engine.pathToNetworkDeploymentsFolder, engine.migration.currentMigrationData.fileName + '.json'), { force: true } ); + log.success(`${engine.migration.currentMigrationData.fileName} reverted`); } From 4689fef3f560aa820251d0203fcffb94280cfef5 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:36:03 +0100 Subject: [PATCH 094/164] Temp rename --- packages/v3/migration/engine/{types.ts => types2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{types.ts => types2.ts} (100%) diff --git a/packages/v3/migration/engine/types.ts b/packages/v3/migration/engine/types2.ts similarity index 100% rename from packages/v3/migration/engine/types.ts rename to packages/v3/migration/engine/types2.ts From 87447fa9aeb1bbec809c8ffc9640846c9bdc2d76 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:36:26 +0100 Subject: [PATCH 095/164] Capitalize --- packages/v3/migration/engine/{types2.ts => Types.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{types2.ts => Types.ts} (100%) diff --git a/packages/v3/migration/engine/types2.ts b/packages/v3/migration/engine/Types.ts similarity index 100% rename from packages/v3/migration/engine/types2.ts rename to packages/v3/migration/engine/Types.ts From e66a53cee74482136670121e21f0af9a4a21679c Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:36:54 +0100 Subject: [PATCH 096/164] Temp rename --- packages/v3/migration/engine/{utils.ts => utils2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{utils.ts => utils2.ts} (100%) diff --git a/packages/v3/migration/engine/utils.ts b/packages/v3/migration/engine/utils2.ts similarity index 100% rename from packages/v3/migration/engine/utils.ts rename to packages/v3/migration/engine/utils2.ts From 296017f46af175a3daa617b11aba4217bd810901 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:37:12 +0100 Subject: [PATCH 097/164] Capitalize --- packages/v3/migration/engine/{utils2.ts => Utils.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{utils2.ts => Utils.ts} (100%) diff --git a/packages/v3/migration/engine/utils2.ts b/packages/v3/migration/engine/Utils.ts similarity index 100% rename from packages/v3/migration/engine/utils2.ts rename to packages/v3/migration/engine/Utils.ts From c9645eb4f82e361f2b9567a2f2e4b03329343ddc Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:41:53 +0100 Subject: [PATCH 098/164] Style --- packages/v3/migration/engine/Constants.ts | 1 + packages/v3/migration/engine/Engine.ts | 18 +++++++++--------- packages/v3/migration/engine/Io.ts | 7 +++++-- packages/v3/migration/engine/Utils.ts | 14 +++++++------- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/packages/v3/migration/engine/Constants.ts b/packages/v3/migration/engine/Constants.ts index 455c888e9..5e4d41690 100644 --- a/packages/v3/migration/engine/Constants.ts +++ b/packages/v3/migration/engine/Constants.ts @@ -2,6 +2,7 @@ import { MigrationData, SystemDeployments, SystemState } from './Types'; export const MIGRATION_FOLDER = 'migration/migrations'; export const MIGRATION_DATA_FOLDER = 'migration/data'; +export const MIGRATION_DEPLOYMENTS_FOLDER = 'deployments'; export const MIGRATION_HISTORY_FILE_NAME = 'history.json'; export const MIGRATION_STATE_FILE_NAME = 'state.json'; diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index 6a888e945..6c95d1388 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -1,18 +1,18 @@ +import { Overrides, Signer } from 'ethers'; +import { parseUnits } from 'ethers/lib/utils'; +import fs from 'fs-extra'; +import { network } from 'hardhat'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import path from 'path'; import Contracts, { ContractsType } from '../../components/Contracts'; import { CONFIG } from '../../hardhat.extended.config'; -import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_FOLDER } from './Constants'; +import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_DEPLOYMENTS_FOLDER, MIGRATION_FOLDER } from './Constants'; import { initExecutionFunctions } from './ExecutionFunctions'; import { initIO } from './Io'; import { log } from './Logger'; import { migrate, migrateOneDown, migrateOneUp } from './Migrate'; import { defaultArgs, ExecutionSettings, NetworkSettings } from './Types'; import { isMigrationFolderValid } from './Utils'; -import { Overrides, Signer } from 'ethers'; -import { parseUnits } from 'ethers/lib/utils'; -import fs from 'fs-extra'; -import { network } from 'hardhat'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import path from 'path'; export class Engine { readonly hre: HardhatRuntimeEnvironment; @@ -68,7 +68,7 @@ export class Engine { this.pathToRoot = pathToRoot; this.pathToMigrationsFolder = path.join(pathToRoot, MIGRATION_FOLDER); this.pathToNetworkFolder = path.join(this.pathToRoot, MIGRATION_DATA_FOLDER, this.networkSettings.networkName); - this.pathToNetworkDeploymentsFolder = path.join(this.pathToNetworkFolder, 'deployments'); + this.pathToNetworkDeploymentsFolder = path.join(this.pathToNetworkFolder, MIGRATION_DEPLOYMENTS_FOLDER); // init basics this.signer = signer; @@ -121,7 +121,7 @@ export class Engine { fs.mkdirSync(this.pathToNetworkFolder); // init the network deployment folder - fs.mkdirSync(path.join(this.pathToNetworkFolder, 'deployments')); + fs.mkdirSync(path.join(this.pathToNetworkFolder, MIGRATION_DEPLOYMENTS_FOLDER)); // initialize the first state to default this.IO.state.write(defaultMigration.state); diff --git a/packages/v3/migration/engine/Io.ts b/packages/v3/migration/engine/Io.ts index 1abf22506..4e57d5de0 100644 --- a/packages/v3/migration/engine/Io.ts +++ b/packages/v3/migration/engine/Io.ts @@ -1,7 +1,7 @@ import { BigNumber } from 'ethers'; import fs from 'fs'; import path from 'path'; -import { MIGRATION_HISTORY_FILE_NAME, MIGRATION_STATE_FILE_NAME } from './Constants'; +import { MIGRATION_HISTORY_FILE_NAME, MIGRATION_STATE_FILE_NAME, MIGRATION_DEPLOYMENTS_FOLDER } from './Constants'; import { Engine } from './Engine'; import { Deployment, History, HistoryExecution, SystemDeployments, SystemState } from './Types'; @@ -78,7 +78,10 @@ export const initIO = (engine: Engine) => { const currentMigrationDeploymentFileName = engine.migration.currentMigrationData.fileName + '.json'; // find the migration file in the network deployments folder - const pathToNetworkMigrationDeploymentFolder = path.join(engine.pathToNetworkFolder, 'deployments'); + const pathToNetworkMigrationDeploymentFolder = path.join( + engine.pathToNetworkFolder, + MIGRATION_DEPLOYMENTS_FOLDER + ); // read all files into the folder and fetch needed file const pathToMigrationDeploymentFiles = fs.readdirSync(pathToNetworkMigrationDeploymentFolder); diff --git a/packages/v3/migration/engine/Utils.ts b/packages/v3/migration/engine/Utils.ts index 74b4a7879..edab07664 100644 --- a/packages/v3/migration/engine/Utils.ts +++ b/packages/v3/migration/engine/Utils.ts @@ -1,14 +1,14 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ import fs from 'fs-extra'; +import path from 'path'; +import { MIGRATION_DEPLOYMENTS_FOLDER, MIGRATION_STATE_FILE_NAME } from './Constants'; export const importCsjOrEsModule = (filePath: string) => { + // eslint-disable-next-line @typescript-eslint/no-var-requires const imported = require(filePath); return imported.default || imported; }; -export const isMigrationFolderValid = (path: string) => { - if (!fs.existsSync(path)) return false; - if (!fs.readdirSync(path).find((f: string) => f === 'state.json')) return false; - if (!fs.existsSync(path + '/deployments')) return false; - return true; -}; +export const isMigrationFolderValid = (dir: string) => + fs.existsSync(dir) && + fs.readdirSync(dir).find((f: string) => f === MIGRATION_STATE_FILE_NAME) && + fs.existsSync(path.join(dir, MIGRATION_DEPLOYMENTS_FOLDER)); From ec58f26bb4d0102893111fb3097419d2c8a82cd0 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:42:28 +0100 Subject: [PATCH 099/164] FOLDER --> DIR --- packages/v3/migration/engine/Constants.ts | 6 +++--- packages/v3/migration/engine/Engine.ts | 12 ++++++------ packages/v3/migration/index.ts | 6 +++--- packages/v3/migration/tasks/createMigration.ts | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/v3/migration/engine/Constants.ts b/packages/v3/migration/engine/Constants.ts index 5e4d41690..a92d17a84 100644 --- a/packages/v3/migration/engine/Constants.ts +++ b/packages/v3/migration/engine/Constants.ts @@ -1,8 +1,8 @@ import { MigrationData, SystemDeployments, SystemState } from './Types'; -export const MIGRATION_FOLDER = 'migration/migrations'; -export const MIGRATION_DATA_FOLDER = 'migration/data'; -export const MIGRATION_DEPLOYMENTS_FOLDER = 'deployments'; +export const MIGRATION_DIR = 'migration/migrations'; +export const MIGRATION_DATA_DIR = 'migration/data'; +export const MIGRATION_DEPLOYMENTS_DIR = 'deployments'; export const MIGRATION_HISTORY_FILE_NAME = 'history.json'; export const MIGRATION_STATE_FILE_NAME = 'state.json'; diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index 6c95d1388..dd06f2368 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -6,7 +6,7 @@ import { HardhatRuntimeEnvironment } from 'hardhat/types'; import path from 'path'; import Contracts, { ContractsType } from '../../components/Contracts'; import { CONFIG } from '../../hardhat.extended.config'; -import { defaultMigration, MIGRATION_DATA_FOLDER, MIGRATION_DEPLOYMENTS_FOLDER, MIGRATION_FOLDER } from './Constants'; +import { defaultMigration, MIGRATION_DATA_DIR, MIGRATION_DEPLOYMENTS_DIR, MIGRATION_DIR } from './Constants'; import { initExecutionFunctions } from './ExecutionFunctions'; import { initIO } from './Io'; import { log } from './Logger'; @@ -66,9 +66,9 @@ export class Engine { // init paths this.pathToRoot = pathToRoot; - this.pathToMigrationsFolder = path.join(pathToRoot, MIGRATION_FOLDER); - this.pathToNetworkFolder = path.join(this.pathToRoot, MIGRATION_DATA_FOLDER, this.networkSettings.networkName); - this.pathToNetworkDeploymentsFolder = path.join(this.pathToNetworkFolder, MIGRATION_DEPLOYMENTS_FOLDER); + this.pathToMigrationsFolder = path.join(pathToRoot, MIGRATION_DIR); + this.pathToNetworkFolder = path.join(this.pathToRoot, MIGRATION_DATA_DIR, this.networkSettings.networkName); + this.pathToNetworkDeploymentsFolder = path.join(this.pathToNetworkFolder, MIGRATION_DEPLOYMENTS_DIR); // init basics this.signer = signer; @@ -121,7 +121,7 @@ export class Engine { fs.mkdirSync(this.pathToNetworkFolder); // init the network deployment folder - fs.mkdirSync(path.join(this.pathToNetworkFolder, MIGRATION_DEPLOYMENTS_FOLDER)); + fs.mkdirSync(path.join(this.pathToNetworkFolder, MIGRATION_DEPLOYMENTS_DIR)); // initialize the first state to default this.IO.state.write(defaultMigration.state); @@ -135,7 +135,7 @@ export class Engine { try { const pathToOriginalNetworkFolder = path.join( this.pathToRoot, - MIGRATION_DATA_FOLDER, + MIGRATION_DATA_DIR, this.networkSettings.originalNetwork ); diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index 97b66e57f..dd53190cb 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -3,7 +3,7 @@ import { defaultArgs } from './engine/Types'; import { task, types } from 'hardhat/config'; import path from 'path'; -export const PATH_TO_TASKS_FOLDER = 'migration/tasks'; +export const PATH_TO_TASKS_DIR = 'migration/tasks'; export type migrateParamTask = defaultArgs; task('migrate', 'Migrate the network') @@ -12,11 +12,11 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('minBlockConfirmations', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(migrationLoader(path.join(PATH_TO_TASKS_FOLDER, 'migrate.ts'))); + .setAction(migrationLoader(path.join(PATH_TO_TASKS_DIR, 'migrate.ts'))); export type createMigrationParamTask = { wordList: string[]; }; task('create-migration', 'Create a migration file') .addVariadicPositionalParam('wordList', 'Name of the migration') - .setAction(basicTaskLoader(path.join(PATH_TO_TASKS_FOLDER, 'createMigration.ts'))); + .setAction(basicTaskLoader(path.join(PATH_TO_TASKS_DIR, 'createMigration.ts'))); diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration.ts index 0c750ee02..a45dd3cdd 100644 --- a/packages/v3/migration/tasks/createMigration.ts +++ b/packages/v3/migration/tasks/createMigration.ts @@ -1,5 +1,5 @@ import { createMigrationParamTask } from '..'; -import { MIGRATION_FOLDER } from '../engine/Constants'; +import { MIGRATION_DIR } from '../engine/Constants'; import { log } from '../engine/Logger'; import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; @@ -52,7 +52,7 @@ export default migration; const fileName = `${migrationTimestamp}${migrationName}.ts`; - const pathToNewMigrationFile = path.join(hre.config.paths.root, MIGRATION_FOLDER, fileName); + const pathToNewMigrationFile = path.join(hre.config.paths.root, MIGRATION_DIR, fileName); fs.writeFileSync(pathToNewMigrationFile, templateMigrationFile); log.done(`Migration file created ⚡️`); From 9a9a279dcb55be4ca53be821e77c25f6dbdbb9d9 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:42:46 +0100 Subject: [PATCH 100/164] FOLDER --> DIR --- packages/v3/migration/engine/Io.ts | 4 ++-- packages/v3/migration/engine/Utils.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/v3/migration/engine/Io.ts b/packages/v3/migration/engine/Io.ts index 4e57d5de0..13eedc06e 100644 --- a/packages/v3/migration/engine/Io.ts +++ b/packages/v3/migration/engine/Io.ts @@ -1,7 +1,7 @@ import { BigNumber } from 'ethers'; import fs from 'fs'; import path from 'path'; -import { MIGRATION_HISTORY_FILE_NAME, MIGRATION_STATE_FILE_NAME, MIGRATION_DEPLOYMENTS_FOLDER } from './Constants'; +import { MIGRATION_HISTORY_FILE_NAME, MIGRATION_STATE_FILE_NAME, MIGRATION_DEPLOYMENTS_DIR } from './Constants'; import { Engine } from './Engine'; import { Deployment, History, HistoryExecution, SystemDeployments, SystemState } from './Types'; @@ -80,7 +80,7 @@ export const initIO = (engine: Engine) => { // find the migration file in the network deployments folder const pathToNetworkMigrationDeploymentFolder = path.join( engine.pathToNetworkFolder, - MIGRATION_DEPLOYMENTS_FOLDER + MIGRATION_DEPLOYMENTS_DIR ); // read all files into the folder and fetch needed file diff --git a/packages/v3/migration/engine/Utils.ts b/packages/v3/migration/engine/Utils.ts index edab07664..22e78defa 100644 --- a/packages/v3/migration/engine/Utils.ts +++ b/packages/v3/migration/engine/Utils.ts @@ -1,6 +1,6 @@ import fs from 'fs-extra'; import path from 'path'; -import { MIGRATION_DEPLOYMENTS_FOLDER, MIGRATION_STATE_FILE_NAME } from './Constants'; +import { MIGRATION_DEPLOYMENTS_DIR, MIGRATION_STATE_FILE_NAME } from './Constants'; export const importCsjOrEsModule = (filePath: string) => { // eslint-disable-next-line @typescript-eslint/no-var-requires @@ -11,4 +11,4 @@ export const importCsjOrEsModule = (filePath: string) => { export const isMigrationFolderValid = (dir: string) => fs.existsSync(dir) && fs.readdirSync(dir).find((f: string) => f === MIGRATION_STATE_FILE_NAME) && - fs.existsSync(path.join(dir, MIGRATION_DEPLOYMENTS_FOLDER)); + fs.existsSync(path.join(dir, MIGRATION_DEPLOYMENTS_DIR)); From 2feb57864ab489f46327501d54c375fccf6c1a46 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:44:08 +0100 Subject: [PATCH 101/164] Refactor --- packages/v3/migration/engine/Constants.ts | 1 + packages/v3/migration/index.ts | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/v3/migration/engine/Constants.ts b/packages/v3/migration/engine/Constants.ts index a92d17a84..11a3111dd 100644 --- a/packages/v3/migration/engine/Constants.ts +++ b/packages/v3/migration/engine/Constants.ts @@ -3,6 +3,7 @@ import { MigrationData, SystemDeployments, SystemState } from './Types'; export const MIGRATION_DIR = 'migration/migrations'; export const MIGRATION_DATA_DIR = 'migration/data'; export const MIGRATION_DEPLOYMENTS_DIR = 'deployments'; +export const MIGRATION_TASKS_DIR = 'migration/tasks'; export const MIGRATION_HISTORY_FILE_NAME = 'history.json'; export const MIGRATION_STATE_FILE_NAME = 'state.json'; diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index dd53190cb..e29034a8c 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,9 +1,8 @@ -import { migrationLoader, basicTaskLoader } from './engine/Loaders'; -import { defaultArgs } from './engine/Types'; import { task, types } from 'hardhat/config'; import path from 'path'; - -export const PATH_TO_TASKS_DIR = 'migration/tasks'; +import { MIGRATION_TASKS_DIR } from './engine/Constants'; +import { basicTaskLoader, migrationLoader } from './engine/Loaders'; +import { defaultArgs } from './engine/Types'; export type migrateParamTask = defaultArgs; task('migrate', 'Migrate the network') @@ -12,11 +11,11 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('minBlockConfirmations', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(migrationLoader(path.join(PATH_TO_TASKS_DIR, 'migrate.ts'))); + .setAction(migrationLoader(path.join(MIGRATION_TASKS_DIR, 'migrate.ts'))); export type createMigrationParamTask = { wordList: string[]; }; task('create-migration', 'Create a migration file') .addVariadicPositionalParam('wordList', 'Name of the migration') - .setAction(basicTaskLoader(path.join(PATH_TO_TASKS_DIR, 'createMigration.ts'))); + .setAction(basicTaskLoader(path.join(MIGRATION_TASKS_DIR, 'createMigration.ts'))); From 21b4815773b3c31f06e2ad2411db132d869fb9a0 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:44:23 +0100 Subject: [PATCH 102/164] Style --- packages/v3/migration/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index e29034a8c..989de60da 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -5,6 +5,7 @@ import { basicTaskLoader, migrationLoader } from './engine/Loaders'; import { defaultArgs } from './engine/Types'; export type migrateParamTask = defaultArgs; + task('migrate', 'Migrate the network') .addFlag('ledger', 'Signing from a ledger') .addParam('ledgerPath', 'Ledger path', "m/44'/60'/0'/0", types.string) @@ -16,6 +17,7 @@ task('migrate', 'Migrate the network') export type createMigrationParamTask = { wordList: string[]; }; + task('create-migration', 'Create a migration file') .addVariadicPositionalParam('wordList', 'Name of the migration') .setAction(basicTaskLoader(path.join(MIGRATION_TASKS_DIR, 'createMigration.ts'))); From e5389eda213093e068b2e0530871f92aa5377679 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:45:07 +0100 Subject: [PATCH 103/164] Style --- packages/v3/migration/engine/Constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/Constants.ts b/packages/v3/migration/engine/Constants.ts index 11a3111dd..fa29b9063 100644 --- a/packages/v3/migration/engine/Constants.ts +++ b/packages/v3/migration/engine/Constants.ts @@ -2,8 +2,8 @@ import { MigrationData, SystemDeployments, SystemState } from './Types'; export const MIGRATION_DIR = 'migration/migrations'; export const MIGRATION_DATA_DIR = 'migration/data'; -export const MIGRATION_DEPLOYMENTS_DIR = 'deployments'; export const MIGRATION_TASKS_DIR = 'migration/tasks'; +export const MIGRATION_DEPLOYMENTS_DIR = 'deployments'; export const MIGRATION_HISTORY_FILE_NAME = 'history.json'; export const MIGRATION_STATE_FILE_NAME = 'state.json'; From 5b36fc9a0a69465f21b779749014afb9c4afae8b Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:45:21 +0100 Subject: [PATCH 104/164] exemples --> examples --- packages/v3/migration/{exemples => examples}/0_deploy_my_token.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/{exemples => examples}/0_deploy_my_token.ts (100%) diff --git a/packages/v3/migration/exemples/0_deploy_my_token.ts b/packages/v3/migration/examples/0_deploy_my_token.ts similarity index 100% rename from packages/v3/migration/exemples/0_deploy_my_token.ts rename to packages/v3/migration/examples/0_deploy_my_token.ts From d6021164ff4149fc5271ceb34e87505b0dedd6d0 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:47:17 +0100 Subject: [PATCH 105/164] Style --- packages/v3/migration/examples/0_deploy_my_token.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/examples/0_deploy_my_token.ts b/packages/v3/migration/examples/0_deploy_my_token.ts index 369311097..ec671327a 100644 --- a/packages/v3/migration/examples/0_deploy_my_token.ts +++ b/packages/v3/migration/examples/0_deploy_my_token.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + import { engine } from '../engine'; import { deployedContract, Migration } from '../engine/Types'; import { BigNumber } from 'ethers'; @@ -11,9 +13,11 @@ export type NextState = InitialState & { myToken: deployedContract; }; +const TOTAL_SUPPLY = BigNumber.from('100000000000000000000000000'); + const migration: Migration = { up: async (initialState: InitialState): Promise => { - const myToken = await deploy(contracts.TestERC20Token, 'My Token', 'MYTKN', '100000000000000000000000000'); + const myToken = await deploy(contracts.TestERC20Token, 'My Token', 'MYTKN', TOTAL_SUPPLY); return { myToken: myToken.address }; @@ -22,7 +26,7 @@ const migration: Migration = { healthCheck: async (initialState: InitialState, state: NextState) => { const myToken = await contracts.TestERC20Token.attach(state.myToken); - if (!((await myToken.totalSupply()) !== BigNumber.from('100000000000000000000000000'))) { + if (!(await myToken.totalSupply()).eq(TOTAL_SUPPLY)) { throw new Error("Total supply isn't correct"); } }, From affef127d759ec894a4690a4d256558f095554d9 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:48:36 +0100 Subject: [PATCH 106/164] Style --- .../v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts index e7d7bf72a..e43b46b78 100644 --- a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts +++ b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + import { engine } from '../engine'; import { deployedContract, Migration } from '../engine/Types'; @@ -24,12 +26,11 @@ const migration: Migration = { healthCheck: async (initialState: InitialState, state: NextState) => { const BNT = await contracts.BNT.attach(state.BNT); - const vBNT = await contracts.vBNT.attach(state.vBNT); - if ((await BNT.owner()) !== (await signer.getAddress())) { throw new Error("Signer doesn't match contract's owner"); } + const vBNT = await contracts.vBNT.attach(state.vBNT); if ((await vBNT.owner()) !== (await signer.getAddress())) { throw new Error("Signer doesn't match contract's owner"); } From 97b141fcb7f20a678e3650695544cadd18ab29a9 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:48:54 +0100 Subject: [PATCH 107/164] Temp rename --- .../migration/tasks/{createMigration.ts => createMigration2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/tasks/{createMigration.ts => createMigration2.ts} (100%) diff --git a/packages/v3/migration/tasks/createMigration.ts b/packages/v3/migration/tasks/createMigration2.ts similarity index 100% rename from packages/v3/migration/tasks/createMigration.ts rename to packages/v3/migration/tasks/createMigration2.ts From 690c3b3e4fc9b1ce78fd34a57c350f6b8a7c7402 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:49:17 +0100 Subject: [PATCH 108/164] Capitalize --- .../migration/tasks/{createMigration2.ts => CreateMigration.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/tasks/{createMigration2.ts => CreateMigration.ts} (100%) diff --git a/packages/v3/migration/tasks/createMigration2.ts b/packages/v3/migration/tasks/CreateMigration.ts similarity index 100% rename from packages/v3/migration/tasks/createMigration2.ts rename to packages/v3/migration/tasks/CreateMigration.ts From 2a35e1bfa8b80e4548f915c6c182a5a07b6b1be4 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:58:09 +0100 Subject: [PATCH 109/164] Style --- packages/v3/migration/index.ts | 2 +- .../v3/migration/tasks/CreateMigration.ts | 49 ++----------------- 2 files changed, 6 insertions(+), 45 deletions(-) diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index 989de60da..c925abd68 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -20,4 +20,4 @@ export type createMigrationParamTask = { task('create-migration', 'Create a migration file') .addVariadicPositionalParam('wordList', 'Name of the migration') - .setAction(basicTaskLoader(path.join(MIGRATION_TASKS_DIR, 'createMigration.ts'))); + .setAction(basicTaskLoader(path.join(MIGRATION_TASKS_DIR, 'CreateMigration.ts'))); diff --git a/packages/v3/migration/tasks/CreateMigration.ts b/packages/v3/migration/tasks/CreateMigration.ts index a45dd3cdd..56210b5ea 100644 --- a/packages/v3/migration/tasks/CreateMigration.ts +++ b/packages/v3/migration/tasks/CreateMigration.ts @@ -5,55 +5,16 @@ import fs from 'fs'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import path from 'path'; -export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { - const templateMigrationFile = `import { engine } from '../engine'; -import { deployedContract, Migration } from '../engine/Types'; -import { BigNumber } from 'ethers'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type InitialState = unknown; - -export type NextState = InitialState & { - myToken: deployedContract; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const myToken = await deploy(contracts.TestERC20Token, 'My Token', 'MYTKN', '100000000000000000000000000'); - return { - myToken: myToken.address - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const myToken = await contracts.TestERC20Token.attach(state.myToken); - - if (!((await myToken.totalSupply()) !== BigNumber.from('100000000000000000000000000'))) { - throw new Error("Total supply isnt' correct"); - } - }, +const SAMPLE_MIGRATION_PATH = path.resolve(__dirname, '../examples/0_deploy_my_token'); - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; - -export default migration; -`; - - let migrationName = ''; - for (const a of args.wordList) { - migrationName += '_' + a; - } +export default async (args: createMigrationParamTask, hre: HardhatRuntimeEnvironment) => { + const migrationName = args.wordList.join('_'); const migrationTimestamp = Date.now(); - const fileName = `${migrationTimestamp}${migrationName}.ts`; - const pathToNewMigrationFile = path.join(hre.config.paths.root, MIGRATION_DIR, fileName); - fs.writeFileSync(pathToNewMigrationFile, templateMigrationFile); + + fs.writeFileSync(pathToNewMigrationFile, fs.readFileSync(SAMPLE_MIGRATION_PATH, 'utf-8')); log.done(`Migration file created ⚡️`); }; From f9f8949f1f4576f9485d4539c54b2ce7151afdb0 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:58:22 +0100 Subject: [PATCH 110/164] Temp rename --- packages/v3/migration/tasks/{migrate.ts => migrate2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/tasks/{migrate.ts => migrate2.ts} (100%) diff --git a/packages/v3/migration/tasks/migrate.ts b/packages/v3/migration/tasks/migrate2.ts similarity index 100% rename from packages/v3/migration/tasks/migrate.ts rename to packages/v3/migration/tasks/migrate2.ts From 97bec0522dc642249c886dbf36deba3eb1b1d19b Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:58:43 +0100 Subject: [PATCH 111/164] Capitalize --- packages/v3/migration/tasks/{migrate2.ts => Migrate.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/tasks/{migrate2.ts => Migrate.ts} (100%) diff --git a/packages/v3/migration/tasks/migrate2.ts b/packages/v3/migration/tasks/Migrate.ts similarity index 100% rename from packages/v3/migration/tasks/migrate2.ts rename to packages/v3/migration/tasks/Migrate.ts From 2ec65c6642ef45d9422dc7f5c0bd7e30103de938 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:59:07 +0100 Subject: [PATCH 112/164] Temp rename --- packages/v3/migration/test/helpers/{init.ts => init2.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/test/helpers/{init.ts => init2.ts} (100%) diff --git a/packages/v3/migration/test/helpers/init.ts b/packages/v3/migration/test/helpers/init2.ts similarity index 100% rename from packages/v3/migration/test/helpers/init.ts rename to packages/v3/migration/test/helpers/init2.ts From 3735cfdfcd67e11f03d65dbf37032698ae35bb13 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 21:59:26 +0100 Subject: [PATCH 113/164] Capitalize --- packages/v3/migration/test/helpers/{init2.ts => Init.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/test/helpers/{init2.ts => Init.ts} (100%) diff --git a/packages/v3/migration/test/helpers/init2.ts b/packages/v3/migration/test/helpers/Init.ts similarity index 100% rename from packages/v3/migration/test/helpers/init2.ts rename to packages/v3/migration/test/helpers/Init.ts From f70e073b87423be666e8c1e5a8bbb4e7b0f00191 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:00:24 +0100 Subject: [PATCH 114/164] ExecutionFunctions --> Execution --- .../v3/migration/engine/{ExecutionFunctions.ts => Execution.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/engine/{ExecutionFunctions.ts => Execution.ts} (100%) diff --git a/packages/v3/migration/engine/ExecutionFunctions.ts b/packages/v3/migration/engine/Execution.ts similarity index 100% rename from packages/v3/migration/engine/ExecutionFunctions.ts rename to packages/v3/migration/engine/Execution.ts From 1df4f5f1eb9e42b54637133a5e50177b428800a4 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:00:48 +0100 Subject: [PATCH 115/164] Style --- packages/v3/migration/test/helpers/Init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/test/helpers/Init.ts b/packages/v3/migration/test/helpers/Init.ts index 2f335fbb4..41caa01b4 100644 --- a/packages/v3/migration/test/helpers/Init.ts +++ b/packages/v3/migration/test/helpers/Init.ts @@ -1,6 +1,6 @@ import { initEngine as init } from '../../engine'; import hre from 'hardhat'; -import path from 'path/posix'; +import path from 'path'; export const initEngine = async () => { const signer = (await hre.ethers.getSigners())[0]; From 85fbc2c6879641c0b7afbdbe394bcac76471d078 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:01:36 +0100 Subject: [PATCH 116/164] Rename --- packages/v3/migration/test/engine.test.ts | 4 ++-- .../migration/test/{singleMigrations => migrations}/basic.ts | 0 .../migration/test/{singleMigrations => migrations}/throw.ts | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename packages/v3/migration/test/{singleMigrations => migrations}/basic.ts (100%) rename packages/v3/migration/test/{singleMigrations => migrations}/throw.ts (100%) diff --git a/packages/v3/migration/test/engine.test.ts b/packages/v3/migration/test/engine.test.ts index 432d84c4a..21b660683 100644 --- a/packages/v3/migration/test/engine.test.ts +++ b/packages/v3/migration/test/engine.test.ts @@ -8,12 +8,12 @@ describe('init engine', () => { }); it('basic migrate', async () => { - const migration = (await import('./singleMigrations/basic')).default; + const migration = (await import('./migrations/basic')).default; expect(await engine.migrateOneUp(migration, 0, {}, {})).to.not.throw; }); it('throw migrate', async () => { - const migration = (await import('./singleMigrations/throw')).default; + const migration = (await import('./migrations/throw')).default; expect(await engine.migrateOneUp(migration, 0, {}, {})).to.throw; }); }); diff --git a/packages/v3/migration/test/singleMigrations/basic.ts b/packages/v3/migration/test/migrations/basic.ts similarity index 100% rename from packages/v3/migration/test/singleMigrations/basic.ts rename to packages/v3/migration/test/migrations/basic.ts diff --git a/packages/v3/migration/test/singleMigrations/throw.ts b/packages/v3/migration/test/migrations/throw.ts similarity index 100% rename from packages/v3/migration/test/singleMigrations/throw.ts rename to packages/v3/migration/test/migrations/throw.ts From c3a574c55a248d05369e554cd775e2858f8956b1 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:02:21 +0100 Subject: [PATCH 117/164] Style --- packages/v3/migration/engine/Engine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index dd06f2368..99c25b029 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -7,7 +7,7 @@ import path from 'path'; import Contracts, { ContractsType } from '../../components/Contracts'; import { CONFIG } from '../../hardhat.extended.config'; import { defaultMigration, MIGRATION_DATA_DIR, MIGRATION_DEPLOYMENTS_DIR, MIGRATION_DIR } from './Constants'; -import { initExecutionFunctions } from './ExecutionFunctions'; +import { initExecutionFunctions } from './Execution'; import { initIO } from './Io'; import { log } from './Logger'; import { migrate, migrateOneDown, migrateOneUp } from './Migrate'; From 1382ee4251a068bcbf1a78ea3d696d33f9e02f5a Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:02:46 +0100 Subject: [PATCH 118/164] Style --- packages/v3/migration/engine/Engine.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index 99c25b029..c591e4a7c 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -102,6 +102,7 @@ export class Engine { `Transaction confirmation should be higher than 1 for ${this.networkSettings.networkName} use. Aborting` ); } + if (!this.overrides.gasPrice && !isForkOrHardhat) { throw new Error(`Gas Price shouldn't be equal to 0 for ${this.networkSettings.networkName} use. Aborting`); } @@ -109,6 +110,7 @@ export class Engine { reset = () => { log.warning(`Resetting ${this.networkSettings.networkName} migration folder`); + fs.rmSync(this.pathToNetworkFolder, { recursive: true, force: true @@ -148,6 +150,7 @@ export class Engine { log.error( `${this.networkSettings.originalNetwork} doesn't have a correct config (needed if you want to fork it). Aborting` ); + process.exit(); } } else { @@ -159,6 +162,7 @@ export class Engine { // if network folder does exist but isn't valid, resetting it. if (!isMigrationFolderValid(this.pathToNetworkFolder)) { log.warning(`${this.networkSettings.networkName} migration folder is invalid, resetting it...`); + this.reset(); this.initMigrationDefaultFolder(); } @@ -172,6 +176,7 @@ export class Engine { const migrationFilesPath = migrationFiles.map((fileName: string) => path.join(this.pathToMigrationsFolder, fileName) ); + for (const migrationFilePath of migrationFilesPath) { const fileName = path.basename(migrationFilePath); const migrationId = Number(fileName.split('_')[0]); From f2e7f1e01a3ec99829f2136c02cb7dffaa61836f Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:03:06 +0100 Subject: [PATCH 119/164] Temp rename --- packages/v3/migration/test/migrations/{basic.ts => basic2.ts} | 0 packages/v3/migration/test/migrations/{throw.ts => throw2.ts} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename packages/v3/migration/test/migrations/{basic.ts => basic2.ts} (100%) rename packages/v3/migration/test/migrations/{throw.ts => throw2.ts} (100%) diff --git a/packages/v3/migration/test/migrations/basic.ts b/packages/v3/migration/test/migrations/basic2.ts similarity index 100% rename from packages/v3/migration/test/migrations/basic.ts rename to packages/v3/migration/test/migrations/basic2.ts diff --git a/packages/v3/migration/test/migrations/throw.ts b/packages/v3/migration/test/migrations/throw2.ts similarity index 100% rename from packages/v3/migration/test/migrations/throw.ts rename to packages/v3/migration/test/migrations/throw2.ts From 90c47666efa730db81d72d8e8e33e09fc5c4dddc Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:03:54 +0100 Subject: [PATCH 120/164] Capitalize --- packages/v3/migration/test/{engine.test.ts => Engine.ts} | 0 packages/v3/migration/test/migrations/{basic2.ts => Basic.ts} | 0 packages/v3/migration/test/migrations/{throw2.ts => Throw.ts} | 0 packages/v3/package.json | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename packages/v3/migration/test/{engine.test.ts => Engine.ts} (100%) rename packages/v3/migration/test/migrations/{basic2.ts => Basic.ts} (100%) rename packages/v3/migration/test/migrations/{throw2.ts => Throw.ts} (100%) diff --git a/packages/v3/migration/test/engine.test.ts b/packages/v3/migration/test/Engine.ts similarity index 100% rename from packages/v3/migration/test/engine.test.ts rename to packages/v3/migration/test/Engine.ts diff --git a/packages/v3/migration/test/migrations/basic2.ts b/packages/v3/migration/test/migrations/Basic.ts similarity index 100% rename from packages/v3/migration/test/migrations/basic2.ts rename to packages/v3/migration/test/migrations/Basic.ts diff --git a/packages/v3/migration/test/migrations/throw2.ts b/packages/v3/migration/test/migrations/Throw.ts similarity index 100% rename from packages/v3/migration/test/migrations/throw2.ts rename to packages/v3/migration/test/migrations/Throw.ts diff --git a/packages/v3/package.json b/packages/v3/package.json index 713ab26ba..fdf8355e2 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -22,7 +22,7 @@ "hh": "hardhat", "migrate": "MIGRATION=1 hardhat migrate", "create-migration": "MIGRATION=1 hardhat create-migration", - "test-migration": "yarn build && hardhat test migration/test/engine.test.ts", + "test-migration": "yarn build && hardhat test migration/test/Engine.ts", "build": "hardhat compile", "rebuild": "yarn clean && yarn build", "test": "yarn build && hardhat test", From 01af55b9fa7542c84a464ca06ca8c55ff0f5e67a Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:04:22 +0100 Subject: [PATCH 121/164] Rename --- packages/v3/migration/test/Engine.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/test/Engine.ts b/packages/v3/migration/test/Engine.ts index 21b660683..84483bb10 100644 --- a/packages/v3/migration/test/Engine.ts +++ b/packages/v3/migration/test/Engine.ts @@ -8,12 +8,12 @@ describe('init engine', () => { }); it('basic migrate', async () => { - const migration = (await import('./migrations/basic')).default; + const migration = (await import('./migrations/Basic')).default; expect(await engine.migrateOneUp(migration, 0, {}, {})).to.not.throw; }); it('throw migrate', async () => { - const migration = (await import('./migrations/throw')).default; + const migration = (await import('./migrations/Throw')).default; expect(await engine.migrateOneUp(migration, 0, {}, {})).to.throw; }); }); From de239b5e2287f17991144dc78ce1eb9a2469069a Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:09:18 +0100 Subject: [PATCH 122/164] Style --- packages/v3/migration/examples/0_deploy_my_token.ts | 3 +-- .../migration/migrations/1631795969803_deploy_bnt_vbnt.ts | 3 +-- packages/v3/migration/test/Engine.ts | 8 ++++---- packages/v3/migration/test/migrations/Basic.ts | 3 ++- packages/v3/migration/test/migrations/Throw.ts | 7 ++++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/v3/migration/examples/0_deploy_my_token.ts b/packages/v3/migration/examples/0_deploy_my_token.ts index ec671327a..a43248a61 100644 --- a/packages/v3/migration/examples/0_deploy_my_token.ts +++ b/packages/v3/migration/examples/0_deploy_my_token.ts @@ -1,5 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ - +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */ import { engine } from '../engine'; import { deployedContract, Migration } from '../engine/Types'; import { BigNumber } from 'ethers'; diff --git a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts index e43b46b78..b545eba6d 100644 --- a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts +++ b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts @@ -1,5 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ - +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */ import { engine } from '../engine'; import { deployedContract, Migration } from '../engine/Types'; diff --git a/packages/v3/migration/test/Engine.ts b/packages/v3/migration/test/Engine.ts index 84483bb10..e17edcd0f 100644 --- a/packages/v3/migration/test/Engine.ts +++ b/packages/v3/migration/test/Engine.ts @@ -1,5 +1,7 @@ import { engine } from '../engine'; import { initEngine } from './helpers/Init'; +import basicMigration from './migrations/Basic'; +import throwingMigration from './migrations/Throw'; import { expect } from 'chai'; describe('init engine', () => { @@ -8,12 +10,10 @@ describe('init engine', () => { }); it('basic migrate', async () => { - const migration = (await import('./migrations/Basic')).default; - expect(await engine.migrateOneUp(migration, 0, {}, {})).to.not.throw; + expect(await engine.migrateOneUp(basicMigration, 0, {}, {})).to.not.throw; }); it('throw migrate', async () => { - const migration = (await import('./migrations/Throw')).default; - expect(await engine.migrateOneUp(migration, 0, {}, {})).to.throw; + expect(await engine.migrateOneUp(throwingMigration, 0, {}, {})).to.throw; }); }); diff --git a/packages/v3/migration/test/migrations/Basic.ts b/packages/v3/migration/test/migrations/Basic.ts index 5bc9e6d2b..8228a1e58 100644 --- a/packages/v3/migration/test/migrations/Basic.ts +++ b/packages/v3/migration/test/migrations/Basic.ts @@ -1,10 +1,11 @@ +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */ import { engine } from '../../engine'; import { deployedContract, Migration } from '../../engine/Types'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; -type InitialState = {}; +type InitialState = Record; type NextState = { BNT: deployedContract; diff --git a/packages/v3/migration/test/migrations/Throw.ts b/packages/v3/migration/test/migrations/Throw.ts index 4c6acdd84..05e3b6dd1 100644 --- a/packages/v3/migration/test/migrations/Throw.ts +++ b/packages/v3/migration/test/migrations/Throw.ts @@ -1,12 +1,13 @@ +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */ import { engine } from '../../engine'; import { deployedContract, Migration } from '../../engine/Types'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; -type InitialState = {}; +type InitialState = Record; -type NextState = {}; +type NextState = Record; const migration: Migration = { up: async (initialState: InitialState): Promise => { @@ -14,7 +15,7 @@ const migration: Migration = { }, healthCheck: async (initialState: any, newState: any) => { - throw new Error(''); + throw new Error('ERROR'); }, down: async (initialState: InitialState, newState: NextState): Promise => { From 4534c36c17f243584d3a9a22cbdcf3bd9a158048 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:09:58 +0100 Subject: [PATCH 123/164] Style --- packages/v3/migration/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/v3/migration/index.ts b/packages/v3/migration/index.ts index c925abd68..5f5d8c23f 100644 --- a/packages/v3/migration/index.ts +++ b/packages/v3/migration/index.ts @@ -1,8 +1,8 @@ -import { task, types } from 'hardhat/config'; -import path from 'path'; import { MIGRATION_TASKS_DIR } from './engine/Constants'; import { basicTaskLoader, migrationLoader } from './engine/Loaders'; import { defaultArgs } from './engine/Types'; +import { task, types } from 'hardhat/config'; +import path from 'path'; export type migrateParamTask = defaultArgs; @@ -12,7 +12,7 @@ task('migrate', 'Migrate the network') .addParam('gasPrice', 'GasPrice in gwei', 0, types.int) .addParam('minBlockConfirmations', 'Number of confirmation to wait', 1, types.int) .addFlag('reset', 'Reset the migration data') - .setAction(migrationLoader(path.join(MIGRATION_TASKS_DIR, 'migrate.ts'))); + .setAction(migrationLoader(path.join(MIGRATION_TASKS_DIR, 'Migrate.ts'))); export type createMigrationParamTask = { wordList: string[]; From 4659d092b2cf068c852875dfddf171bf702d48f3 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:18:01 +0100 Subject: [PATCH 124/164] Style --- packages/v3/migration/README.md | 105 ++++++++------------------------ 1 file changed, 27 insertions(+), 78 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 75792853b..b330508ce 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -2,7 +2,7 @@ ## Pre-requisites -In order to use this plugin, some keys needs to be set in our `config.json` file at the root of the v3 package: +In order to use this plugin, some keys need to be set in the global `config.json` file at the root of the v3 package: ```json { @@ -16,31 +16,27 @@ In order to use this plugin, some keys needs to be set in our `config.json` file } ``` -`networks` represents an object exposing a network name to an url and a default account (REQUIRED if no ledger is set via CLI). If you try to execute a migration to a network without having set those values it will fail. - -`url` represents an endpoint to the network. - -`defaultAccount` represents the default migration user (REQUIRED if not using a Ledger). +`networks` represents a list of Hardhat network configurations. ## Features -### Hardware +### Hardware Wallets Support - [x] Ledger support ### Functions - [x] Deploy contracts (deploy) -- [x] Contract interaction (execute) -- [x] Deploy proxy (deployProxy) -- [x] Upgrade proxy (upgradeProxy) +- [x] Interact with contracts (execute) +- [x] Deploy a proxy contract (deployProxy) +- [x] Upgrade a proxy contract (upgradeProxy) ### Engine -- [x] Save ABI and Bytecode of each deployed contract -- [x] Save states between migrations -- [x] Save execution history of each migrations -- [x] Revert if migration healthcheck fails +- [x] Saves ABI and bytecode of each deployed contract +- [x] Saves states between migrations +- [x] Saves execution history of each migration +- [x] Reverts if migration health-check fails ## Folders @@ -50,7 +46,7 @@ The `data` folder consists of one designated folder per network. #### state.json -In each network folder there is a `state.json` file. It represents the migration state and the network state: +In each network folder there is a `state.json` file. It represents the state of the migration and the network: ```json { @@ -61,8 +57,8 @@ In each network folder there is a `state.json` file. It represents the migration } ``` -`latestMigration`: The timestamp of the latest ran migration. -`networkState`: Initial migration state. +- `latestMigration`: The timestamp of the latest ran migration. +- `networkState`: Initial migration state. #### deployments @@ -70,11 +66,11 @@ There is also a `deployments` folder that will host, for each migration, the ABI #### history.json -In each network folder there is a `history.json` file. It represents every execution done by the engine, it looks like this: +In each network folder there is a `history.json` file. It represents every execution done by the engine, e.g.: ```json { - "0_deploy_basics.ts": { + "1631795969803_deploy_bnt_vbnt.ts": { "executions": [ { "type": "DEPLOY", @@ -95,9 +91,9 @@ In each network folder there is a `history.json` file. It represents every execu ### Migrations -The `migrations` folder is home to all migration files. +The `migrations` folder is contains all migration files. -A migration file is a typescript file that exposes a particular object respecting a strict interface: +A migration file is a Typescript file that exposes a particular object respecting a strict interface: ```ts export interface Migration { @@ -107,15 +103,11 @@ export interface Migration { } ``` -### Exemples - -A serie of migration files to inspire yourself from. +Please check the `examples` directory for reference. ## Engine -The engine is the backbone of the migration system, containing its logic. - -It also exposes tasks (task is a hardhat concept for CLI scripts). +The engine is the backbone of the migration system, containing its logic. It also exposes Hardhat tasks. ### Tasks @@ -125,25 +117,23 @@ Migrates the system between different states. Call `yarn migrate --help` for more info on params. -#### CreateMigration +#### Create a New Migration -Creates a migration file based on a template. +Creates a new migration file based on a starting template. `yarn create-migration --help` for more info on params. ## Getting started -### How to create a migration file ? +### How to Create a Migration File? -``` +```bash yarn hh create-migration do migration for me pls ``` -If you don't use this CLI to generate your migration files, bear in mind that the format is as follow: "X_testfile.ts" with X representing the timestamp of the migration (i.e its order). - -### How to execute a migration on a network? +### How to Execute a Migration on a Network? -``` +```bash yarn hh migrate --network mainnet ``` @@ -153,13 +143,13 @@ yarn hh migrate --network mainnet 3. Update the state on the go. -### How to run the migration on a fork ? +### How to Run the Migration on a Fork? Because of current Hardhat limitation it's not practical to launch a fork and run migration on it via the `hardhat.config.ts`. So we had to find a workaround. To fork the network `mainnet` you need to: -- Have in your `config.json` file (at the root of the `v3` package) the url for the `mainnet` network, like so: +- Have in your `config.json` file (at the root of the `v3` package) the URL for the `mainnet` network, like so: ``` { @@ -176,44 +166,3 @@ To fork the network `mainnet` you need to: - Provide the `state.json` file to the `mainnet` data folder. - Specify the network you want to fork as an ENV variable: `FORK=mainnet yarn hh migrate` - -### What does a basic migration file looks like ? - -```ts -import { engine } from '../../migration/engine'; -import { deployedContract, Migration } from '../../migration/engine/types'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; -export type InitialState = {}; -export type NextState = InitialState & { - BNT: { token: deployedContract; governance: deployedContract }; -}; -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const BNTToken = await deploy( - contracts.TestERC20Token, - 'Bancor Network Token', - 'BNT', - '100000000000000000000000000' - ); - const BNTGovernance = await deploy(contracts.TokenGovernance, BNTToken.address); - return { - ...initialState, - BNT: { - token: BNTToken.address, - governance: BNTGovernance.address - } - }; - }, - healthCheck: async (initialState: InitialState, state: NextState) => { - const BNTGovernance = await contracts.TokenGovernance.attach(state.BNT.governance); - if (!(await BNTGovernance.hasRole(await BNTGovernance.ROLE_SUPERVISOR(), await signer.getAddress()))) - throw new Error('Invalid Role'); - }, - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; -export default migration; -``` From bc7fcf4253a6f91a5bdff5a9d7ac6665ad28c2e4 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:19:18 +0100 Subject: [PATCH 125/164] Style --- .../v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts index 9a21521d8..97ca15745 100644 --- a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts +++ b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts @@ -26,12 +26,12 @@ const migration: Migration = { healthCheck: async (initialState: InitialState, state: NextState) => { const BNT = await contracts.BNT.attach(state.BNT); if ((await BNT.owner()) !== (await signer.getAddress())) { - throw new Error("current signer doesn't match contract's owner"); + throw new Error("Current signer doesn't match contract's owner"); } const vBNT = await contracts.vBNT.attach(state.vBNT); if ((await vBNT.owner()) !== (await signer.getAddress())) { - throw new Error("current signer doesn't match contract's owner"); + throw new Error("Current signer doesn't match contract's owner"); } }, From d7b2498ba3a27407fedda24f1f78c889c26091a7 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:22:48 +0100 Subject: [PATCH 126/164] Fix tests --- packages/v3/migration/test/Engine.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/v3/migration/test/Engine.ts b/packages/v3/migration/test/Engine.ts index e17edcd0f..304df940e 100644 --- a/packages/v3/migration/test/Engine.ts +++ b/packages/v3/migration/test/Engine.ts @@ -1,7 +1,5 @@ import { engine } from '../engine'; import { initEngine } from './helpers/Init'; -import basicMigration from './migrations/Basic'; -import throwingMigration from './migrations/Throw'; import { expect } from 'chai'; describe('init engine', () => { @@ -9,11 +7,15 @@ describe('init engine', () => { await initEngine(); }); - it('basic migrate', async () => { - expect(await engine.migrateOneUp(basicMigration, 0, {}, {})).to.not.throw; + it('basic migration', async () => { + const migration = (await import('./migrations/Basic')).default; + + expect(await engine.migrateOneUp(migration, 0, {}, {})).to.not.throw; }); - it('throw migrate', async () => { - expect(await engine.migrateOneUp(throwingMigration, 0, {}, {})).to.throw; + it('throwing migration', async () => { + const migration = (await import('./migrations/Throw')).default; + + expect(await engine.migrateOneUp(migration, 0, {}, {})).to.throw; }); }); From 8f2f4c3951d1e32f0d2e87813747496614af148b Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sat, 18 Sep 2021 22:25:56 +0100 Subject: [PATCH 127/164] Fix loop --- packages/v3/migration/engine/Migrate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/Migrate.ts b/packages/v3/migration/engine/Migrate.ts index c03075cba..67132b647 100644 --- a/packages/v3/migration/engine/Migrate.ts +++ b/packages/v3/migration/engine/Migrate.ts @@ -76,7 +76,7 @@ export const migrate = async (engine: Engine) => { engine.migration.stateSaves.push({ ...engine.migration.state }); let index = 0; - while (index++ < engine.migration.migrationsData.length) { + for (; index < engine.migration.migrationsData.length; index++) { const migrationData = engine.migration.migrationsData[index]; const migration: Migration = importCsjOrEsModule(migrationData.fullPath); From ca987c34a1c2f48255cead27e28fc8cb2f83d5b4 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 11:06:44 +0100 Subject: [PATCH 128/164] Combine reset and migrate --- packages/v3/migration/engine/Engine.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index c591e4a7c..7a384836b 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -1,9 +1,3 @@ -import { Overrides, Signer } from 'ethers'; -import { parseUnits } from 'ethers/lib/utils'; -import fs from 'fs-extra'; -import { network } from 'hardhat'; -import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import path from 'path'; import Contracts, { ContractsType } from '../../components/Contracts'; import { CONFIG } from '../../hardhat.extended.config'; import { defaultMigration, MIGRATION_DATA_DIR, MIGRATION_DEPLOYMENTS_DIR, MIGRATION_DIR } from './Constants'; @@ -13,6 +7,12 @@ import { log } from './Logger'; import { migrate, migrateOneDown, migrateOneUp } from './Migrate'; import { defaultArgs, ExecutionSettings, NetworkSettings } from './Types'; import { isMigrationFolderValid } from './Utils'; +import { Overrides, Signer } from 'ethers'; +import { parseUnits } from 'ethers/lib/utils'; +import fs from 'fs-extra'; +import { network } from 'hardhat'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import path from 'path'; export class Engine { readonly hre: HardhatRuntimeEnvironment; @@ -86,8 +86,6 @@ export class Engine { if (args.reset) { this.reset(); - - return; } this.init(); From f63a70ab437f553ff2d289f0401e7919aa883a6c Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 12:33:30 +0100 Subject: [PATCH 129/164] Typo --- packages/v3/migration/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index b330508ce..0cb951fea 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -91,7 +91,7 @@ In each network folder there is a `history.json` file. It represents every execu ### Migrations -The `migrations` folder is contains all migration files. +The `migrations` folder contains all migration files. A migration file is a Typescript file that exposes a particular object respecting a strict interface: From 946e27b70aa15e9e98c3c9795da1f4a5db888267 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 12:36:02 +0100 Subject: [PATCH 130/164] Folder --> Dir --- packages/v3/migration/README.md | 18 ++++---- packages/v3/migration/engine/Engine.ts | 58 ++++++++++++------------- packages/v3/migration/engine/Io.ts | 30 ++++++------- packages/v3/migration/engine/Migrate.ts | 2 +- packages/v3/migration/engine/Utils.ts | 4 +- 5 files changed, 56 insertions(+), 56 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 0cb951fea..6c8e03cee 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -38,15 +38,15 @@ In order to use this plugin, some keys need to be set in the global `config.json - [x] Saves execution history of each migration - [x] Reverts if migration health-check fails -## Folders +## Dirs ### Data -The `data` folder consists of one designated folder per network. +The `data` dir consists of one designated dir per network. #### state.json -In each network folder there is a `state.json` file. It represents the state of the migration and the network: +In each network dir there is a `state.json` file. It represents the state of the migration and the network: ```json { @@ -62,11 +62,11 @@ In each network folder there is a `state.json` file. It represents the state of #### deployments -There is also a `deployments` folder that will host, for each migration, the ABI and bytecode of any deployed contract. +There is also a `deployments` dir that will host, for each migration, the ABI and bytecode of any deployed contract. #### history.json -In each network folder there is a `history.json` file. It represents every execution done by the engine, e.g.: +In each network dir there is a `history.json` file. It represents every execution done by the engine, e.g.: ```json { @@ -91,7 +91,7 @@ In each network folder there is a `history.json` file. It represents every execu ### Migrations -The `migrations` folder contains all migration files. +The `migrations` dir contains all migration files. A migration file is a Typescript file that exposes a particular object respecting a strict interface: @@ -137,9 +137,9 @@ yarn hh create-migration do migration for me pls yarn hh migrate --network mainnet ``` -1. `Migrate` will look for the network data folder or create one if it doesn't exist. +1. `Migrate` will look for the network data dir or create one if it doesn't exist. -2. Run every migration file in the migrations folder by order of execution starting from the latestMigration timestamp. +2. Run every migration file in the migrations dir by order of execution starting from the latestMigration timestamp. 3. Update the state on the go. @@ -163,6 +163,6 @@ To fork the network `mainnet` you need to: } ``` -- Provide the `state.json` file to the `mainnet` data folder. +- Provide the `state.json` file to the `mainnet` data dir. - Specify the network you want to fork as an ENV variable: `FORK=mainnet yarn hh migrate` diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index 7a384836b..781902d3e 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -6,7 +6,7 @@ import { initIO } from './Io'; import { log } from './Logger'; import { migrate, migrateOneDown, migrateOneUp } from './Migrate'; import { defaultArgs, ExecutionSettings, NetworkSettings } from './Types'; -import { isMigrationFolderValid } from './Utils'; +import { isMigrationDirValid } from './Utils'; import { Overrides, Signer } from 'ethers'; import { parseUnits } from 'ethers/lib/utils'; import fs from 'fs-extra'; @@ -27,9 +27,9 @@ export class Engine { // needed paths readonly pathToRoot: string; - readonly pathToNetworkFolder: string; - readonly pathToMigrationsFolder: string; - readonly pathToNetworkDeploymentsFolder: string; + readonly pathToNetworkDir: string; + readonly pathToMigrationsDir: string; + readonly pathToNetworkDeploymentsDir: string; // init additional functionalities readonly IO = initIO(this); @@ -66,9 +66,9 @@ export class Engine { // init paths this.pathToRoot = pathToRoot; - this.pathToMigrationsFolder = path.join(pathToRoot, MIGRATION_DIR); - this.pathToNetworkFolder = path.join(this.pathToRoot, MIGRATION_DATA_DIR, this.networkSettings.networkName); - this.pathToNetworkDeploymentsFolder = path.join(this.pathToNetworkFolder, MIGRATION_DEPLOYMENTS_DIR); + this.pathToMigrationsDir = path.join(pathToRoot, MIGRATION_DIR); + this.pathToNetworkDir = path.join(this.pathToRoot, MIGRATION_DATA_DIR, this.networkSettings.networkName); + this.pathToNetworkDeploymentsDir = path.join(this.pathToNetworkDir, MIGRATION_DEPLOYMENTS_DIR); // init basics this.signer = signer; @@ -107,21 +107,21 @@ export class Engine { }; reset = () => { - log.warning(`Resetting ${this.networkSettings.networkName} migration folder`); + log.warning(`Resetting ${this.networkSettings.networkName} migration dir`); - fs.rmSync(this.pathToNetworkFolder, { + fs.rmSync(this.pathToNetworkDir, { recursive: true, force: true }); this.migration = defaultMigration; }; - initMigrationDefaultFolder = () => { - // init the network folder - fs.mkdirSync(this.pathToNetworkFolder); + initMigrationDefaultDir = () => { + // init the network dir + fs.mkdirSync(this.pathToNetworkDir); - // init the network deployment folder - fs.mkdirSync(path.join(this.pathToNetworkFolder, MIGRATION_DEPLOYMENTS_DIR)); + // init the network deployment dir + fs.mkdirSync(path.join(this.pathToNetworkDir, MIGRATION_DEPLOYMENTS_DIR)); // initialize the first state to default this.IO.state.write(defaultMigration.state); @@ -129,21 +129,21 @@ export class Engine { init = () => { // if network doesn't exist - if (!fs.existsSync(this.pathToNetworkFolder)) { + if (!fs.existsSync(this.pathToNetworkDir)) { if (this.networkSettings.isFork) { - // check if the original network folder is valid and copy it into the current network folder + // check if the original network Dir is valid and copy it into the current network dir try { - const pathToOriginalNetworkFolder = path.join( + const pathToOriginalNetworkDir = path.join( this.pathToRoot, MIGRATION_DATA_DIR, this.networkSettings.originalNetwork ); - if (!isMigrationFolderValid(pathToOriginalNetworkFolder)) { + if (!isMigrationDirValid(pathToOriginalNetworkDir)) { throw Error(); } - fs.copySync(pathToOriginalNetworkFolder, this.pathToNetworkFolder); + fs.copySync(pathToOriginalNetworkDir, this.pathToNetworkDir); } catch { log.error( `${this.networkSettings.originalNetwork} doesn't have a correct config (needed if you want to fork it). Aborting` @@ -152,27 +152,27 @@ export class Engine { process.exit(); } } else { - // if not a fork initialize the folder accordingly - this.initMigrationDefaultFolder(); + // if not a fork initialize the Dir accordingly + this.initMigrationDefaultDir(); } } - // if network folder does exist but isn't valid, resetting it. - if (!isMigrationFolderValid(this.pathToNetworkFolder)) { - log.warning(`${this.networkSettings.networkName} migration folder is invalid, resetting it...`); + // if network Dir does exist but isn't valid, resetting it. + if (!isMigrationDirValid(this.pathToNetworkDir)) { + log.warning(`${this.networkSettings.networkName} migration Dir is invalid, resetting it...`); this.reset(); - this.initMigrationDefaultFolder(); + this.initMigrationDefaultDir(); } - // update current state to the network folder - this.migration.state = this.IO.state.fetch(this.pathToNetworkFolder); + // update current state to the network dir + this.migration.state = this.IO.state.fetch(this.pathToNetworkDir); // generate migration files - const allMigrationFiles = fs.readdirSync(this.pathToMigrationsFolder); + const allMigrationFiles = fs.readdirSync(this.pathToMigrationsDir); const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); const migrationFilesPath = migrationFiles.map((fileName: string) => - path.join(this.pathToMigrationsFolder, fileName) + path.join(this.pathToMigrationsDir, fileName) ); for (const migrationFilePath of migrationFilesPath) { diff --git a/packages/v3/migration/engine/Io.ts b/packages/v3/migration/engine/Io.ts index 13eedc06e..307a2d1ee 100644 --- a/packages/v3/migration/engine/Io.ts +++ b/packages/v3/migration/engine/Io.ts @@ -1,9 +1,9 @@ -import { BigNumber } from 'ethers'; -import fs from 'fs'; -import path from 'path'; import { MIGRATION_HISTORY_FILE_NAME, MIGRATION_STATE_FILE_NAME, MIGRATION_DEPLOYMENTS_DIR } from './Constants'; import { Engine } from './Engine'; import { Deployment, History, HistoryExecution, SystemDeployments, SystemState } from './Types'; +import { BigNumber } from 'ethers'; +import fs from 'fs'; +import path from 'path'; const replacer = (_: any, value: any) => { const { type, hex } = value; @@ -19,7 +19,7 @@ export const initIO = (engine: Engine) => { state: { write: (state: SystemState) => { fs.writeFileSync( - path.join(engine.pathToNetworkFolder, MIGRATION_STATE_FILE_NAME), + path.join(engine.pathToNetworkDir, MIGRATION_STATE_FILE_NAME), JSON.stringify(state, replacer, 4) + `\n` ); @@ -36,7 +36,7 @@ export const initIO = (engine: Engine) => { history: { write: (history: History) => { fs.writeFileSync( - path.join(engine.pathToNetworkFolder, MIGRATION_HISTORY_FILE_NAME), + path.join(engine.pathToNetworkDir, MIGRATION_HISTORY_FILE_NAME), JSON.stringify(history, replacer, 4) + `\n` ); return history; @@ -44,9 +44,9 @@ export const initIO = (engine: Engine) => { writeOne: (historyExecution: HistoryExecution) => { const migrationHistoryFileName = MIGRATION_HISTORY_FILE_NAME; - // find the history file in the network folder - const pathToNetworkFolderFiles = fs.readdirSync(engine.pathToNetworkFolder); - const pathToMigrationDeploymentFile = pathToNetworkFolderFiles.find( + // find the history file in the network dir + const pathToNetworkDirFiles = fs.readdirSync(engine.pathToNetworkDir); + const pathToMigrationDeploymentFile = pathToNetworkDirFiles.find( (f: string) => f === migrationHistoryFileName ); @@ -55,7 +55,7 @@ export const initIO = (engine: Engine) => { engine.IO.history.write({}); } - const currentHistory = engine.IO.history.fetch(engine.pathToNetworkFolder); + const currentHistory = engine.IO.history.fetch(engine.pathToNetworkDir); if (!currentHistory[engine.migration.currentMigrationData.fileName]) { currentHistory[engine.migration.currentMigrationData.fileName] = { executions: [] }; } @@ -77,20 +77,20 @@ export const initIO = (engine: Engine) => { writeOne: (deployment: Deployment) => { const currentMigrationDeploymentFileName = engine.migration.currentMigrationData.fileName + '.json'; - // find the migration file in the network deployments folder - const pathToNetworkMigrationDeploymentFolder = path.join( - engine.pathToNetworkFolder, + // find the migration file in the network deployments dir + const pathToNetworkMigrationDeploymentDir = path.join( + engine.pathToNetworkDir, MIGRATION_DEPLOYMENTS_DIR ); - // read all files into the folder and fetch needed file - const pathToMigrationDeploymentFiles = fs.readdirSync(pathToNetworkMigrationDeploymentFolder); + // read all files into the dir and fetch needed file + const pathToMigrationDeploymentFiles = fs.readdirSync(pathToNetworkMigrationDeploymentDir); const pathToMigrationDeploymentFile = pathToMigrationDeploymentFiles.find( (f: string) => f === currentMigrationDeploymentFileName ); const pathToNetworkMigrationDeploymentFile = path.join( - pathToNetworkMigrationDeploymentFolder, + pathToNetworkMigrationDeploymentDir, currentMigrationDeploymentFileName ); diff --git a/packages/v3/migration/engine/Migrate.ts b/packages/v3/migration/engine/Migrate.ts index 67132b647..baf29bc8c 100644 --- a/packages/v3/migration/engine/Migrate.ts +++ b/packages/v3/migration/engine/Migrate.ts @@ -130,7 +130,7 @@ export const migrate = async (engine: Engine) => { // remove current migration deployment file fs.rmSync( - path.join(engine.pathToNetworkDeploymentsFolder, engine.migration.currentMigrationData.fileName + '.json'), + path.join(engine.pathToNetworkDeploymentsDir, engine.migration.currentMigrationData.fileName + '.json'), { force: true } ); diff --git a/packages/v3/migration/engine/Utils.ts b/packages/v3/migration/engine/Utils.ts index 22e78defa..6c9c9a662 100644 --- a/packages/v3/migration/engine/Utils.ts +++ b/packages/v3/migration/engine/Utils.ts @@ -1,6 +1,6 @@ +import { MIGRATION_DEPLOYMENTS_DIR, MIGRATION_STATE_FILE_NAME } from './Constants'; import fs from 'fs-extra'; import path from 'path'; -import { MIGRATION_DEPLOYMENTS_DIR, MIGRATION_STATE_FILE_NAME } from './Constants'; export const importCsjOrEsModule = (filePath: string) => { // eslint-disable-next-line @typescript-eslint/no-var-requires @@ -8,7 +8,7 @@ export const importCsjOrEsModule = (filePath: string) => { return imported.default || imported; }; -export const isMigrationFolderValid = (dir: string) => +export const isMigrationDirValid = (dir: string) => fs.existsSync(dir) && fs.readdirSync(dir).find((f: string) => f === MIGRATION_STATE_FILE_NAME) && fs.existsSync(path.join(dir, MIGRATION_DEPLOYMENTS_DIR)); From 2df56bd0d2861179fd1e367390253df8322c4776 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 12:37:02 +0100 Subject: [PATCH 131/164] initializeFctName --> initializeFunction --- packages/v3/migration/engine/Execution.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/v3/migration/engine/Execution.ts b/packages/v3/migration/engine/Execution.ts index f01116196..17874a440 100644 --- a/packages/v3/migration/engine/Execution.ts +++ b/packages/v3/migration/engine/Execution.ts @@ -99,7 +99,7 @@ export const initExecutionFunctions = (engine: Engine) => { proxyAddress: string, initializeArgs: { params: Parameters; - initializeFctName: string; + initializeFunction: string; }, ctorArgs: Parameters, skipInitialization?: boolean @@ -112,11 +112,11 @@ export const initExecutionFunctions = (engine: Engine) => { await execute('Upgrading proxy', admin.upgrade, proxyAddress, newLogicContract.address); } else { await execute( - `Upgrading proxy and call ${initializeArgs.initializeFctName}`, + `Upgrading proxy and call ${initializeArgs.initializeFunction}`, admin.upgradeAndCall, proxyAddress, newLogicContract.address, - newLogicContract.interface.encodeFunctionData(initializeArgs.initializeFctName, initializeArgs.params) + newLogicContract.interface.encodeFunctionData(initializeArgs.initializeFunction, initializeArgs.params) ); } From 8859a07447767a4bd6cc581b3c999344f273beba Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 12:45:56 +0100 Subject: [PATCH 132/164] Remove pathToRoot --- packages/v3/migration/engine/Engine.ts | 12 +++--------- packages/v3/migration/engine/index.ts | 5 ++--- packages/v3/migration/test/helpers/Init.ts | 2 -- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index 781902d3e..9a7c86a4c 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -45,13 +45,7 @@ export class Engine { // migration info migration = defaultMigration; - constructor( - hre: HardhatRuntimeEnvironment, - args: defaultArgs, - signer: Signer, - signerAddress: string, - pathToRoot: string - ) { + constructor(hre: HardhatRuntimeEnvironment, args: defaultArgs, signer: Signer, signerAddress: string) { this.hre = hre; // init network settings @@ -65,8 +59,8 @@ export class Engine { }; // init paths - this.pathToRoot = pathToRoot; - this.pathToMigrationsDir = path.join(pathToRoot, MIGRATION_DIR); + this.pathToRoot = path.resolve(__dirname, '../../'); + this.pathToMigrationsDir = path.join(this.pathToRoot, MIGRATION_DIR); this.pathToNetworkDir = path.join(this.pathToRoot, MIGRATION_DATA_DIR, this.networkSettings.networkName); this.pathToNetworkDeploymentsDir = path.join(this.pathToNetworkDir, MIGRATION_DEPLOYMENTS_DIR); diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index 7c29849dc..3e266b492 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -29,17 +29,16 @@ export const initEngine = async ( hre: hre, signer: Signer, signerAddress: string, - pathToRoot: string, isTest: boolean ) => { test = isTest; - engine = new Engine(hre, args, signer, signerAddress, pathToRoot); + engine = new Engine(hre, args, signer, signerAddress); }; export default async (args: defaultArgs, hre: hre, task: (a: any, b: hre) => any) => { const { signer, signerAddress } = await initSigner(args); - await initEngine(args, hre, signer, signerAddress, hre.config.paths.root, false); + await initEngine(args, hre, signer, signerAddress, false); // now that engine is initialized, go to the actual task return task(args, hre); diff --git a/packages/v3/migration/test/helpers/Init.ts b/packages/v3/migration/test/helpers/Init.ts index 41caa01b4..cf95d53db 100644 --- a/packages/v3/migration/test/helpers/Init.ts +++ b/packages/v3/migration/test/helpers/Init.ts @@ -1,6 +1,5 @@ import { initEngine as init } from '../../engine'; import hre from 'hardhat'; -import path from 'path'; export const initEngine = async () => { const signer = (await hre.ethers.getSigners())[0]; @@ -16,7 +15,6 @@ export const initEngine = async () => { hre, signer, signer.address, - path.join(hre.config.paths.root, 'migration', 'test'), true ); }; From c192a260992a8056f7a4b17f0f1d930dd07b05f0 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:38:51 +0100 Subject: [PATCH 133/164] Copy --- packages/v3/migration/README.md | 32 ++++++++++++++------------ packages/v3/migration/engine/Engine.ts | 12 +++++----- packages/v3/migration/engine/Io.ts | 6 ++--- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 6c8e03cee..a0c7dd4df 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -24,29 +24,31 @@ In order to use this plugin, some keys need to be set in the global `config.json - [x] Ledger support -### Functions +### Functionality + +The user of the framework can: - [x] Deploy contracts (deploy) - [x] Interact with contracts (execute) - [x] Deploy a proxy contract (deployProxy) - [x] Upgrade a proxy contract (upgradeProxy) -### Engine +The migration engine is responsible for: -- [x] Saves ABI and bytecode of each deployed contract -- [x] Saves states between migrations -- [x] Saves execution history of each migration -- [x] Reverts if migration health-check fails +- Saving the ABI and bytecode of each deployed contract +- Saving states between migrations +- Saving the execution history of each migration +- Reverting when a migration health-check fails -## Dirs +## Directories ### Data -The `data` dir consists of one designated dir per network. +The `data` directory consists of one designated directory per-network. #### state.json -In each network dir there is a `state.json` file. It represents the state of the migration and the network: +In each network directory there is a `state.json` file. It represents the state of the migration and the network: ```json { @@ -62,11 +64,11 @@ In each network dir there is a `state.json` file. It represents the state of the #### deployments -There is also a `deployments` dir that will host, for each migration, the ABI and bytecode of any deployed contract. +There is also a `deployments` directory that will host, for each migration, the ABI and bytecode of any deployed contract. #### history.json -In each network dir there is a `history.json` file. It represents every execution done by the engine, e.g.: +In each network directory there is a `history.json` file. It represents every execution done by the engine, e.g.: ```json { @@ -91,7 +93,7 @@ In each network dir there is a `history.json` file. It represents every executio ### Migrations -The `migrations` dir contains all migration files. +The `migrations` directory contains all migration files. A migration file is a Typescript file that exposes a particular object respecting a strict interface: @@ -137,9 +139,9 @@ yarn hh create-migration do migration for me pls yarn hh migrate --network mainnet ``` -1. `Migrate` will look for the network data dir or create one if it doesn't exist. +1. `Migrate` will look for the network data directory or create one if it doesn't exist. -2. Run every migration file in the migrations dir by order of execution starting from the latestMigration timestamp. +2. Run every migration file in the migrations directory by order of execution starting from the latestMigration timestamp. 3. Update the state on the go. @@ -163,6 +165,6 @@ To fork the network `mainnet` you need to: } ``` -- Provide the `state.json` file to the `mainnet` data dir. +- Provide the `state.json` file to the `mainnet` data directory. - Specify the network you want to fork as an ENV variable: `FORK=mainnet yarn hh migrate` diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index 9a7c86a4c..cc70cda73 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -101,7 +101,7 @@ export class Engine { }; reset = () => { - log.warning(`Resetting ${this.networkSettings.networkName} migration dir`); + log.warning(`Resetting ${this.networkSettings.networkName} migration directory`); fs.rmSync(this.pathToNetworkDir, { recursive: true, @@ -111,10 +111,10 @@ export class Engine { }; initMigrationDefaultDir = () => { - // init the network dir + // init the network directory fs.mkdirSync(this.pathToNetworkDir); - // init the network deployment dir + // init the network deployment directory fs.mkdirSync(path.join(this.pathToNetworkDir, MIGRATION_DEPLOYMENTS_DIR)); // initialize the first state to default @@ -125,7 +125,7 @@ export class Engine { // if network doesn't exist if (!fs.existsSync(this.pathToNetworkDir)) { if (this.networkSettings.isFork) { - // check if the original network Dir is valid and copy it into the current network dir + // check if the original network Dir is valid and copy it into the current network directory try { const pathToOriginalNetworkDir = path.join( this.pathToRoot, @@ -159,7 +159,7 @@ export class Engine { this.initMigrationDefaultDir(); } - // update current state to the network dir + // update current state to the network directory this.migration.state = this.IO.state.fetch(this.pathToNetworkDir); // generate migration files @@ -183,7 +183,7 @@ export class Engine { } } - // even if migrations should be automatically sorted by the dir fetching, sort again just in case + // even if migrations should be automatically sorted by the directory fetching, sort again just in case this.migration.migrationsData.sort((a, b) => a.migrationTimestamp > b.migrationTimestamp ? 1 : b.migrationTimestamp > a.migrationTimestamp ? -1 : 0 ); diff --git a/packages/v3/migration/engine/Io.ts b/packages/v3/migration/engine/Io.ts index 307a2d1ee..d0e191240 100644 --- a/packages/v3/migration/engine/Io.ts +++ b/packages/v3/migration/engine/Io.ts @@ -44,7 +44,7 @@ export const initIO = (engine: Engine) => { writeOne: (historyExecution: HistoryExecution) => { const migrationHistoryFileName = MIGRATION_HISTORY_FILE_NAME; - // find the history file in the network dir + // find the history file in the network directory const pathToNetworkDirFiles = fs.readdirSync(engine.pathToNetworkDir); const pathToMigrationDeploymentFile = pathToNetworkDirFiles.find( (f: string) => f === migrationHistoryFileName @@ -77,13 +77,13 @@ export const initIO = (engine: Engine) => { writeOne: (deployment: Deployment) => { const currentMigrationDeploymentFileName = engine.migration.currentMigrationData.fileName + '.json'; - // find the migration file in the network deployments dir + // find the migration file in the network deployments directory const pathToNetworkMigrationDeploymentDir = path.join( engine.pathToNetworkDir, MIGRATION_DEPLOYMENTS_DIR ); - // read all files into the dir and fetch needed file + // read all files into the directory and fetch needed file const pathToMigrationDeploymentFiles = fs.readdirSync(pathToNetworkMigrationDeploymentDir); const pathToMigrationDeploymentFile = pathToMigrationDeploymentFiles.find( (f: string) => f === currentMigrationDeploymentFileName From cac8af01df7a123663bb185b09da9ed3a753061a Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:41:26 +0100 Subject: [PATCH 134/164] Copy --- packages/v3/migration/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index a0c7dd4df..651354075 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -48,7 +48,7 @@ The `data` directory consists of one designated directory per-network. #### state.json -In each network directory there is a `state.json` file. It represents the state of the migration and the network: +Each network directory contains the `state.json` file, which represents the state of the migration and the network: ```json { From c1f26616b274244d6ac03e2a59d06702077a517b Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:43:46 +0100 Subject: [PATCH 135/164] Copy --- packages/v3/migration/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/v3/migration/README.md b/packages/v3/migration/README.md index 651354075..bbb97332d 100644 --- a/packages/v3/migration/README.md +++ b/packages/v3/migration/README.md @@ -59,9 +59,6 @@ Each network directory contains the `state.json` file, which represents the stat } ``` -- `latestMigration`: The timestamp of the latest ran migration. -- `networkState`: Initial migration state. - #### deployments There is also a `deployments` directory that will host, for each migration, the ABI and bytecode of any deployed contract. From f210f30b35b581ea943ea75f1e7e507e1cc28886 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:44:38 +0100 Subject: [PATCH 136/164] Copy --- packages/v3/migration/engine/Engine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index cc70cda73..638b7c77a 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -96,7 +96,7 @@ export class Engine { } if (!this.overrides.gasPrice && !isForkOrHardhat) { - throw new Error(`Gas Price shouldn't be equal to 0 for ${this.networkSettings.networkName} use. Aborting`); + throw new Error(`Gas Price should be larger than 0 for ${this.networkSettings.networkName} use. Aborting`); } }; From 6879f68de9ea616b8b8dc3f4924eb99fb8c7a5ad Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:45:49 +0100 Subject: [PATCH 137/164] Add error message --- packages/v3/migration/engine/Engine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index 638b7c77a..caea7da25 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -134,7 +134,7 @@ export class Engine { ); if (!isMigrationDirValid(pathToOriginalNetworkDir)) { - throw Error(); + throw Error('Invalid migration directory'); } fs.copySync(pathToOriginalNetworkDir, this.pathToNetworkDir); From 6c255009a71be5a1f77bf429ac679903f3178ae6 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:47:26 +0100 Subject: [PATCH 138/164] Copy --- packages/v3/migration/engine/Engine.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index caea7da25..651b52fc0 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -125,7 +125,7 @@ export class Engine { // if network doesn't exist if (!fs.existsSync(this.pathToNetworkDir)) { if (this.networkSettings.isFork) { - // check if the original network Dir is valid and copy it into the current network directory + // check if the original network directory is valid and copy it into the current network directory try { const pathToOriginalNetworkDir = path.join( this.pathToRoot, @@ -146,14 +146,14 @@ export class Engine { process.exit(); } } else { - // if not a fork initialize the Dir accordingly + // if not a fork initialize the directory accordingly this.initMigrationDefaultDir(); } } - // if network Dir does exist but isn't valid, resetting it. + // if network directory does exist but isn't valid, resetting it if (!isMigrationDirValid(this.pathToNetworkDir)) { - log.warning(`${this.networkSettings.networkName} migration Dir is invalid, resetting it...`); + log.warning(`${this.networkSettings.networkName} migration directory is invalid. Resetting...`); this.reset(); this.initMigrationDefaultDir(); From dd8b0d96fd9866f3fbaa0086626089d09088da0b Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:52:16 +0100 Subject: [PATCH 139/164] Copy --- packages/v3/migration/engine/Migrate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/Migrate.ts b/packages/v3/migration/engine/Migrate.ts index baf29bc8c..ae0767ab9 100644 --- a/packages/v3/migration/engine/Migrate.ts +++ b/packages/v3/migration/engine/Migrate.ts @@ -108,7 +108,7 @@ export const migrate = async (engine: Engine) => { } // if the index of the latest migration is not equal to the length of the migrationsData array then an error occurred - // an we should revert + // and we should revert if (index !== engine.migration.migrationsData.length) { const migrationData = engine.migration.migrationsData[index]; From 14c24429f1b027ef84884b8cc35334e262c2302e Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:52:40 +0100 Subject: [PATCH 140/164] Copy --- packages/v3/migration/engine/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/index.ts b/packages/v3/migration/engine/index.ts index 3e266b492..c44453755 100644 --- a/packages/v3/migration/engine/index.ts +++ b/packages/v3/migration/engine/index.ts @@ -16,7 +16,7 @@ const initSigner = async (args: defaultArgs) => { : (await ethers.getSigners())[0]; if (!signer) { - throw new Error("Signer shouldn't be undefined"); + throw new Error('Signer must be defined'); } const signerAddress = await signer.getAddress(); From 1b3f0cdfeee624a87e25e1a1ea2097ada6b696e4 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Sun, 19 Sep 2021 15:56:59 +0100 Subject: [PATCH 141/164] Refactor --- packages/v3/migration/examples/0_deploy_my_token.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/migration/examples/0_deploy_my_token.ts b/packages/v3/migration/examples/0_deploy_my_token.ts index a43248a61..e2c4a0330 100644 --- a/packages/v3/migration/examples/0_deploy_my_token.ts +++ b/packages/v3/migration/examples/0_deploy_my_token.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */ import { engine } from '../engine'; import { deployedContract, Migration } from '../engine/Types'; -import { BigNumber } from 'ethers'; +import { utils } from 'ethers'; const { signer, contracts } = engine; const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; @@ -12,7 +12,7 @@ export type NextState = InitialState & { myToken: deployedContract; }; -const TOTAL_SUPPLY = BigNumber.from('100000000000000000000000000'); +const TOTAL_SUPPLY = utils.parseEther('100000000'); const migration: Migration = { up: async (initialState: InitialState): Promise => { From 9579ea1b426d56b9cf1266fda99065b9f849dc26 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Sun, 19 Sep 2021 17:23:42 +0200 Subject: [PATCH 142/164] add test migration to CI --- .github/workflows/workflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 10c45322f..439cb82a8 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -35,3 +35,6 @@ jobs: - name: Test run: CI=1 yarn test + + - name: Test Migration + run: CI=1 yarn test-migration From 0ded0e4d99a62b01ec607f9b42a0c4bf2ecb6853 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 12:53:35 +0200 Subject: [PATCH 143/164] fix undo --- packages/v3/components/Contracts.ts | 4 ++-- packages/v3/test/helpers/Factory.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 573ed3182..cd3a84634 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -24,7 +24,7 @@ import { TestSystemToken__factory, TestUpgradeable__factory, TokenHolder__factory, - TokenGovernance__factory, + TestTokenGovernance__factory, TransparentUpgradeableProxy__factory } from '../typechain'; @@ -109,7 +109,7 @@ const getContracts = (signer?: Signer) => ({ TestSafeERC20Ex: deployOrAttach('TestSafeERC20Ex', TestSafeERC20Ex__factory, signer), TestSystemToken: deployOrAttach('TestSystemToken', TestSystemToken__factory, signer), TestUpgradeable: deployOrAttach('TestUpgradeable', TestUpgradeable__factory, signer), - TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer), + TestTokenGovernance: deployOrAttach('TestTokenGovernance', TestTokenGovernance__factory, signer), TokenHolder: deployOrAttach('TokenHolder', TokenHolder__factory, signer), TransparentUpgradeableProxy: deployOrAttach( 'TransparentUpgradeableProxy', diff --git a/packages/v3/test/helpers/Factory.ts b/packages/v3/test/helpers/Factory.ts index 82742324a..89b90553a 100644 --- a/packages/v3/test/helpers/Factory.ts +++ b/packages/v3/test/helpers/Factory.ts @@ -82,7 +82,7 @@ const createGovernedToken = async (name: string, symbol: string, totalSupply: Bi const deployer = (await ethers.getSigners())[0]; const token = await Contracts.TestSystemToken.deploy(name, symbol, totalSupply); - const tokenGovernance = await Contracts.TokenGovernance.deploy(token.address); + const tokenGovernance = await Contracts.TestTokenGovernance.deploy(token.address); await tokenGovernance.grantRole(TokenGovernanceRoles.ROLE_GOVERNOR, deployer.address); await tokenGovernance.grantRole(TokenGovernanceRoles.ROLE_MINTER, deployer.address); await token.transferOwnership(tokenGovernance.address); From e6c5a297f2ecfde3d69fe9ae8ec435bd30d334a2 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 14:46:47 +0200 Subject: [PATCH 144/164] typo --- packages/v3/components/Contracts.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index cd3a84634..12a7bd221 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -117,8 +117,6 @@ const getContracts = (signer?: Signer) => ({ signer ) - // external contracts - /* eslint-enable camelcase */ }); From cc4bf563b54392ecd5829ec41a1125464210d0cd Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 17:15:25 +0200 Subject: [PATCH 145/164] remove outdated migration --- .../1631795969803_deploy_bnt_vbnt.ts | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts diff --git a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts b/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts deleted file mode 100644 index 97ca15745..000000000 --- a/packages/v3/migration/migrations/1631795969803_deploy_bnt_vbnt.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function */ -import { engine } from '../engine'; -import { deployedContract, Migration } from '../engine/Types'; - -const { signer, contracts } = engine; -const { deploy, execute, deployProxy, upgradeProxy } = engine.executionFunctions; - -export type InitialState = unknown; - -export type NextState = InitialState & { - BNT: deployedContract; - vBNT: deployedContract; -}; - -const migration: Migration = { - up: async (initialState: InitialState): Promise => { - const BNTToken = await deploy(contracts.BNT, 'Bancor Network Token', 'BNT', 18); - const vBNTToken = await deploy(contracts.vBNT, 'Bancor Governance Token', 'vBNT', 18); - - return { - BNT: BNTToken.address, - vBNT: vBNTToken.address - }; - }, - - healthCheck: async (initialState: InitialState, state: NextState) => { - const BNT = await contracts.BNT.attach(state.BNT); - if ((await BNT.owner()) !== (await signer.getAddress())) { - throw new Error("Current signer doesn't match contract's owner"); - } - - const vBNT = await contracts.vBNT.attach(state.vBNT); - if ((await vBNT.owner()) !== (await signer.getAddress())) { - throw new Error("Current signer doesn't match contract's owner"); - } - }, - - down: async (initialState: InitialState, newState: NextState): Promise => { - return initialState; - } -}; - -export default migration; From e940c99f12767fe1bb4a44f52e68cd776ba8f834 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 18:18:28 +0200 Subject: [PATCH 146/164] added legacy contracts + added tokengovernance to create system --- packages/v3/components/ContractBuilder.ts | 61 +++++++++++++++++++ packages/v3/components/Contracts.ts | 55 +---------------- packages/v3/components/LegacyContracts.ts | 18 ++++++ .../contracts/helpers/TestTokenGovernance.sol | 9 --- packages/v3/package.json | 2 +- packages/v3/test/helpers/Factory.ts | 10 +-- yarn.lock | 7 ++- 7 files changed, 91 insertions(+), 71 deletions(-) create mode 100644 packages/v3/components/ContractBuilder.ts create mode 100644 packages/v3/components/LegacyContracts.ts delete mode 100644 packages/v3/contracts/helpers/TestTokenGovernance.sol diff --git a/packages/v3/components/ContractBuilder.ts b/packages/v3/components/ContractBuilder.ts new file mode 100644 index 000000000..8ee9597af --- /dev/null +++ b/packages/v3/components/ContractBuilder.ts @@ -0,0 +1,61 @@ +/* eslint-enable camelcase */ +import { Signer } from '@ethersproject/abstract-signer'; +import { ContractFactory } from '@ethersproject/contracts'; +import { ethers } from 'hardhat'; + +type AsyncReturnType any> = T extends (...args: any) => Promise + ? U + : T extends (...args: any) => infer U + ? U + : any; + +export type Contract = AsyncReturnType; + +export interface ContractBuilder { + metadata: { + contractName: string; + abi: unknown; + bytecode: string; + }; + deploy(...args: Parameters): Promise>; + attach(address: string, signer?: Signer): Promise>; +} + +export type FactoryConstructor = { + new (signer?: Signer): F; + abi: unknown; + bytecode: string; +}; +export const deployOrAttach = ( + contractName: string, + // @TODO: needs to replace with correctly typed params but it doesn't + // work properly for some reason https://github.com/microsoft/TypeScript/issues/31278 + FactoryConstructor: FactoryConstructor, + initialSigner?: Signer +): ContractBuilder => { + return { + metadata: { + contractName: contractName, + abi: FactoryConstructor.abi, + bytecode: FactoryConstructor.bytecode + }, + deploy: async (...args: Parameters): Promise> => { + const defaultSigner = initialSigner || (await ethers.getSigners())[0]; + + return new FactoryConstructor(defaultSigner).deploy(...(args || [])) as Contract; + }, + attach: attachOnly(FactoryConstructor, initialSigner).attach + }; +}; + +export const attachOnly = ( + FactoryConstructor: FactoryConstructor, + initialSigner?: Signer +) => { + return { + attach: async (address: string, signer?: Signer): Promise> => { + const defaultSigner = initialSigner || (await ethers.getSigners())[0]; + return new FactoryConstructor(signer || defaultSigner).attach(address) as Contract; + } + }; +}; diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 12a7bd221..380c344cb 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -24,64 +24,12 @@ import { TestSystemToken__factory, TestUpgradeable__factory, TokenHolder__factory, - TestTokenGovernance__factory, TransparentUpgradeableProxy__factory } from '../typechain'; +import { deployOrAttach } from './ContractBuilder'; /* eslint-enable camelcase */ import { Signer } from '@ethersproject/abstract-signer'; -import { ContractFactory } from '@ethersproject/contracts'; -import { ethers } from 'hardhat'; - -type AsyncReturnType any> = T extends (...args: any) => Promise - ? U - : T extends (...args: any) => infer U - ? U - : any; - -export type Contract = AsyncReturnType; - -export interface ContractBuilder { - metadata: { - contractName: string; - abi: unknown; - bytecode: string; - }; - deploy(...args: Parameters): Promise>; - attach(address: string, signer?: Signer): Promise>; -} - -type FactoryConstructor = { new (signer?: Signer): F; abi: unknown; bytecode: string }; -const deployOrAttach = ( - contractName: string, - // @TODO: needs to replace with correctly typed params but it doesn't - // work properly for some reason https://github.com/microsoft/TypeScript/issues/31278 - FactoryConstructor: FactoryConstructor, - initialSigner?: Signer -): ContractBuilder => { - return { - metadata: { - contractName: contractName, - abi: FactoryConstructor.abi, - bytecode: FactoryConstructor.bytecode - }, - deploy: async (...args: Parameters): Promise> => { - const defaultSigner = initialSigner || (await ethers.getSigners())[0]; - - return new FactoryConstructor(defaultSigner).deploy(...(args || [])) as Contract; - }, - attach: attachOnly(FactoryConstructor, initialSigner).attach - }; -}; - -const attachOnly = (FactoryConstructor: FactoryConstructor, initialSigner?: Signer) => { - return { - attach: async (address: string, signer?: Signer): Promise> => { - const defaultSigner = initialSigner || (await ethers.getSigners())[0]; - return new FactoryConstructor(signer || defaultSigner).attach(address) as Contract; - } - }; -}; const getContracts = (signer?: Signer) => ({ connect: (signer: Signer) => getContracts(signer), @@ -109,7 +57,6 @@ const getContracts = (signer?: Signer) => ({ TestSafeERC20Ex: deployOrAttach('TestSafeERC20Ex', TestSafeERC20Ex__factory, signer), TestSystemToken: deployOrAttach('TestSystemToken', TestSystemToken__factory, signer), TestUpgradeable: deployOrAttach('TestUpgradeable', TestUpgradeable__factory, signer), - TestTokenGovernance: deployOrAttach('TestTokenGovernance', TestTokenGovernance__factory, signer), TokenHolder: deployOrAttach('TokenHolder', TokenHolder__factory, signer), TransparentUpgradeableProxy: deployOrAttach( 'TransparentUpgradeableProxy', diff --git a/packages/v3/components/LegacyContracts.ts b/packages/v3/components/LegacyContracts.ts new file mode 100644 index 000000000..ca3ad647d --- /dev/null +++ b/packages/v3/components/LegacyContracts.ts @@ -0,0 +1,18 @@ +/* eslint-disable camelcase */ +import { deployOrAttach } from './ContractBuilder'; +import { TokenGovernance__factory } from '@bancor/token-governance'; + +/* eslint-enable camelcase */ +import { Signer } from '@ethersproject/abstract-signer'; + +const getContracts = (signer?: Signer) => ({ + connect: (signer: Signer) => getContracts(signer), + + TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer) + + /* eslint-enable camelcase */ +}); + +export type ContractsType = ReturnType; + +export default getContracts(); diff --git a/packages/v3/contracts/helpers/TestTokenGovernance.sol b/packages/v3/contracts/helpers/TestTokenGovernance.sol deleted file mode 100644 index 864545102..000000000 --- a/packages/v3/contracts/helpers/TestTokenGovernance.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: SEE LICENSE IN LICENSE -pragma solidity 0.7.6; - -import { IMintableToken } from "@bancor/token-governance/0.7.6/contracts/IMintableToken.sol"; -import { TokenGovernance } from "@bancor/token-governance/0.7.6/contracts/TokenGovernance.sol"; - -contract TestTokenGovernance is TokenGovernance { - constructor(IMintableToken mintableToken) TokenGovernance(mintableToken) {} -} diff --git a/packages/v3/package.json b/packages/v3/package.json index b4d11cdf2..41b253d7c 100644 --- a/packages/v3/package.json +++ b/packages/v3/package.json @@ -42,7 +42,7 @@ "hardhat": "2.6.4" }, "devDependencies": { - "@bancor/token-governance/0.7.6": "bancorprotocol/token-governance#solc-0.7.6", + "@bancor/token-governance": "^0.1.4", "@ethersproject/hardware-wallets": "^5.4.0", "@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-etherscan": "^2.1.6", diff --git a/packages/v3/test/helpers/Factory.ts b/packages/v3/test/helpers/Factory.ts index 89b90553a..b05e88bf0 100644 --- a/packages/v3/test/helpers/Factory.ts +++ b/packages/v3/test/helpers/Factory.ts @@ -1,4 +1,6 @@ -import Contracts, { Contract, ContractBuilder } from '../../components/Contracts'; +import { ContractBuilder, Contract } from '../../components/ContractBuilder'; +import Contracts from '../../components/Contracts'; +import LegacyContracts from '../../components/LegacyContracts'; import { BancorNetwork, BancorVault, @@ -6,11 +8,11 @@ import { PoolToken, PoolTokenFactory, ProxyAdmin, - TestPoolCollection, - TokenGovernance + TestPoolCollection } from '../../typechain'; import { roles } from './AccessControl'; import { toAddress, TokenWithAddress } from './Utils'; +import { TokenGovernance } from '@bancor/token-governance'; import { BaseContract, BigNumber, ContractFactory } from 'ethers'; import { ethers } from 'hardhat'; import { isEqual } from 'lodash'; @@ -82,7 +84,7 @@ const createGovernedToken = async (name: string, symbol: string, totalSupply: Bi const deployer = (await ethers.getSigners())[0]; const token = await Contracts.TestSystemToken.deploy(name, symbol, totalSupply); - const tokenGovernance = await Contracts.TestTokenGovernance.deploy(token.address); + const tokenGovernance = await LegacyContracts.TokenGovernance.deploy(token.address); await tokenGovernance.grantRole(TokenGovernanceRoles.ROLE_GOVERNOR, deployer.address); await tokenGovernance.grantRole(TokenGovernanceRoles.ROLE_MINTER, deployer.address); await token.transferOwnership(tokenGovernance.address); diff --git a/yarn.lock b/yarn.lock index 7d0be6463..9611e347b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -247,9 +247,10 @@ "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" -"@bancor/token-governance/0.7.6@bancorprotocol/token-governance#solc-0.7.6": - version "0.2.0" - resolved "https://codeload.github.com/bancorprotocol/token-governance/tar.gz/7ca235b5b6f65fde8207fd8a5c001f2d52fd9b5f" +"@bancor/token-governance@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.4.tgz#b0b156781981145d631426e0211151e88be797d9" + integrity sha512-GlxRmt4maRbwEoZPMkqgXhr5L6t02Xf9GogBqh4fvfOFn7grPk7Tdd/THzN7hijfDeDi6/1Ywr3ob+HdQXZT7g== "@bancor/token-governance@bancorprotocol/token-governance": version "0.1.4" From 90e246efe1fd929a382e9670d5f37175aaa45c12 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 18:31:18 +0200 Subject: [PATCH 147/164] fix yarn package --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9611e347b..7b4a940d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9435,9 +9435,9 @@ node-hid@2.1.1: prebuild-install "^6.0.0" node-releases@^1.1.75: - version "1.1.75" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" - integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw== + version "1.1.76" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.76.tgz#df245b062b0cafbd5282ab6792f7dccc2d97f36e" + integrity sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA== nofilter@^1.0.4: version "1.0.4" From 44e505bec146e19fc83e63fbe512d158f20597b9 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 19:16:30 +0200 Subject: [PATCH 148/164] create migrations dir if it doesn't exist --- packages/v3/migration/engine/Engine.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/v3/migration/engine/Engine.ts b/packages/v3/migration/engine/Engine.ts index 651b52fc0..c4fdd9e6e 100644 --- a/packages/v3/migration/engine/Engine.ts +++ b/packages/v3/migration/engine/Engine.ts @@ -162,6 +162,11 @@ export class Engine { // update current state to the network directory this.migration.state = this.IO.state.fetch(this.pathToNetworkDir); + // create migrations dir if it doesn't exist + if (!fs.existsSync(this.pathToMigrationsDir)) { + fs.mkdirSync(this.pathToMigrationsDir); + } + // generate migration files const allMigrationFiles = fs.readdirSync(this.pathToMigrationsDir); const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts')); From faea684e62d0cdb4a43a51749c242fef5e6d8885 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 20:07:45 +0200 Subject: [PATCH 149/164] fix yarn.lock --- yarn.lock | 78 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7b4a940d3..c6dcb677b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2261,72 +2261,72 @@ "@types/underscore" "*" "@typescript-eslint/eslint-plugin@^4.31.1": - version "4.31.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.1.tgz#e938603a136f01dcabeece069da5fb2e331d4498" - integrity sha512-UDqhWmd5i0TvPLmbK5xY3UZB0zEGseF+DHPghZ37Sb83Qd3p8ujhvAtkU4OF46Ka5Pm5kWvFIx0cCTBFKo0alA== + version "4.31.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.2.tgz#9f41efaee32cdab7ace94b15bd19b756dd099b0a" + integrity sha512-w63SCQ4bIwWN/+3FxzpnWrDjQRXVEGiTt9tJTRptRXeFvdZc/wLiz3FQUwNQ2CVoRGI6KUWMNUj/pk63noUfcA== dependencies: - "@typescript-eslint/experimental-utils" "4.31.1" - "@typescript-eslint/scope-manager" "4.31.1" + "@typescript-eslint/experimental-utils" "4.31.2" + "@typescript-eslint/scope-manager" "4.31.2" debug "^4.3.1" functional-red-black-tree "^1.0.1" regexpp "^3.1.0" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.31.1": - version "4.31.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.1.tgz#0c900f832f270b88e13e51753647b02d08371ce5" - integrity sha512-NtoPsqmcSsWty0mcL5nTZXMf7Ei0Xr2MT8jWjXMVgRK0/1qeQ2jZzLFUh4QtyJ4+/lPUyMw5cSfeeME+Zrtp9Q== +"@typescript-eslint/experimental-utils@4.31.2": + version "4.31.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.2.tgz#98727a9c1e977dd5d20c8705e69cd3c2a86553fa" + integrity sha512-3tm2T4nyA970yQ6R3JZV9l0yilE2FedYg8dcXrTar34zC9r6JB7WyBQbpIVongKPlhEMjhQ01qkwrzWy38Bk1Q== dependencies: "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.31.1" - "@typescript-eslint/types" "4.31.1" - "@typescript-eslint/typescript-estree" "4.31.1" + "@typescript-eslint/scope-manager" "4.31.2" + "@typescript-eslint/types" "4.31.2" + "@typescript-eslint/typescript-estree" "4.31.2" eslint-scope "^5.1.1" eslint-utils "^3.0.0" "@typescript-eslint/parser@^4.31.1": - version "4.31.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.31.1.tgz#8f9a2672033e6f6d33b1c0260eebdc0ddf539064" - integrity sha512-dnVZDB6FhpIby6yVbHkwTKkn2ypjVIfAR9nh+kYsA/ZL0JlTsd22BiDjouotisY3Irmd3OW1qlk9EI5R8GrvRQ== + version "4.31.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.31.2.tgz#54aa75986e3302d91eff2bbbaa6ecfa8084e9c34" + integrity sha512-EcdO0E7M/sv23S/rLvenHkb58l3XhuSZzKf6DBvLgHqOYdL6YFMYVtreGFWirxaU2mS1GYDby3Lyxco7X5+Vjw== dependencies: - "@typescript-eslint/scope-manager" "4.31.1" - "@typescript-eslint/types" "4.31.1" - "@typescript-eslint/typescript-estree" "4.31.1" + "@typescript-eslint/scope-manager" "4.31.2" + "@typescript-eslint/types" "4.31.2" + "@typescript-eslint/typescript-estree" "4.31.2" debug "^4.3.1" -"@typescript-eslint/scope-manager@4.31.1": - version "4.31.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.31.1.tgz#0c21e8501f608d6a25c842fcf59541ef4f1ab561" - integrity sha512-N1Uhn6SqNtU2XpFSkD4oA+F0PfKdWHyr4bTX0xTj8NRx1314gBDRL1LUuZd5+L3oP+wo6hCbZpaa1in6SwMcVQ== +"@typescript-eslint/scope-manager@4.31.2": + version "4.31.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.31.2.tgz#1d528cb3ed3bcd88019c20a57c18b897b073923a" + integrity sha512-2JGwudpFoR/3Czq6mPpE8zBPYdHWFGL6lUNIGolbKQeSNv4EAiHaR5GVDQaLA0FwgcdcMtRk+SBJbFGL7+La5w== dependencies: - "@typescript-eslint/types" "4.31.1" - "@typescript-eslint/visitor-keys" "4.31.1" + "@typescript-eslint/types" "4.31.2" + "@typescript-eslint/visitor-keys" "4.31.2" -"@typescript-eslint/types@4.31.1": - version "4.31.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.31.1.tgz#5f255b695627a13401d2fdba5f7138bc79450d66" - integrity sha512-kixltt51ZJGKENNW88IY5MYqTBA8FR0Md8QdGbJD2pKZ+D5IvxjTYDNtJPDxFBiXmka2aJsITdB1BtO1fsgmsQ== +"@typescript-eslint/types@4.31.2": + version "4.31.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.31.2.tgz#2aea7177d6d744521a168ed4668eddbd912dfadf" + integrity sha512-kWiTTBCTKEdBGrZKwFvOlGNcAsKGJSBc8xLvSjSppFO88AqGxGNYtF36EuEYG6XZ9vT0xX8RNiHbQUKglbSi1w== -"@typescript-eslint/typescript-estree@4.31.1": - version "4.31.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.1.tgz#4a04d5232cf1031232b7124a9c0310b577a62d17" - integrity sha512-EGHkbsUvjFrvRnusk6yFGqrqMBTue5E5ROnS5puj3laGQPasVUgwhrxfcgkdHNFECHAewpvELE1Gjv0XO3mdWg== +"@typescript-eslint/typescript-estree@4.31.2": + version "4.31.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.2.tgz#abfd50594d8056b37e7428df3b2d185ef2d0060c" + integrity sha512-ieBq8U9at6PvaC7/Z6oe8D3czeW5d//Fo1xkF/s9394VR0bg/UaMYPdARiWyKX+lLEjY3w/FNZJxitMsiWv+wA== dependencies: - "@typescript-eslint/types" "4.31.1" - "@typescript-eslint/visitor-keys" "4.31.1" + "@typescript-eslint/types" "4.31.2" + "@typescript-eslint/visitor-keys" "4.31.2" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.31.1": - version "4.31.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.1.tgz#f2e7a14c7f20c4ae07d7fc3c5878c4441a1da9cc" - integrity sha512-PCncP8hEqKw6SOJY+3St4LVtoZpPPn+Zlpm7KW5xnviMhdqcsBty4Lsg4J/VECpJjw1CkROaZhH4B8M1OfnXTQ== +"@typescript-eslint/visitor-keys@4.31.2": + version "4.31.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.2.tgz#7d5b4a4705db7fe59ecffb273c1d082760f635cc" + integrity sha512-PrBId7EQq2Nibns7dd/ch6S6/M4/iwLM9McbgeEbCXfxdwRUNxJ4UNreJ6Gh3fI2GNKNrWnQxKL7oCPmngKBug== dependencies: - "@typescript-eslint/types" "4.31.1" + "@typescript-eslint/types" "4.31.2" eslint-visitor-keys "^2.0.0" "@ungap/promise-all-settled@1.1.2": From d39e333e8d48bb3897a9e3d9ad3c06791d3ac365 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 20:31:08 +0200 Subject: [PATCH 150/164] add legacy BNT and vBNT tokens --- packages/v3/components/LegacyContracts.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/v3/components/LegacyContracts.ts b/packages/v3/components/LegacyContracts.ts index ca3ad647d..d11b08a61 100644 --- a/packages/v3/components/LegacyContracts.ts +++ b/packages/v3/components/LegacyContracts.ts @@ -1,6 +1,10 @@ /* eslint-disable camelcase */ import { deployOrAttach } from './ContractBuilder'; -import { TokenGovernance__factory } from '@bancor/token-governance'; +import { + TokenGovernance__factory, + SmartToken__factory as BNTToken__factory, + DSToken__factory as vBNTToken__factory +} from '@bancor/token-governance'; /* eslint-enable camelcase */ import { Signer } from '@ethersproject/abstract-signer'; @@ -8,7 +12,9 @@ import { Signer } from '@ethersproject/abstract-signer'; const getContracts = (signer?: Signer) => ({ connect: (signer: Signer) => getContracts(signer), - TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer) + TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer), + BNTToken: deployOrAttach('BNTToken', BNTToken__factory, signer), + vBNTToken: deployOrAttach('vBNTToken', vBNTToken__factory, signer) /* eslint-enable camelcase */ }); From 448bcc3f21cbe14e3bb0b3cdc30357c5805cc14c Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 22:03:09 +0200 Subject: [PATCH 151/164] add npm package as dependencies instead of github repo in v2 package --- packages/v2/components/Contracts.ts | 5 ++--- packages/v2/package.json | 2 +- yarn.lock | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/v2/components/Contracts.ts b/packages/v2/components/Contracts.ts index a31fff573..eb646b4a4 100644 --- a/packages/v2/components/Contracts.ts +++ b/packages/v2/components/Contracts.ts @@ -1,7 +1,6 @@ -import { ethers } from 'hardhat'; -import { Contract as OldContract, ContractFactory, Overrides as OldOverrides } from '@ethersproject/contracts'; import { Signer } from '@ethersproject/abstract-signer'; - +import { Contract as OldContract, ContractFactory, Overrides as OldOverrides } from '@ethersproject/contracts'; +import { ethers } from 'hardhat'; import { BancorNetwork__factory, BancorX__factory, diff --git a/packages/v2/package.json b/packages/v2/package.json index d458955cb..76b873d75 100644 --- a/packages/v2/package.json +++ b/packages/v2/package.json @@ -39,7 +39,7 @@ "hardhat": "2.6.4" }, "devDependencies": { - "@bancor/token-governance": "bancorprotocol/token-governance", + "@bancor/token-governance": "^0.1.4", "@ethersproject/hardware-wallets": "^5.4.0", "@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-etherscan": "^2.1.6", diff --git a/yarn.lock b/yarn.lock index c6dcb677b..b90d125ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -252,10 +252,6 @@ resolved "https://registry.yarnpkg.com/@bancor/token-governance/-/token-governance-0.1.4.tgz#b0b156781981145d631426e0211151e88be797d9" integrity sha512-GlxRmt4maRbwEoZPMkqgXhr5L6t02Xf9GogBqh4fvfOFn7grPk7Tdd/THzN7hijfDeDi6/1Ywr3ob+HdQXZT7g== -"@bancor/token-governance@bancorprotocol/token-governance": - version "0.1.4" - resolved "https://codeload.github.com/bancorprotocol/token-governance/tar.gz/1e9e15b57fa99f836c4633ca595024b50dddadef" - "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" From f9b48d1e1ad0cfb27b92b4bf67569465499eda0d Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Mon, 20 Sep 2021 23:38:40 +0200 Subject: [PATCH 152/164] fix dep path --- packages/v3/migration/engine/Execution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/migration/engine/Execution.ts b/packages/v3/migration/engine/Execution.ts index 17874a440..1e61461ed 100644 --- a/packages/v3/migration/engine/Execution.ts +++ b/packages/v3/migration/engine/Execution.ts @@ -1,4 +1,4 @@ -import { ContractBuilder, Contract } from '../../components/Contracts'; +import { ContractBuilder, Contract } from '../../components/ContractBuilder'; import { ProxyAdmin } from '../../typechain'; import { Engine } from './Engine'; import { log } from './Logger'; From ee95191fdcd8d3acb67654cd39470c7ae14873d1 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 21 Sep 2021 17:51:20 +0200 Subject: [PATCH 153/164] add NetworkToken & GovToken project wide --- packages/v3/components/Contracts.ts | 2 -- packages/v3/components/LegacyContracts.ts | 16 +++++++++------- packages/v3/test/helpers/Factory.ts | 19 +++++++++++++++---- packages/v3/test/helpers/Utils.ts | 6 +++++- packages/v3/test/network/BancorNetwork.ts | 12 ++++++------ packages/v3/test/network/BancorVault.ts | 3 ++- .../v3/test/network/PendingWithdrawals.ts | 4 ++-- packages/v3/test/pools/NetworkTokenPool.ts | 17 +++++++++-------- packages/v3/test/pools/PoolCollection.ts | 7 ++++--- packages/v3/test/pools/PoolTokenFactory.ts | 3 ++- 10 files changed, 54 insertions(+), 35 deletions(-) diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 380c344cb..8931acda1 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -63,8 +63,6 @@ const getContracts = (signer?: Signer) => ({ TransparentUpgradeableProxy__factory, signer ) - - /* eslint-enable camelcase */ }); export type ContractsType = ReturnType; diff --git a/packages/v3/components/LegacyContracts.ts b/packages/v3/components/LegacyContracts.ts index d11b08a61..d60d4861f 100644 --- a/packages/v3/components/LegacyContracts.ts +++ b/packages/v3/components/LegacyContracts.ts @@ -2,21 +2,23 @@ import { deployOrAttach } from './ContractBuilder'; import { TokenGovernance__factory, - SmartToken__factory as BNTToken__factory, - DSToken__factory as vBNTToken__factory + SmartToken__factory as NetworkToken__factory, + SmartToken as NetworkToken, + DSToken__factory as GovToken__factory, + DSToken as GovToken } from '@bancor/token-governance'; +import { Signer } from '@ethersproject/abstract-signer'; + +export { NetworkToken, GovToken }; /* eslint-enable camelcase */ -import { Signer } from '@ethersproject/abstract-signer'; const getContracts = (signer?: Signer) => ({ connect: (signer: Signer) => getContracts(signer), TokenGovernance: deployOrAttach('TokenGovernance', TokenGovernance__factory, signer), - BNTToken: deployOrAttach('BNTToken', BNTToken__factory, signer), - vBNTToken: deployOrAttach('vBNTToken', vBNTToken__factory, signer) - - /* eslint-enable camelcase */ + NetworkToken: deployOrAttach('BNTToken', NetworkToken__factory, signer), + GovToken: deployOrAttach('vBNTToken', GovToken__factory, signer) }); export type ContractsType = ReturnType; diff --git a/packages/v3/test/helpers/Factory.ts b/packages/v3/test/helpers/Factory.ts index b05e88bf0..b6e94dc8b 100644 --- a/packages/v3/test/helpers/Factory.ts +++ b/packages/v3/test/helpers/Factory.ts @@ -20,6 +20,7 @@ import { isEqual } from 'lodash'; const { TokenGovernance: TokenGovernanceRoles, BancorVault: BancorVaultRoles } = roles; const TOTAL_SUPPLY = BigNumber.from(1_000_000_000).mul(BigNumber.from(10).pow(18)); +const DECIMALS = BigNumber.from(18); type CtorArgs = Parameters; type InitArgs = Parameters; @@ -80,10 +81,16 @@ const createProxy = async ( return factory.attach(proxy.address); }; -const createGovernedToken = async (name: string, symbol: string, totalSupply: BigNumber) => { +const createGovernedToken = async ( + legacyFactory: ContractBuilder, + totalSupply: BigNumber, + ...args: Parameters +) => { const deployer = (await ethers.getSigners())[0]; - const token = await Contracts.TestSystemToken.deploy(name, symbol, totalSupply); + const token = await legacyFactory.deploy(...args); + await token.issue(deployer.address, totalSupply); + const tokenGovernance = await LegacyContracts.TokenGovernance.deploy(token.address); await tokenGovernance.grantRole(TokenGovernanceRoles.ROLE_GOVERNOR, deployer.address); await tokenGovernance.grantRole(TokenGovernanceRoles.ROLE_MINTER, deployer.address); @@ -95,14 +102,18 @@ const createGovernedToken = async (name: string, symbol: string, totalSupply: Bi export const createGovernedTokens = async () => { const { token: networkToken, tokenGovernance: networkTokenGovernance } = await createGovernedToken( + LegacyContracts.NetworkToken, + TOTAL_SUPPLY, 'BNT', 'BNT', - TOTAL_SUPPLY + DECIMALS ); const { token: govToken, tokenGovernance: govTokenGovernance } = await createGovernedToken( + LegacyContracts.GovToken, + TOTAL_SUPPLY, 'vBNT', 'vBNT', - TOTAL_SUPPLY + DECIMALS ); return { networkToken, networkTokenGovernance, govToken, govTokenGovernance }; diff --git a/packages/v3/test/helpers/Utils.ts b/packages/v3/test/helpers/Utils.ts index 66045ad7b..7adeaec74 100644 --- a/packages/v3/test/helpers/Utils.ts +++ b/packages/v3/test/helpers/Utils.ts @@ -1,4 +1,5 @@ import Contracts from '../../components/Contracts'; +import { NetworkToken, GovToken } from '../../components/LegacyContracts'; import { TestERC20Token } from '../../typechain'; import { NATIVE_TOKEN_ADDRESS } from './Constants'; import { toWei } from './Types'; @@ -51,7 +52,10 @@ export const transfer = async ( .transfer(targetAddress, amount); }; -export const createTokenBySymbol = async (symbol: string, networkToken: TestERC20Token): Promise => { +export const createTokenBySymbol = async ( + symbol: string, + networkToken: TestERC20Token | NetworkToken | GovToken +): Promise => { switch (symbol) { case 'BNT': return networkToken; diff --git a/packages/v3/test/network/BancorNetwork.ts b/packages/v3/test/network/BancorNetwork.ts index a753e9034..98ac12ab8 100644 --- a/packages/v3/test/network/BancorNetwork.ts +++ b/packages/v3/test/network/BancorNetwork.ts @@ -1,11 +1,11 @@ import Contracts from '../../components/Contracts'; +import { NetworkToken, GovToken } from '../../components/LegacyContracts'; import { BancorVault, NetworkSettings, PoolToken, PoolTokenFactory, TestBancorNetwork, - TestERC20Token, TestNetworkTokenPool, TestPendingWithdrawals, TestPoolCollection, @@ -514,7 +514,7 @@ describe('BancorNetwork', () => { let reserveToken: TokenWithAddress; let network: TestBancorNetwork; let networkSettings: NetworkSettings; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let poolCollection: TestPoolCollection; let poolType: number; @@ -592,8 +592,8 @@ describe('BancorNetwork', () => { describe('deposit', () => { let network: TestBancorNetwork; let networkSettings: NetworkSettings; - let networkToken: TestERC20Token; - let govToken: TestERC20Token; + let networkToken: NetworkToken; + let govToken: GovToken; let networkTokenPool: TestNetworkTokenPool; let poolCollection: TestPoolCollection; let vault: BancorVault; @@ -1387,8 +1387,8 @@ describe('BancorNetwork', () => { describe('withdraw', () => { let network: TestBancorNetwork; let networkSettings: NetworkSettings; - let networkToken: TestERC20Token; - let govToken: TestERC20Token; + let networkToken: NetworkToken; + let govToken: GovToken; let networkTokenPool: TestNetworkTokenPool; let poolCollection: TestPoolCollection; let vault: BancorVault; diff --git a/packages/v3/test/network/BancorVault.ts b/packages/v3/test/network/BancorVault.ts index bf0d4de43..22dc289f1 100644 --- a/packages/v3/test/network/BancorVault.ts +++ b/packages/v3/test/network/BancorVault.ts @@ -1,4 +1,5 @@ import Contracts from '../../components/Contracts'; +import { NetworkToken } from '../../components/LegacyContracts'; import { BancorVault, TestERC20Token } from '../../typechain'; import { expectRole, roles } from '../helpers/AccessControl'; import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from '../helpers/Constants'; @@ -57,7 +58,7 @@ describe('BancorVault', () => { }); describe('asset management', () => { - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let vault: BancorVault; beforeEach(async () => { diff --git a/packages/v3/test/network/PendingWithdrawals.ts b/packages/v3/test/network/PendingWithdrawals.ts index 965cd8c44..f27933434 100644 --- a/packages/v3/test/network/PendingWithdrawals.ts +++ b/packages/v3/test/network/PendingWithdrawals.ts @@ -1,9 +1,9 @@ import Contracts from '../../components/Contracts'; +import { NetworkToken } from '../../components/LegacyContracts'; import { NetworkSettings, PoolToken, TestBancorNetwork, - TestERC20Token, TestNetworkTokenPool, TestPendingWithdrawals, TestPoolCollection @@ -160,7 +160,7 @@ describe('PendingWithdrawals', () => { let reserveToken: TokenWithAddress; let networkSettings: NetworkSettings; let network: TestBancorNetwork; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let networkTokenPool: TestNetworkTokenPool; let networkPoolToken: PoolToken; let pendingWithdrawals: TestPendingWithdrawals; diff --git a/packages/v3/test/pools/NetworkTokenPool.ts b/packages/v3/test/pools/NetworkTokenPool.ts index 1463740a5..b2963b53c 100644 --- a/packages/v3/test/pools/NetworkTokenPool.ts +++ b/packages/v3/test/pools/NetworkTokenPool.ts @@ -1,4 +1,5 @@ import Contracts from '../../components/Contracts'; +import { NetworkToken, GovToken } from '../../components/LegacyContracts'; import { BancorVault, NetworkSettings, @@ -97,7 +98,7 @@ describe('NetworkTokenPool', () => { describe('mint', () => { let network: TestBancorNetwork; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let networkTokenPool: TestNetworkTokenPool; let recipient: SignerWithAddress; @@ -140,7 +141,7 @@ describe('NetworkTokenPool', () => { describe('burnFromVault', () => { let network: TestBancorNetwork; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let networkTokenPool: TestNetworkTokenPool; let vault: BancorVault; @@ -290,7 +291,7 @@ describe('NetworkTokenPool', () => { describe('request liquidity', () => { let networkSettings: NetworkSettings; let network: TestBancorNetwork; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let networkTokenPool: TestNetworkTokenPool; let networkPoolToken: PoolToken; let vault: BancorVault; @@ -472,7 +473,7 @@ describe('NetworkTokenPool', () => { describe('renounce liquidity', () => { let networkSettings: NetworkSettings; let network: TestBancorNetwork; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let networkTokenPool: TestNetworkTokenPool; let networkPoolToken: PoolToken; let vault: BancorVault; @@ -601,8 +602,8 @@ describe('NetworkTokenPool', () => { describe('deposit liquidity', () => { let networkSettings: NetworkSettings; let network: TestBancorNetwork; - let networkToken: TestERC20Token; - let govToken: TestERC20Token; + let networkToken: NetworkToken; + let govToken: GovToken; let networkTokenPool: TestNetworkTokenPool; let networkPoolToken: PoolToken; let poolCollection: TestPoolCollection; @@ -791,8 +792,8 @@ describe('NetworkTokenPool', () => { describe('withdraw liquidity', () => { let networkSettings: NetworkSettings; let network: TestBancorNetwork; - let networkToken: TestERC20Token; - let govToken: TestERC20Token; + let networkToken: NetworkToken; + let govToken: GovToken; let networkTokenPool: TestNetworkTokenPool; let networkPoolToken: PoolToken; let poolCollection: TestPoolCollection; diff --git a/packages/v3/test/pools/PoolCollection.ts b/packages/v3/test/pools/PoolCollection.ts index 52ce67039..659181ed5 100644 --- a/packages/v3/test/pools/PoolCollection.ts +++ b/packages/v3/test/pools/PoolCollection.ts @@ -1,4 +1,5 @@ import Contracts from '../../components/Contracts'; +import { NetworkToken } from '../../components/LegacyContracts'; import { NetworkSettings, PoolToken, TestBancorNetwork, TestERC20Token, TestPoolCollection } from '../../typechain'; import { INVALID_FRACTION, ZERO_FRACTION, MAX_UINT256, PPM_RESOLUTION, ZERO_ADDRESS } from '../helpers/Constants'; import { createPool, createSystem } from '../helpers/Factory'; @@ -135,7 +136,7 @@ describe('PoolCollection', () => { describe('create pool', () => { let networkSettings: NetworkSettings; let network: TestBancorNetwork; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let poolCollection: TestPoolCollection; let reserveToken: TokenWithAddress; @@ -841,7 +842,7 @@ describe('PoolCollection', () => { const testDeposit = (symbol: string) => { let networkSettings: NetworkSettings; let network: TestBancorNetwork; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let poolCollection: TestPoolCollection; let reserveToken: TokenWithAddress; @@ -1178,7 +1179,7 @@ describe('PoolCollection', () => { const testWithdraw = (symbol: string) => { let networkSettings: NetworkSettings; let network: TestBancorNetwork; - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let poolCollection: TestPoolCollection; let poolToken: PoolToken; let reserveToken: TokenWithAddress; diff --git a/packages/v3/test/pools/PoolTokenFactory.ts b/packages/v3/test/pools/PoolTokenFactory.ts index d7dc90de2..4ea2fa135 100644 --- a/packages/v3/test/pools/PoolTokenFactory.ts +++ b/packages/v3/test/pools/PoolTokenFactory.ts @@ -1,4 +1,5 @@ import Contracts from '../../components/Contracts'; +import { NetworkToken } from '../../components/LegacyContracts'; import { TestERC20Token, PoolTokenFactory } from '../../typechain'; import { expectRole, roles } from '../helpers/AccessControl'; import { ZERO_ADDRESS } from '../helpers/Constants'; @@ -111,7 +112,7 @@ describe('PoolTokenFactory', () => { }); describe('create pool token', () => { - let networkToken: TestERC20Token; + let networkToken: NetworkToken; let poolTokenFactory: PoolTokenFactory; let reserveToken: TokenWithAddress; From a5ed60328126ce13ea269bb6f31939a373625c15 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 21 Sep 2021 21:35:18 +0200 Subject: [PATCH 154/164] update tests with correct error messages --- packages/v3/test/network/BancorNetwork.ts | 8 +++----- packages/v3/test/pools/NetworkTokenPool.ts | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/v3/test/network/BancorNetwork.ts b/packages/v3/test/network/BancorNetwork.ts index 98ac12ab8..2f0231e73 100644 --- a/packages/v3/test/network/BancorNetwork.ts +++ b/packages/v3/test/network/BancorNetwork.ts @@ -907,9 +907,7 @@ describe('BancorNetwork', () => { }); it('should revert when attempting to deposit without approving the network', async () => { - await expect(deposit(amount)).to.be.revertedWith( - 'ERC20: transfer amount exceeds allowance' - ); + await expect(deposit(amount)).to.be.reverted; }); } @@ -1536,7 +1534,7 @@ describe('BancorNetwork', () => { if (isNetworkToken) { it('should revert when attempting to withdraw without approving the governance token amount', async () => { await expect(network.connect(provider).withdraw(id)).to.be.revertedWith( - 'ERC20: transfer amount exceeds allowance' + 'ERR_UNDERFLOW' ); }); @@ -1545,7 +1543,7 @@ describe('BancorNetwork', () => { await govToken.connect(provider).approve(network.address, poolTokenAmount); await expect(network.connect(provider).withdraw(id)).to.be.revertedWith( - 'ERC20: transfer amount exceeds balance' + 'ERR_UNDERFLOW' ); }); } diff --git a/packages/v3/test/pools/NetworkTokenPool.ts b/packages/v3/test/pools/NetworkTokenPool.ts index b2963b53c..bd9f4f967 100644 --- a/packages/v3/test/pools/NetworkTokenPool.ts +++ b/packages/v3/test/pools/NetworkTokenPool.ts @@ -742,9 +742,8 @@ describe('NetworkTokenPool', () => { it('should revert when attempting to deposit without sending the network tokens', async () => { const amount = BigNumber.from(1); - await expect( - network.depositToNetworkPoolForT(provider.address, amount, false, BigNumber.from(0)) - ).to.be.revertedWith('ERC20: burn amount exceeds balance'); + await expect(network.depositToNetworkPoolForT(provider.address, amount, false, BigNumber.from(0))) + .to.be.reverted; }); it('should revert when attempting to deposit too much liquidity', async () => { @@ -965,7 +964,7 @@ describe('NetworkTokenPool', () => { await expect( network.withdrawFromNetworkPoolT(provider.address, poolTokenAmount) - ).to.be.revertedWith('ERC20: burn amount exceeds balance'); + ).to.be.revertedWith('ERR_UNDERFLOW'); }); it('should revert when attempting to deposit without approving the network tokens', async () => { From d5cfc3d4bfdd47485a08a0825efc2e5f2c548530 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 22 Sep 2021 00:33:11 +0200 Subject: [PATCH 155/164] update throw error message to match with the real contracts --- packages/v3/test/network/BancorVault.ts | 2 +- packages/v3/test/pools/NetworkTokenPool.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/v3/test/network/BancorVault.ts b/packages/v3/test/network/BancorVault.ts index 22dc289f1..96fa4fc01 100644 --- a/packages/v3/test/network/BancorVault.ts +++ b/packages/v3/test/network/BancorVault.ts @@ -100,7 +100,7 @@ describe('BancorVault', () => { await expect( vault.connect(sender).withdrawTokens(token.address, target.address, amountToWithdraw) - ).to.be.revertedWith(symbol !== 'ETH' ? 'ERC20: transfer amount exceeds balance' : ''); + ).to.be.revertedWith(symbol !== 'ETH' ? 'SafeERC20: low-level call failed' : ''); }); it('should be able to withdraw any tokens', async () => { diff --git a/packages/v3/test/pools/NetworkTokenPool.ts b/packages/v3/test/pools/NetworkTokenPool.ts index bd9f4f967..f3316e3aa 100644 --- a/packages/v3/test/pools/NetworkTokenPool.ts +++ b/packages/v3/test/pools/NetworkTokenPool.ts @@ -167,7 +167,7 @@ describe('NetworkTokenPool', () => { it('should revert when attempting to burn more than balance of the vault', async () => { await expect(network.burnFromVaultT(amount.add(BigNumber.from(1)))).to.be.revertedWith( - 'ERC20: transfer amount exceeds balance' + 'SafeERC20: low-level call failed' ); }); From dac5adcbae496bcfeac544e18af9b2ce6b9e0e9e Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 22 Sep 2021 02:06:40 +0200 Subject: [PATCH 156/164] differenciate error message for BNT and TKN --- packages/v3/test/network/BancorVault.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/v3/test/network/BancorVault.ts b/packages/v3/test/network/BancorVault.ts index 96fa4fc01..32fa5312a 100644 --- a/packages/v3/test/network/BancorVault.ts +++ b/packages/v3/test/network/BancorVault.ts @@ -100,7 +100,13 @@ describe('BancorVault', () => { await expect( vault.connect(sender).withdrawTokens(token.address, target.address, amountToWithdraw) - ).to.be.revertedWith(symbol !== 'ETH' ? 'SafeERC20: low-level call failed' : ''); + ).to.be.revertedWith( + symbol !== 'ETH' + ? symbol === 'BNT' + ? 'SafeERC20: low-level call failed' + : 'ERC20: transfer amount exceeds balance' + : '' + ); }); it('should be able to withdraw any tokens', async () => { From 84b43341228a6be075a63bd5a995fda8a5990edc Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 22 Sep 2021 18:05:32 +0200 Subject: [PATCH 157/164] add new line --- packages/v3/components/ContractBuilder.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/v3/components/ContractBuilder.ts b/packages/v3/components/ContractBuilder.ts index 8ee9597af..2bb02b50a 100644 --- a/packages/v3/components/ContractBuilder.ts +++ b/packages/v3/components/ContractBuilder.ts @@ -26,6 +26,7 @@ export type FactoryConstructor = { abi: unknown; bytecode: string; }; + export const deployOrAttach = ( contractName: string, // @TODO: needs to replace with correctly typed params but it doesn't From 2ecb2f307283dc47010fcf01476f5c1bd5bbd084 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 22 Sep 2021 18:11:28 +0200 Subject: [PATCH 158/164] remove TestSystemToken --- packages/v3/components/Contracts.ts | 2 - .../v3/contracts/helpers/TestSystemToken.sol | 37 ------------------- 2 files changed, 39 deletions(-) delete mode 100644 packages/v3/contracts/helpers/TestSystemToken.sol diff --git a/packages/v3/components/Contracts.ts b/packages/v3/components/Contracts.ts index 8931acda1..4c8937dde 100644 --- a/packages/v3/components/Contracts.ts +++ b/packages/v3/components/Contracts.ts @@ -21,7 +21,6 @@ import { TestPoolCollection__factory, TestReserveToken__factory, TestSafeERC20Ex__factory, - TestSystemToken__factory, TestUpgradeable__factory, TokenHolder__factory, TransparentUpgradeableProxy__factory @@ -55,7 +54,6 @@ const getContracts = (signer?: Signer) => ({ TestPendingWithdrawals: deployOrAttach('TestPendingWithdrawals', TestPendingWithdrawals__factory, signer), TestReserveToken: deployOrAttach('TestReserveToken', TestReserveToken__factory, signer), TestSafeERC20Ex: deployOrAttach('TestSafeERC20Ex', TestSafeERC20Ex__factory, signer), - TestSystemToken: deployOrAttach('TestSystemToken', TestSystemToken__factory, signer), TestUpgradeable: deployOrAttach('TestUpgradeable', TestUpgradeable__factory, signer), TokenHolder: deployOrAttach('TokenHolder', TokenHolder__factory, signer), TransparentUpgradeableProxy: deployOrAttach( diff --git a/packages/v3/contracts/helpers/TestSystemToken.sol b/packages/v3/contracts/helpers/TestSystemToken.sol deleted file mode 100644 index ef48743a2..000000000 --- a/packages/v3/contracts/helpers/TestSystemToken.sol +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-License-Identifier: SEE LICENSE IN LICENSE -pragma solidity 0.7.6; - -import { IMintableToken } from "@bancor/token-governance/contracts/IMintableToken.sol"; -import { IClaimable } from "@bancor/token-governance/contracts/IClaimable.sol"; - -import { Owned } from "../utility/Owned.sol"; - -import { TestERC20Token } from "./TestERC20Token.sol"; - -contract TestSystemToken is IMintableToken, Owned, TestERC20Token { - constructor( - string memory name, - string memory symbol, - uint256 totalSupply - ) TestERC20Token(name, symbol, totalSupply) {} - - function issue(address to, uint256 amount) external override { - _mint(to, amount); - } - - function destroy(address from, uint256 amount) external override { - _burn(from, amount); - } - - function owner() public view override(IClaimable, Owned) returns (address) { - return super.owner(); - } - - function transferOwnership(address newOwner) public override(IClaimable, Owned) { - super.transferOwnership(newOwner); - } - - function acceptOwnership() public override(IClaimable, Owned) { - super.acceptOwnership(); - } -} From 7fa4b105628c40b13d52c83bc10f2210955bf446 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 22 Sep 2021 18:34:19 +0200 Subject: [PATCH 159/164] update throw message --- packages/v3/test/network/BancorNetwork.ts | 6 ++++-- packages/v3/test/pools/NetworkTokenPool.ts | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/v3/test/network/BancorNetwork.ts b/packages/v3/test/network/BancorNetwork.ts index 2f0231e73..3cc7b6b62 100644 --- a/packages/v3/test/network/BancorNetwork.ts +++ b/packages/v3/test/network/BancorNetwork.ts @@ -906,8 +906,10 @@ describe('BancorNetwork', () => { await reserveToken.transfer(sender.address, amount); }); - it('should revert when attempting to deposit without approving the network', async () => { - await expect(deposit(amount)).to.be.reverted; + it.only('should revert when attempting to deposit without approving the network', async () => { + await expect(deposit(amount)).to.be.revertedWith( + symbol === 'BNT' ? '' : 'ERC20: transfer amount exceeds allowance' + ); }); } diff --git a/packages/v3/test/pools/NetworkTokenPool.ts b/packages/v3/test/pools/NetworkTokenPool.ts index f3316e3aa..509ddbe35 100644 --- a/packages/v3/test/pools/NetworkTokenPool.ts +++ b/packages/v3/test/pools/NetworkTokenPool.ts @@ -739,11 +739,12 @@ describe('NetworkTokenPool', () => { ); }; - it('should revert when attempting to deposit without sending the network tokens', async () => { + it.only('should revert when attempting to deposit without sending the network tokens', async () => { const amount = BigNumber.from(1); - await expect(network.depositToNetworkPoolForT(provider.address, amount, false, BigNumber.from(0))) - .to.be.reverted; + await expect( + network.depositToNetworkPoolForT(provider.address, amount, false, BigNumber.from(0)) + ).to.be.revertedWith(''); }); it('should revert when attempting to deposit too much liquidity', async () => { From 25b3cb876cb7cf52f89b97a0810ac571ff2cafb8 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Wed, 22 Sep 2021 19:34:17 +0200 Subject: [PATCH 160/164] additional fix --- packages/v3/test/network/BancorNetwork.ts | 2 +- packages/v3/test/pools/NetworkTokenPool.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/v3/test/network/BancorNetwork.ts b/packages/v3/test/network/BancorNetwork.ts index 3cc7b6b62..1cbe79c8e 100644 --- a/packages/v3/test/network/BancorNetwork.ts +++ b/packages/v3/test/network/BancorNetwork.ts @@ -906,7 +906,7 @@ describe('BancorNetwork', () => { await reserveToken.transfer(sender.address, amount); }); - it.only('should revert when attempting to deposit without approving the network', async () => { + it('should revert when attempting to deposit without approving the network', async () => { await expect(deposit(amount)).to.be.revertedWith( symbol === 'BNT' ? '' : 'ERC20: transfer amount exceeds allowance' ); diff --git a/packages/v3/test/pools/NetworkTokenPool.ts b/packages/v3/test/pools/NetworkTokenPool.ts index 509ddbe35..65529e879 100644 --- a/packages/v3/test/pools/NetworkTokenPool.ts +++ b/packages/v3/test/pools/NetworkTokenPool.ts @@ -739,7 +739,7 @@ describe('NetworkTokenPool', () => { ); }; - it.only('should revert when attempting to deposit without sending the network tokens', async () => { + it('should revert when attempting to deposit without sending the network tokens', async () => { const amount = BigNumber.from(1); await expect( @@ -827,7 +827,7 @@ describe('NetworkTokenPool', () => { }); it('should revert when attempting to withdraw before any deposits were made', async () => { - await expect(network.withdrawFromNetworkPoolT(provider.address, BigNumber.from(1))).to.be.reverted; // division by 0 + await expect(network.withdrawFromNetworkPoolT(provider.address, BigNumber.from(1))).to.be.revertedWith(''); // division by 0 }); context('with a whitelisted and registered pool', () => { From 1244f20c50204c5e4c451a204f3d9d17b65d9352 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 23 Sep 2021 13:19:03 +0200 Subject: [PATCH 161/164] add utils functions for reserveToken errors --- .../token/interfaces/IReserveToken.sol | 2 +- packages/v3/test/helpers/Constants.ts | 3 +- packages/v3/test/helpers/Factory.ts | 6 ++-- packages/v3/test/helpers/Utils.ts | 29 +++++++++++++++++++ packages/v3/test/network/BancorNetwork.ts | 11 +++++-- packages/v3/test/network/BancorVault.ts | 10 ++----- 6 files changed, 46 insertions(+), 15 deletions(-) diff --git a/packages/v3/contracts/token/interfaces/IReserveToken.sol b/packages/v3/contracts/token/interfaces/IReserveToken.sol index a37f970ef..f17757bfe 100644 --- a/packages/v3/contracts/token/interfaces/IReserveToken.sol +++ b/packages/v3/contracts/token/interfaces/IReserveToken.sol @@ -5,7 +5,7 @@ pragma solidity 0.7.6; * @dev This contract is used to represent reserve tokens, which are tokens that can either be regular ERC20 tokens or * native ETH (represented by the NATIVE_TOKEN_ADDRESS address) * - * Please note that this interface is intentionally doesn't inherit from IERC20, so that it'd be possible to effectively + * Please note that this interface doesn't intentionally inherit from IERC20, so that it'd be possible to effectively * override its balanceOf() function in the ReserveToken library */ interface IReserveToken { diff --git a/packages/v3/test/helpers/Constants.ts b/packages/v3/test/helpers/Constants.ts index ca7735eb3..09cd988cc 100644 --- a/packages/v3/test/helpers/Constants.ts +++ b/packages/v3/test/helpers/Constants.ts @@ -4,8 +4,9 @@ const { constants: { AddressZero, MaxUint256 } } = ethers; +export const STANDARD_DECIMALS = BigNumber.from(18); export const NATIVE_TOKEN_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'; -export const NATIVE_TOKEN_DECIMALS = BigNumber.from(18); +export const NATIVE_TOKEN_DECIMALS = STANDARD_DECIMALS; export const MAX_UINT256 = MaxUint256; export const ZERO_ADDRESS = AddressZero; export const INVALID_FRACTION = { n: BigNumber.from(0), d: BigNumber.from(0) }; diff --git a/packages/v3/test/helpers/Factory.ts b/packages/v3/test/helpers/Factory.ts index b6e94dc8b..2911b479a 100644 --- a/packages/v3/test/helpers/Factory.ts +++ b/packages/v3/test/helpers/Factory.ts @@ -11,6 +11,7 @@ import { TestPoolCollection } from '../../typechain'; import { roles } from './AccessControl'; +import { STANDARD_DECIMALS } from './Constants'; import { toAddress, TokenWithAddress } from './Utils'; import { TokenGovernance } from '@bancor/token-governance'; import { BaseContract, BigNumber, ContractFactory } from 'ethers'; @@ -20,7 +21,6 @@ import { isEqual } from 'lodash'; const { TokenGovernance: TokenGovernanceRoles, BancorVault: BancorVaultRoles } = roles; const TOTAL_SUPPLY = BigNumber.from(1_000_000_000).mul(BigNumber.from(10).pow(18)); -const DECIMALS = BigNumber.from(18); type CtorArgs = Parameters; type InitArgs = Parameters; @@ -106,14 +106,14 @@ export const createGovernedTokens = async () => { TOTAL_SUPPLY, 'BNT', 'BNT', - DECIMALS + STANDARD_DECIMALS ); const { token: govToken, tokenGovernance: govTokenGovernance } = await createGovernedToken( LegacyContracts.GovToken, TOTAL_SUPPLY, 'vBNT', 'vBNT', - DECIMALS + STANDARD_DECIMALS ); return { networkToken, networkTokenGovernance, govToken, govTokenGovernance }; diff --git a/packages/v3/test/helpers/Utils.ts b/packages/v3/test/helpers/Utils.ts index 7adeaec74..651d1e7ac 100644 --- a/packages/v3/test/helpers/Utils.ts +++ b/packages/v3/test/helpers/Utils.ts @@ -79,3 +79,32 @@ export const createWallet = async () => { return wallet; }; + +export const tokenErrorMessageExceedsAllowance = (symbol: string): string => { + switch (symbol) { + case 'BNT': + return ''; + + case 'TKN': + return 'ERC20: transfer amount exceeds allowance'; + + default: + throw new Error(`Unsupported type ${symbol}`); + } +}; + +export const tokenErrorMessageExceedsBalance = (symbol: string): string => { + switch (symbol) { + case 'BNT': + return 'SafeERC20: low-level call failed'; + + case 'ETH': + return ''; + + case 'TKN': + return 'ERC20: transfer amount exceeds balance'; + + default: + throw new Error(`Unsupported type ${symbol}`); + } +}; diff --git a/packages/v3/test/network/BancorNetwork.ts b/packages/v3/test/network/BancorNetwork.ts index 1cbe79c8e..0425251c3 100644 --- a/packages/v3/test/network/BancorNetwork.ts +++ b/packages/v3/test/network/BancorNetwork.ts @@ -18,7 +18,14 @@ import { permitSignature } from '../helpers/Permit'; import { shouldHaveGap } from '../helpers/Proxy'; import { latest } from '../helpers/Time'; import { toWei } from '../helpers/Types'; -import { createTokenBySymbol, getBalance, getTransactionCost, TokenWithAddress, createWallet } from '../helpers/Utils'; +import { + createTokenBySymbol, + getBalance, + getTransactionCost, + TokenWithAddress, + createWallet, + tokenErrorMessageExceedsAllowance +} from '../helpers/Utils'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; import { BigNumber, Wallet, Signer, utils, ContractTransaction } from 'ethers'; @@ -908,7 +915,7 @@ describe('BancorNetwork', () => { it('should revert when attempting to deposit without approving the network', async () => { await expect(deposit(amount)).to.be.revertedWith( - symbol === 'BNT' ? '' : 'ERC20: transfer amount exceeds allowance' + tokenErrorMessageExceedsAllowance(symbol) ); }); } diff --git a/packages/v3/test/network/BancorVault.ts b/packages/v3/test/network/BancorVault.ts index 32fa5312a..9225a3990 100644 --- a/packages/v3/test/network/BancorVault.ts +++ b/packages/v3/test/network/BancorVault.ts @@ -5,7 +5,7 @@ import { expectRole, roles } from '../helpers/AccessControl'; import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from '../helpers/Constants'; import { createSystem } from '../helpers/Factory'; import { shouldHaveGap } from '../helpers/Proxy'; -import { TokenWithAddress, getBalance, transfer } from '../helpers/Utils'; +import { TokenWithAddress, getBalance, transfer, tokenErrorMessageExceedsBalance } from '../helpers/Utils'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; import { BigNumber } from 'ethers'; @@ -100,13 +100,7 @@ describe('BancorVault', () => { await expect( vault.connect(sender).withdrawTokens(token.address, target.address, amountToWithdraw) - ).to.be.revertedWith( - symbol !== 'ETH' - ? symbol === 'BNT' - ? 'SafeERC20: low-level call failed' - : 'ERC20: transfer amount exceeds balance' - : '' - ); + ).to.be.revertedWith(tokenErrorMessageExceedsBalance(symbol)); }); it('should be able to withdraw any tokens', async () => { From 06e74c9cac36631dce673cf110059a0e0a9238e0 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Thu, 23 Sep 2021 17:33:19 +0200 Subject: [PATCH 162/164] typos --- packages/v3/test/helpers/Constants.ts | 4 ++-- packages/v3/test/helpers/Factory.ts | 6 +++--- packages/v3/test/helpers/Utils.ts | 4 ++-- packages/v3/test/network/BancorNetwork.ts | 4 ++-- packages/v3/test/network/BancorVault.ts | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/v3/test/helpers/Constants.ts b/packages/v3/test/helpers/Constants.ts index 09cd988cc..b1a268d41 100644 --- a/packages/v3/test/helpers/Constants.ts +++ b/packages/v3/test/helpers/Constants.ts @@ -4,9 +4,9 @@ const { constants: { AddressZero, MaxUint256 } } = ethers; -export const STANDARD_DECIMALS = BigNumber.from(18); +export const DEFAULT_DECIMALS = BigNumber.from(18); export const NATIVE_TOKEN_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'; -export const NATIVE_TOKEN_DECIMALS = STANDARD_DECIMALS; +export const NATIVE_TOKEN_DECIMALS = DEFAULT_DECIMALS; export const MAX_UINT256 = MaxUint256; export const ZERO_ADDRESS = AddressZero; export const INVALID_FRACTION = { n: BigNumber.from(0), d: BigNumber.from(0) }; diff --git a/packages/v3/test/helpers/Factory.ts b/packages/v3/test/helpers/Factory.ts index 2911b479a..864c05ea7 100644 --- a/packages/v3/test/helpers/Factory.ts +++ b/packages/v3/test/helpers/Factory.ts @@ -11,7 +11,7 @@ import { TestPoolCollection } from '../../typechain'; import { roles } from './AccessControl'; -import { STANDARD_DECIMALS } from './Constants'; +import { DEFAULT_DECIMALS } from './Constants'; import { toAddress, TokenWithAddress } from './Utils'; import { TokenGovernance } from '@bancor/token-governance'; import { BaseContract, BigNumber, ContractFactory } from 'ethers'; @@ -106,14 +106,14 @@ export const createGovernedTokens = async () => { TOTAL_SUPPLY, 'BNT', 'BNT', - STANDARD_DECIMALS + DEFAULT_DECIMALS ); const { token: govToken, tokenGovernance: govTokenGovernance } = await createGovernedToken( LegacyContracts.GovToken, TOTAL_SUPPLY, 'vBNT', 'vBNT', - STANDARD_DECIMALS + DEFAULT_DECIMALS ); return { networkToken, networkTokenGovernance, govToken, govTokenGovernance }; diff --git a/packages/v3/test/helpers/Utils.ts b/packages/v3/test/helpers/Utils.ts index 651d1e7ac..ca78bc21e 100644 --- a/packages/v3/test/helpers/Utils.ts +++ b/packages/v3/test/helpers/Utils.ts @@ -80,7 +80,7 @@ export const createWallet = async () => { return wallet; }; -export const tokenErrorMessageExceedsAllowance = (symbol: string): string => { +export const errorMessageTokenExceedsAllowance = (symbol: string): string => { switch (symbol) { case 'BNT': return ''; @@ -93,7 +93,7 @@ export const tokenErrorMessageExceedsAllowance = (symbol: string): string => { } }; -export const tokenErrorMessageExceedsBalance = (symbol: string): string => { +export const errorMessageTokenExceedsBalance = (symbol: string): string => { switch (symbol) { case 'BNT': return 'SafeERC20: low-level call failed'; diff --git a/packages/v3/test/network/BancorNetwork.ts b/packages/v3/test/network/BancorNetwork.ts index 0425251c3..42b88fc3f 100644 --- a/packages/v3/test/network/BancorNetwork.ts +++ b/packages/v3/test/network/BancorNetwork.ts @@ -24,7 +24,7 @@ import { getTransactionCost, TokenWithAddress, createWallet, - tokenErrorMessageExceedsAllowance + errorMessageTokenExceedsAllowance } from '../helpers/Utils'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; @@ -915,7 +915,7 @@ describe('BancorNetwork', () => { it('should revert when attempting to deposit without approving the network', async () => { await expect(deposit(amount)).to.be.revertedWith( - tokenErrorMessageExceedsAllowance(symbol) + errorMessageTokenExceedsAllowance(symbol) ); }); } diff --git a/packages/v3/test/network/BancorVault.ts b/packages/v3/test/network/BancorVault.ts index 9225a3990..17026b9f8 100644 --- a/packages/v3/test/network/BancorVault.ts +++ b/packages/v3/test/network/BancorVault.ts @@ -5,7 +5,7 @@ import { expectRole, roles } from '../helpers/AccessControl'; import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from '../helpers/Constants'; import { createSystem } from '../helpers/Factory'; import { shouldHaveGap } from '../helpers/Proxy'; -import { TokenWithAddress, getBalance, transfer, tokenErrorMessageExceedsBalance } from '../helpers/Utils'; +import { TokenWithAddress, getBalance, transfer, errorMessageTokenExceedsBalance } from '../helpers/Utils'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; import { BigNumber } from 'ethers'; @@ -100,7 +100,7 @@ describe('BancorVault', () => { await expect( vault.connect(sender).withdrawTokens(token.address, target.address, amountToWithdraw) - ).to.be.revertedWith(tokenErrorMessageExceedsBalance(symbol)); + ).to.be.revertedWith(errorMessageTokenExceedsBalance(symbol)); }); it('should be able to withdraw any tokens', async () => { From ad2a8403a9303613c944c1fb7d91cd306df0bb34 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Fri, 24 Sep 2021 02:07:56 +0200 Subject: [PATCH 163/164] add error case for vBNT --- packages/v3/test/helpers/Utils.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/v3/test/helpers/Utils.ts b/packages/v3/test/helpers/Utils.ts index ca78bc21e..32195920c 100644 --- a/packages/v3/test/helpers/Utils.ts +++ b/packages/v3/test/helpers/Utils.ts @@ -1,5 +1,5 @@ import Contracts from '../../components/Contracts'; -import { NetworkToken, GovToken } from '../../components/LegacyContracts'; +import { NetworkToken } from '../../components/LegacyContracts'; import { TestERC20Token } from '../../typechain'; import { NATIVE_TOKEN_ADDRESS } from './Constants'; import { toWei } from './Types'; @@ -54,11 +54,11 @@ export const transfer = async ( export const createTokenBySymbol = async ( symbol: string, - networkToken: TestERC20Token | NetworkToken | GovToken + networkToken: TestERC20Token | NetworkToken ): Promise => { switch (symbol) { case 'BNT': - return networkToken; + return networkToken as NetworkToken; case 'ETH': return { address: NATIVE_TOKEN_ADDRESS }; @@ -85,6 +85,9 @@ export const errorMessageTokenExceedsAllowance = (symbol: string): string => { case 'BNT': return ''; + case 'vBNT': + return 'ERR_UNDERFLOW'; + case 'TKN': return 'ERC20: transfer amount exceeds allowance'; @@ -98,6 +101,9 @@ export const errorMessageTokenExceedsBalance = (symbol: string): string => { case 'BNT': return 'SafeERC20: low-level call failed'; + case 'vBNT': + return 'ERR_UNDERFLOW'; + case 'ETH': return ''; From a79ecf59d72d44454968bde47da1c123d4bbcd50 Mon Sep 17 00:00:00 2001 From: Maxime Aubanel Date: Tue, 28 Sep 2021 13:35:48 +0200 Subject: [PATCH 164/164] typo --- packages/v3/contracts/token/interfaces/IReserveToken.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/v3/contracts/token/interfaces/IReserveToken.sol b/packages/v3/contracts/token/interfaces/IReserveToken.sol index f17757bfe..a0c993241 100644 --- a/packages/v3/contracts/token/interfaces/IReserveToken.sol +++ b/packages/v3/contracts/token/interfaces/IReserveToken.sol @@ -5,7 +5,7 @@ pragma solidity 0.7.6; * @dev This contract is used to represent reserve tokens, which are tokens that can either be regular ERC20 tokens or * native ETH (represented by the NATIVE_TOKEN_ADDRESS address) * - * Please note that this interface doesn't intentionally inherit from IERC20, so that it'd be possible to effectively + * Please note that this interface intentionally doesn't inherit from IERC20, so that it'd be possible to effectively * override its balanceOf() function in the ReserveToken library */ interface IReserveToken {