mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge pull request #104 from aave/fix/101-support-registry-config
fix: kovan deployment scripts
This commit is contained in:
commit
2aeb420b61
14
.github/workflows/node.js.yml
vendored
14
.github/workflows/node.js.yml
vendored
|
@ -30,6 +30,20 @@ jobs:
|
|||
run: npm ci
|
||||
- name: Test
|
||||
run: npm run ci:test
|
||||
- name: Dev deployment
|
||||
run: npm run aave:evm:dev:migration
|
||||
- name: Mainnet deployment at Mainnet fork
|
||||
run: npm run aave:fork:main
|
||||
env:
|
||||
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
|
||||
- name: Amm deployment at Mainnet fork
|
||||
run: npm run amm:fork:main
|
||||
env:
|
||||
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
|
||||
- name: Aave deployment at Kovan fork
|
||||
run: npm run aave:fork:kovan
|
||||
env:
|
||||
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
|
||||
# - name: Coverage
|
||||
# run: npm run coverage
|
||||
# - uses: codecov/codecov-action@v1
|
||||
|
|
|
@ -5,7 +5,12 @@ import { HardhatUserConfig } from 'hardhat/types';
|
|||
import { accounts } from './test-wallets.js';
|
||||
import { eEthereumNetwork, eNetwork, ePolygonNetwork, eXDaiNetwork } from './helpers/types';
|
||||
import { BUIDLEREVM_CHAINID, COVERAGE_CHAINID } from './helpers/buidler-constants';
|
||||
import { NETWORKS_RPC_URL, NETWORKS_DEFAULT_GAS } from './helper-hardhat-config';
|
||||
import {
|
||||
NETWORKS_RPC_URL,
|
||||
NETWORKS_DEFAULT_GAS,
|
||||
BLOCK_TO_FORK,
|
||||
buildForkConfig,
|
||||
} from './helper-hardhat-config';
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
|
@ -16,6 +21,7 @@ import 'hardhat-gas-reporter';
|
|||
import 'hardhat-typechain';
|
||||
import '@tenderly/hardhat-tenderly';
|
||||
import 'solidity-coverage';
|
||||
import { fork } from 'child_process';
|
||||
|
||||
const SKIP_LOAD = process.env.SKIP_LOAD === 'true';
|
||||
const DEFAULT_BLOCK_GAS_LIMIT = 12450000;
|
||||
|
@ -24,7 +30,6 @@ const HARDFORK = 'istanbul';
|
|||
const ETHERSCAN_KEY = process.env.ETHERSCAN_KEY || '';
|
||||
const MNEMONIC_PATH = "m/44'/60'/0'/0";
|
||||
const MNEMONIC = process.env.MNEMONIC || '';
|
||||
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
|
||||
|
||||
// Prevent to load scripts before compilation and typechain
|
||||
if (!SKIP_LOAD) {
|
||||
|
@ -57,12 +62,7 @@ const getCommonNetworkConfig = (networkName: eNetwork, networkId: number) => ({
|
|||
},
|
||||
});
|
||||
|
||||
const mainnetFork = MAINNET_FORK
|
||||
? {
|
||||
blockNumber: 12012081,
|
||||
url: NETWORKS_RPC_URL['main'],
|
||||
}
|
||||
: undefined;
|
||||
let forkMode;
|
||||
|
||||
const buidlerConfig: HardhatUserConfig = {
|
||||
solidity: {
|
||||
|
@ -111,7 +111,7 @@ const buidlerConfig: HardhatUserConfig = {
|
|||
privateKey: secretKey,
|
||||
balance,
|
||||
})),
|
||||
forking: mainnetFork,
|
||||
forking: buildForkConfig(),
|
||||
},
|
||||
buidlerevm_docker: {
|
||||
hardfork: 'berlin',
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// @ts-ignore
|
||||
import { HardhatNetworkForkingUserConfig, HardhatUserConfig } from 'hardhat/types';
|
||||
import {
|
||||
eEthereumNetwork,
|
||||
ePolygonNetwork,
|
||||
|
@ -11,9 +12,26 @@ require('dotenv').config();
|
|||
const INFURA_KEY = process.env.INFURA_KEY || '';
|
||||
const ALCHEMY_KEY = process.env.ALCHEMY_KEY || '';
|
||||
const TENDERLY_FORK_ID = process.env.TENDERLY_FORK_ID || '';
|
||||
const FORK = process.env.FORK || '';
|
||||
const FORK_BLOCK_NUMBER = process.env.FORK_BLOCK_NUMBER
|
||||
? parseInt(process.env.FORK_BLOCK_NUMBER)
|
||||
: 0;
|
||||
|
||||
const GWEI = 1000 * 1000 * 1000;
|
||||
|
||||
export const buildForkConfig = (): HardhatNetworkForkingUserConfig | undefined => {
|
||||
let forkMode;
|
||||
if (FORK) {
|
||||
forkMode = {
|
||||
url: NETWORKS_RPC_URL[FORK],
|
||||
};
|
||||
if (FORK_BLOCK_NUMBER || BLOCK_TO_FORK[FORK]) {
|
||||
forkMode.blockNumber = FORK_BLOCK_NUMBER || BLOCK_TO_FORK[FORK];
|
||||
}
|
||||
}
|
||||
return forkMode;
|
||||
};
|
||||
|
||||
export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
|
||||
[eEthereumNetwork.kovan]: ALCHEMY_KEY
|
||||
? `https://eth-kovan.alchemyapi.io/v2/${ALCHEMY_KEY}`
|
||||
|
@ -34,7 +52,7 @@ export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
|
|||
};
|
||||
|
||||
export const NETWORKS_DEFAULT_GAS: iParamsPerNetwork<number> = {
|
||||
[eEthereumNetwork.kovan]: 65 * GWEI,
|
||||
[eEthereumNetwork.kovan]: 1 * GWEI,
|
||||
[eEthereumNetwork.ropsten]: 65 * GWEI,
|
||||
[eEthereumNetwork.main]: 65 * GWEI,
|
||||
[eEthereumNetwork.coverage]: 65 * GWEI,
|
||||
|
@ -45,3 +63,16 @@ export const NETWORKS_DEFAULT_GAS: iParamsPerNetwork<number> = {
|
|||
[ePolygonNetwork.matic]: 1 * GWEI,
|
||||
[eXDaiNetwork.xdai]: 1 * GWEI,
|
||||
};
|
||||
|
||||
export const BLOCK_TO_FORK: iParamsPerNetwork<number | undefined> = {
|
||||
[eEthereumNetwork.main]: 12406069,
|
||||
[eEthereumNetwork.kovan]: undefined,
|
||||
[eEthereumNetwork.ropsten]: undefined,
|
||||
[eEthereumNetwork.coverage]: undefined,
|
||||
[eEthereumNetwork.hardhat]: undefined,
|
||||
[eEthereumNetwork.buidlerevm]: undefined,
|
||||
[eEthereumNetwork.tenderlyMain]: 12406069,
|
||||
[ePolygonNetwork.mumbai]: undefined,
|
||||
[ePolygonNetwork.matic]: undefined,
|
||||
[eXDaiNetwork.xdai]: undefined,
|
||||
};
|
||||
|
|
|
@ -61,7 +61,7 @@ export const getReservesConfigByPool = (pool: AavePools): iMultiPoolsAssets<IRes
|
|||
export const getGenesisPoolAdmin = async (
|
||||
config: ICommonConfiguration
|
||||
): Promise<tEthereumAddress> => {
|
||||
const currentNetwork = process.env.MAINNET_FORK === 'true' ? 'main' : DRE.network.name;
|
||||
const currentNetwork = process.env.FORK ? process.env.FORK : DRE.network.name;
|
||||
const targetAddress = getParamPerNetwork(config.PoolAdmin, <eNetwork>currentNetwork);
|
||||
if (targetAddress) {
|
||||
return targetAddress;
|
||||
|
@ -76,7 +76,7 @@ export const getGenesisPoolAdmin = async (
|
|||
export const getEmergencyAdmin = async (
|
||||
config: ICommonConfiguration
|
||||
): Promise<tEthereumAddress> => {
|
||||
const currentNetwork = process.env.MAINNET_FORK === 'true' ? 'main' : DRE.network.name;
|
||||
const currentNetwork = process.env.FORK ? process.env.FORK : DRE.network.name;
|
||||
const targetAddress = getParamPerNetwork(config.EmergencyAdmin, <eNetwork>currentNetwork);
|
||||
if (targetAddress) {
|
||||
return targetAddress;
|
||||
|
@ -91,7 +91,7 @@ export const getEmergencyAdmin = async (
|
|||
export const getTreasuryAddress = async (
|
||||
config: ICommonConfiguration
|
||||
): Promise<tEthereumAddress> => {
|
||||
const currentNetwork = process.env.MAINNET_FORK === 'true' ? 'main' : DRE.network.name;
|
||||
const currentNetwork = process.env.FORK ? process.env.FORK : DRE.network.name;
|
||||
return getParamPerNetwork(config.ReserveFactorTreasuryAddress, <eNetwork>currentNetwork);
|
||||
};
|
||||
|
||||
|
@ -101,7 +101,7 @@ export const getATokenDomainSeparatorPerNetwork = (
|
|||
): tEthereumAddress => getParamPerNetwork<tEthereumAddress>(config.ATokenDomainSeparator, network);
|
||||
|
||||
export const getWethAddress = async (config: ICommonConfiguration) => {
|
||||
const currentNetwork = process.env.MAINNET_FORK === 'true' ? 'main' : DRE.network.name;
|
||||
const currentNetwork = process.env.FORK ? process.env.FORK : DRE.network.name;
|
||||
const wethAddress = getParamPerNetwork(config.WETH, <eNetwork>currentNetwork);
|
||||
if (wethAddress) {
|
||||
return wethAddress;
|
||||
|
@ -133,8 +133,7 @@ export const getLendingRateOracles = (poolConfig: ICommonConfiguration) => {
|
|||
ReserveAssets,
|
||||
} = poolConfig;
|
||||
|
||||
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
|
||||
const network = MAINNET_FORK ? 'main' : DRE.network.name;
|
||||
const network = process.env.FORK ? process.env.FORK : DRE.network.name;
|
||||
return filterMapBy(LendingRateOracleRatesCommon, (key) =>
|
||||
Object.keys(ReserveAssets[network]).includes(key)
|
||||
);
|
||||
|
|
|
@ -31,8 +31,8 @@ export type MockTokenMap = { [symbol: string]: MintableERC20 };
|
|||
|
||||
export const registerContractInJsonDb = async (contractId: string, contractInstance: Contract) => {
|
||||
const currentNetwork = DRE.network.name;
|
||||
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
|
||||
if (MAINNET_FORK || (currentNetwork !== 'hardhat' && !currentNetwork.includes('coverage'))) {
|
||||
const FORK = process.env.FORK;
|
||||
if (FORK || (currentNetwork !== 'hardhat' && !currentNetwork.includes('coverage'))) {
|
||||
console.log(`*** ${contractId} ***\n`);
|
||||
console.log(`Network: ${currentNetwork}`);
|
||||
console.log(`tx: ${contractInstance.deployTransaction.hash}`);
|
||||
|
@ -144,9 +144,8 @@ export const getParamPerNetwork = <T>(param: iParamsPerNetwork<T>, network: eNet
|
|||
} = param as iEthereumParamsPerNetwork<T>;
|
||||
const { matic, mumbai } = param as iPolygonParamsPerNetwork<T>;
|
||||
const { xdai } = param as iXDaiParamsPerNetwork<T>;
|
||||
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
|
||||
if (MAINNET_FORK) {
|
||||
return main;
|
||||
if (process.env.FORK) {
|
||||
return param[process.env.FORK as eNetwork] as T;
|
||||
}
|
||||
|
||||
switch (network) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import {
|
|||
getAaveProtocolDataProvider,
|
||||
getAToken,
|
||||
getATokensAndRatesHelper,
|
||||
getFirstSigner,
|
||||
getLendingPoolAddressesProvider,
|
||||
getLendingPoolConfiguratorProxy,
|
||||
getStableAndVariableTokensHelper,
|
||||
|
@ -32,6 +33,7 @@ import {
|
|||
import { ZERO_ADDRESS } from './constants';
|
||||
import { isZeroAddress } from 'ethereumjs-util';
|
||||
import { DefaultReserveInterestRateStrategy, DelegationAwareAToken } from '../types';
|
||||
import { config } from 'process';
|
||||
|
||||
export const chooseATokenDeployment = (id: eContractid) => {
|
||||
switch (id) {
|
||||
|
@ -144,6 +146,10 @@ export const initReservesByHelper = async (
|
|||
) as [string, IReserveParams][];
|
||||
|
||||
for (let [symbol, params] of reserves) {
|
||||
if (!tokenAddresses[symbol]) {
|
||||
console.log(`- Skipping init of ${symbol} due token address is not set at markets config`);
|
||||
continue;
|
||||
}
|
||||
const { strategy, aTokenImpl, reserveDecimals } = params;
|
||||
const {
|
||||
optimalUtilizationRate,
|
||||
|
@ -293,6 +299,12 @@ export const configureReservesByHelper = async (
|
|||
borrowingEnabled,
|
||||
},
|
||||
] of Object.entries(reservesParams) as [string, IReserveParams][]) {
|
||||
if (!tokenAddresses[assetSymbol]) {
|
||||
console.log(
|
||||
`- Skipping init of ${assetSymbol} due token address is not set at markets config`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (baseLTVAsCollateral === '-1') continue;
|
||||
|
||||
const assetAddressIndex = Object.keys(tokenAddresses).findIndex(
|
||||
|
|
|
@ -72,9 +72,6 @@ export const setInitialAssetPricesInOracle = async (
|
|||
priceOracleInstance: PriceOracle
|
||||
) => {
|
||||
for (const [assetSymbol, price] of Object.entries(prices) as [string, string][]) {
|
||||
|
||||
console.log("Trying for ", assetsAddresses, assetSymbol);
|
||||
|
||||
const assetAddressIndex = Object.keys(assetsAddresses).findIndex(
|
||||
(value) => value === assetSymbol
|
||||
);
|
||||
|
|
|
@ -93,6 +93,9 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
UNI: {
|
||||
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
|
||||
},
|
||||
ENJ: {
|
||||
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
|
||||
},
|
||||
BUSD: {
|
||||
borrowRate: oneRay.multipliedBy(0.05).toFixed(),
|
||||
},
|
||||
|
@ -135,11 +138,11 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
ProviderRegistryOwner: {
|
||||
[eEthereumNetwork.kovan]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '0xbd723fc4f1d737dcfc48a07fe7336766d34cad5f',
|
||||
[eEthereumNetwork.main]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xbd723fc4f1d737dcfc48a07fe7336766d34cad5f',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
},
|
||||
LendingRateOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -181,7 +184,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.kovan]: '0xf99b8E67a0E044734B01EC4586D1c88C9a869718',
|
||||
[eEthereumNetwork.kovan]: '',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
|
@ -282,6 +285,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
YFI: '0x7c5d4F8345e66f68099581Db340cd65B078C41f4',
|
||||
ZRX: '0x2Da4983a622a8498bb1a21FaE9D8F6C664939962',
|
||||
USD: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419',
|
||||
xSUSHI: '0x9b26214bEC078E68a394AaEbfbffF406Ce14893F',
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
AAVE: '0x6Df09E975c830ECae5bd4eD9d90f3A95a4f88012',
|
||||
|
@ -304,6 +308,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
YFI: '0x7c5d4F8345e66f68099581Db340cd65B078C41f4',
|
||||
ZRX: '0x2Da4983a622a8498bb1a21FaE9D8F6C664939962',
|
||||
USD: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419',
|
||||
xSUSHI: '0x9b26214bEC078E68a394AaEbfbffF406Ce14893F',
|
||||
},
|
||||
},
|
||||
ReserveAssets: {
|
||||
|
|
|
@ -23,6 +23,7 @@ import {
|
|||
strategyWETH,
|
||||
strategyYFI,
|
||||
strategyXSUSHI,
|
||||
strategyENJ,
|
||||
} from './reservesConfigs';
|
||||
|
||||
// ----------------
|
||||
|
@ -38,7 +39,7 @@ export const AaveConfig: IAaveConfiguration = {
|
|||
BAT: strategyBAT,
|
||||
BUSD: strategyBUSD,
|
||||
DAI: strategyDAI,
|
||||
ENJ: strategyREN,
|
||||
ENJ: strategyENJ,
|
||||
KNC: strategyKNC,
|
||||
LINK: strategyLINK,
|
||||
MANA: strategyMANA,
|
||||
|
|
|
@ -139,14 +139,13 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.tenderlyMain]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
|
||||
},
|
||||
ProviderRegistryOwner: {
|
||||
// DEPLOYED WITH CORRECT ADDRESS
|
||||
[eEthereumNetwork.kovan]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '0xbd723fc4f1d737dcfc48a07fe7336766d34cad5f',
|
||||
[eEthereumNetwork.main]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xbd723fc4f1d737dcfc48a07fe7336766d34cad5f',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
},
|
||||
LendingRateOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
|
264
package-lock.json
generated
264
package-lock.json
generated
|
@ -3123,6 +3123,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
|
@ -5534,7 +5535,8 @@
|
|||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true
|
||||
},
|
||||
"functional-red-black-tree": {
|
||||
"version": "1.0.1",
|
||||
|
@ -6373,6 +6375,36 @@
|
|||
"@ethersproject/strings": ">=5.0.0-beta.130"
|
||||
}
|
||||
},
|
||||
"@ethersproject/abstract-provider": {
|
||||
"version": "5.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.8.tgz",
|
||||
"integrity": "sha512-fqJXkewcGdi8LogKMgRyzc/Ls2js07yor7+g9KfPs09uPOcQLg7cc34JN+lk34HH9gg2HU0DIA5797ZR8znkfw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@ethersproject/bignumber": "^5.0.13",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"@ethersproject/networks": "^5.0.7",
|
||||
"@ethersproject/properties": "^5.0.7",
|
||||
"@ethersproject/transactions": "^5.0.9",
|
||||
"@ethersproject/web": "^5.0.12"
|
||||
}
|
||||
},
|
||||
"@ethersproject/abstract-signer": {
|
||||
"version": "5.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.10.tgz",
|
||||
"integrity": "sha512-irx7kH7FDAeW7QChDPW19WsxqeB1d3XLyOLSXm0bfPqL1SS07LXWltBJUBUxqC03ORpAOcM3JQj57DU8JnVY2g==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@ethersproject/abstract-provider": "^5.0.8",
|
||||
"@ethersproject/bignumber": "^5.0.13",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"@ethersproject/properties": "^5.0.7"
|
||||
}
|
||||
},
|
||||
"@ethersproject/address": {
|
||||
"version": "5.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.9.tgz",
|
||||
|
@ -6387,6 +6419,16 @@
|
|||
"@ethersproject/rlp": "^5.0.7"
|
||||
}
|
||||
},
|
||||
"@ethersproject/base64": {
|
||||
"version": "5.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.7.tgz",
|
||||
"integrity": "sha512-S5oh5DVfCo06xwJXT8fQC68mvJfgScTl2AXvbYMsHNfIBTDb084Wx4iA9MNlEReOv6HulkS+gyrUM/j3514rSw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@ethersproject/bytes": "^5.0.9"
|
||||
}
|
||||
},
|
||||
"@ethersproject/bignumber": {
|
||||
"version": "5.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.13.tgz",
|
||||
|
@ -6454,6 +6496,16 @@
|
|||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"@ethersproject/networks": {
|
||||
"version": "5.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.7.tgz",
|
||||
"integrity": "sha512-dI14QATndIcUgcCBL1c5vUr/YsI5cCHLN81rF7PU+yS7Xgp2/Rzbr9+YqpC6NBXHFUASjh6GpKqsVMpufAL0BQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@ethersproject/logger": "^5.0.8"
|
||||
}
|
||||
},
|
||||
"@ethersproject/properties": {
|
||||
"version": "5.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.7.tgz",
|
||||
|
@ -6518,6 +6570,20 @@
|
|||
"@ethersproject/signing-key": "^5.0.8"
|
||||
}
|
||||
},
|
||||
"@ethersproject/web": {
|
||||
"version": "5.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.12.tgz",
|
||||
"integrity": "sha512-gVxS5iW0bgidZ76kr7LsTxj4uzN5XpCLzvZrLp8TP+4YgxHfCeetFyQkRPgBEAJdNrexdSBayvyJvzGvOq0O8g==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@ethersproject/base64": "^5.0.7",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"@ethersproject/properties": "^5.0.7",
|
||||
"@ethersproject/strings": "^5.0.8"
|
||||
}
|
||||
},
|
||||
"@sindresorhus/is": {
|
||||
"version": "0.14.0",
|
||||
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
|
||||
|
@ -7830,14 +7896,6 @@
|
|||
"dev": true,
|
||||
"requires": {
|
||||
"node-gyp-build": "^4.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-gyp-build": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz",
|
||||
"integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"bytes": {
|
||||
|
@ -7938,6 +7996,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"call-bind": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001174",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001174.tgz",
|
||||
|
@ -8456,6 +8524,7 @@
|
|||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
|
||||
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"object-keys": "^1.0.12"
|
||||
}
|
||||
|
@ -8681,6 +8750,7 @@
|
|||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
|
||||
"integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-callable": "^1.1.4",
|
||||
"is-date-object": "^1.0.1",
|
||||
|
@ -10850,7 +10920,8 @@
|
|||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true
|
||||
},
|
||||
"functional-red-black-tree": {
|
||||
"version": "1.0.1",
|
||||
|
@ -10858,6 +10929,17 @@
|
|||
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
|
||||
"dev": true
|
||||
},
|
||||
"get-intrinsic": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz",
|
||||
"integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
|
||||
|
@ -10965,6 +11047,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
|
@ -11002,7 +11085,8 @@
|
|||
"has-symbols": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
|
||||
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
|
||||
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
|
||||
"dev": true
|
||||
},
|
||||
"has-to-string-tag-x": {
|
||||
"version": "1.4.1",
|
||||
|
@ -11275,7 +11359,8 @@
|
|||
"is-callable": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
|
||||
"integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA=="
|
||||
"integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==",
|
||||
"dev": true
|
||||
},
|
||||
"is-ci": {
|
||||
"version": "2.0.0",
|
||||
|
@ -11298,7 +11383,8 @@
|
|||
"is-date-object": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
|
||||
"integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g=="
|
||||
"integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
|
||||
"dev": true
|
||||
},
|
||||
"is-descriptor": {
|
||||
"version": "1.0.2",
|
||||
|
@ -11347,7 +11433,8 @@
|
|||
"is-negative-zero": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
|
||||
"integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w=="
|
||||
"integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==",
|
||||
"dev": true
|
||||
},
|
||||
"is-object": {
|
||||
"version": "1.0.2",
|
||||
|
@ -11376,6 +11463,7 @@
|
|||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz",
|
||||
"integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-symbols": "^1.0.1"
|
||||
}
|
||||
|
@ -11391,6 +11479,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
|
||||
"integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-symbols": "^1.0.1"
|
||||
}
|
||||
|
@ -12233,7 +12322,8 @@
|
|||
"object-inspect": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
|
||||
"integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw=="
|
||||
"integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==",
|
||||
"dev": true
|
||||
},
|
||||
"object-is": {
|
||||
"version": "1.1.4",
|
||||
|
@ -12243,33 +12333,13 @@
|
|||
"requires": {
|
||||
"call-bind": "^1.0.0",
|
||||
"define-properties": "^1.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"es-abstract": {
|
||||
"version": "1.18.0-next.1",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
|
||||
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
|
||||
"requires": {
|
||||
"es-to-primitive": "^1.2.1",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.1",
|
||||
"is-callable": "^1.2.2",
|
||||
"is-negative-zero": "^2.0.0",
|
||||
"is-regex": "^1.1.1",
|
||||
"object-inspect": "^1.8.0",
|
||||
"object-keys": "^1.1.1",
|
||||
"object.assign": "^4.1.1",
|
||||
"string.prototype.trimend": "^1.0.1",
|
||||
"string.prototype.trimstart": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"object-keys": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||
"dev": true
|
||||
},
|
||||
"object-visit": {
|
||||
"version": "1.0.1",
|
||||
|
@ -12284,32 +12354,12 @@
|
|||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
|
||||
"integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"call-bind": "^1.0.0",
|
||||
"define-properties": "^1.1.3",
|
||||
"has-symbols": "^1.0.1",
|
||||
"object-keys": "^1.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"es-abstract": {
|
||||
"version": "1.18.0-next.1",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
|
||||
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
|
||||
"requires": {
|
||||
"es-to-primitive": "^1.2.1",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.1",
|
||||
"is-callable": "^1.2.2",
|
||||
"is-negative-zero": "^2.0.0",
|
||||
"is-regex": "^1.1.1",
|
||||
"object-inspect": "^1.8.0",
|
||||
"object-keys": "^1.1.1",
|
||||
"object.assign": "^4.1.1",
|
||||
"string.prototype.trimend": "^1.0.1",
|
||||
"string.prototype.trimstart": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"object.getownpropertydescriptors": {
|
||||
|
@ -12870,47 +12920,16 @@
|
|||
"unbox-primitive": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"has-symbols": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
|
||||
"dev": true
|
||||
},
|
||||
"is-callable": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
|
||||
"integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-regex": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
|
||||
"integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
|
||||
"get-intrinsic": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
|
||||
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"call-bind": "^1.0.2",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"string.prototype.trimend": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
|
||||
"integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.1.3"
|
||||
}
|
||||
},
|
||||
"string.prototype.trimstart": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
|
||||
"integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.1.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12999,15 +13018,6 @@
|
|||
"uuid": "^3.3.2"
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.17.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
|
||||
"integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"resolve-url": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
|
||||
|
@ -13666,34 +13676,13 @@
|
|||
"call-bind": "^1.0.0",
|
||||
"define-properties": "^1.1.3",
|
||||
"es-abstract": "^1.18.0-next.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"es-abstract": {
|
||||
"version": "1.18.0-next.1",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
|
||||
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"es-to-primitive": "^1.2.1",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.1",
|
||||
"is-callable": "^1.2.2",
|
||||
"is-negative-zero": "^2.0.0",
|
||||
"is-regex": "^1.1.1",
|
||||
"object-inspect": "^1.8.0",
|
||||
"object-keys": "^1.1.1",
|
||||
"object.assign": "^4.1.1",
|
||||
"string.prototype.trimend": "^1.0.1",
|
||||
"string.prototype.trimstart": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"string.prototype.trimend": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
|
||||
"integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"call-bind": "^1.0.0",
|
||||
"define-properties": "^1.1.3"
|
||||
|
@ -13703,6 +13692,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
|
||||
"integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"call-bind": "^1.0.0",
|
||||
"define-properties": "^1.1.3"
|
||||
|
@ -13889,6 +13879,15 @@
|
|||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
|
||||
"integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
|
||||
"dev": true
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.17.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
|
||||
"integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -14250,14 +14249,6 @@
|
|||
"dev": true,
|
||||
"requires": {
|
||||
"node-gyp-build": "^4.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-gyp-build": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz",
|
||||
"integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"utf8": {
|
||||
|
@ -15236,6 +15227,7 @@
|
|||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
|
||||
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
|
@ -15792,6 +15784,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
|
@ -15817,7 +15810,8 @@
|
|||
"has-symbols": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
|
||||
"dev": true
|
||||
},
|
||||
"has-to-string-tag-x": {
|
||||
"version": "1.4.1",
|
||||
|
|
41
package.json
41
package.json
|
@ -17,28 +17,47 @@
|
|||
"hardhat:mumbai": "hardhat --network mumbai",
|
||||
"hardhat:matic": "hardhat --network matic",
|
||||
"compile": "SKIP_LOAD=true hardhat compile",
|
||||
"console:fork": "MAINNET_FORK=true hardhat console",
|
||||
"console:fork": "FORK=main hardhat console",
|
||||
"test": "npm run compile && TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-aave/*.spec.ts",
|
||||
"test-amm": "npm run compile && TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-amm/*.spec.ts",
|
||||
"test-amm-scenarios": "npm run compile && TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-amm/__setup.spec.ts test-suites/test-amm/scenario.spec.ts",
|
||||
"test-scenarios": "npm run compile && npx hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/scenario.spec.ts",
|
||||
"test-subgraph:scenarios": "npm run compile && hardhat --network hardhatevm_docker test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/subgraph-scenarios.spec.ts",
|
||||
"test:main:check-list": "npm run compile && MAINNET_FORK=true TS_NODE_TRANSPILE_ONLY=1 hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/mainnet/check-list.spec.ts",
|
||||
"test:main:check-list": "npm run compile && FORK=main TS_NODE_TRANSPILE_ONLY=1 hardhat test test-suites/test-aave/__setup.spec.ts test-suites/test-aave/mainnet/check-list.spec.ts",
|
||||
"dev:coverage": "buidler compile --force && buidler coverage --network coverage",
|
||||
"aave:evm:dev:migration": "npm run compile && hardhat aave:dev",
|
||||
"aave:docker:full:migration": "npm run compile && npm run hardhat:docker -- aave:mainnet",
|
||||
"aave:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- aave:mainnet --verify",
|
||||
"matic:mumbai:full:migration": "npm run compile && npm run hardhat:mumbai sidechain:mainnet -- --pool Matic",
|
||||
"matic:matic:full:migration": "npm run compile && npm run hardhat:matic sidechain:mainnet -- --pool Matic",
|
||||
"amm:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- amm:mainnet --verify",
|
||||
"aave:docker:full:migration": "npm run compile && npm run hardhat:docker -- aave:mainnet --skip-registry",
|
||||
"aave:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- aave:mainnet --skip-registry",
|
||||
"matic:mumbai:full:migration": "npm run compile && npm run hardhat:mumbai sidechain:mainnet -- --pool Matic --skip-registry",
|
||||
"matic:matic:full:migration": "npm run compile && npm run hardhat:matic sidechain:mainnet -- --pool Matic --skip-registry",
|
||||
"amm:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- amm:mainnet --skip-registry",
|
||||
"aave:docker:full:migration:add-registry": "npm run compile && npm run hardhat:docker -- aave:mainnet",
|
||||
"aave:kovan:full:migration:add-registry": "npm run compile && npm run hardhat:kovan -- aave:mainnet",
|
||||
"matic:mumbai:full:migration:add-registry": "npm run compile && npm run hardhat:mumbai sidechain:mainnet -- --pool Matic",
|
||||
"matic:matic:full:migration:add-registry": "npm run compile && npm run hardhat:matic sidechain:mainnet -- --pool Matic",
|
||||
"amm:kovan:full:migration:add-registry": "npm run compile && npm run hardhat:kovan -- amm:mainnet",
|
||||
"aave:docker:add-market-to-registry-from-config": "npm run compile && npm run hardhat:docker -- add-market-to-registry --pool Aave",
|
||||
"aave:kovan:add-market-to-registry-from-config": "npm run compile && npm run hardhat:kovan -- add-market-to-registry --pool Aave",
|
||||
"matic:mumbai:add-market-to-registry-from-config": "npm run compile && npm run hardhat:mumbai add-market-to-registry --pool Matic",
|
||||
"amm:kovan:add-market-to-registry-from-config": "npm run compile && npm run hardhat:kovan -- add-market-to-registry --pool Amm",
|
||||
"matic:matic:add-market-to-registry-from-config": "npm run compile && npm run hardhat:matic add-market-to-registry --pool Matic",
|
||||
"aave:main:add-market-to-registry-from-config": "npm run compile && npm run hardhat:main -- add-market-to-registry --pool Aave",
|
||||
"aave:docker:add-market-to-new-registry": "npm run compile && npm run hardhat:docker -- add-market-to-registry --pool Aave --deploy-registry",
|
||||
"aave:kovan:add-market-to-new-registry": "npm run compile && npm run hardhat:kovan -- add-market-to-registry --pool Aave --verify --deploy-registry",
|
||||
"matic:mumbai:add-market-to-new-registry": "npm run compile && npm run hardhat:mumbai add-market-to-registry --pool Matic --verify --deploy-registry",
|
||||
"amm:kovan:add-market-to-new-registry": "npm run compile && npm run hardhat:kovan -- add-market-to-registry --pool Amm --verify --deploy-registry",
|
||||
"matic:matic:add-market-to-new-registry": "npm run compile && npm run hardhat:matic -- add-market-to-registry --pool Matic --verify --deploy-registry",
|
||||
"aave:main:add-market-to-new-registry": "npm run compile && npm run hardhat:matic -- add-market-to-registry --pool Matic --verify --deploy-registry",
|
||||
"aave:kovan:full:initialize": "npm run hardhat:kovan -- full:initialize-lending-pool --verify --pool Aave",
|
||||
"aave:ropsten:full:migration": "npm run compile && npm run hardhat:ropsten -- aave:mainnet --verify",
|
||||
"aave:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly-main -- aave:mainnet",
|
||||
"aave:fork:main": "npm run compile && MAINNET_FORK=true hardhat aave:mainnet",
|
||||
"amm:fork:main": "npm run compile && MAINNET_FORK=true hardhat amm:mainnet",
|
||||
"aave:fork:main": "npm run compile && FORK=main hardhat aave:mainnet",
|
||||
"aave:fork:kovan": "npm run compile && FORK=kovan hardhat aave:mainnet",
|
||||
"amm:fork:main": "npm run compile && FORK=main hardhat amm:mainnet",
|
||||
"amm:fork:kovan": "npm run compile && FORK=kovan hardhat amm:mainnet",
|
||||
"amm:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly-main -- amm:mainnet",
|
||||
"aave:main:full:migration": "npm run compile && npm run hardhat:main -- aave:mainnet --verify",
|
||||
"aave:main:full:initialize": "npm run compile && MAINNET_FORK=true full:initialize-tokens --pool Aave",
|
||||
"aave:main:full:initialize": "npm run compile && FORK=main full:initialize-tokens --pool Aave",
|
||||
"amm:main:full:migration": "npm run compile && npm run hardhat:main -- amm:mainnet --verify",
|
||||
"prettier:check": "npx prettier -c 'tasks/**/*.ts' 'contracts/**/*.sol' 'helpers/**/*.ts' 'test-suites/test-aave/**/*.ts'",
|
||||
"prettier:write": "prettier --write 'tasks/**/*.ts' 'contracts/**/*.sol' 'helpers/**/*.ts' 'test-suites/test-aave/**/*.ts'",
|
||||
|
@ -65,7 +84,7 @@
|
|||
"kovan:verify:tokens": "npm run hardhat:kovan verify:tokens -- --pool Aave",
|
||||
"ropsten:verify:tokens": "npm run hardhat:ropsten verify:tokens -- --pool Aave",
|
||||
"mainnet:verify:tokens": "npm run hardhat:main verify:tokens -- --pool Aave",
|
||||
"print-config:fork:mainnet": "MAINNET_FORK=true hardhat print-config:fork",
|
||||
"print-config:fork:mainnet": "FORK=main hardhat print-config:fork",
|
||||
"print-config:kovan": "hardhat --network kovan print-config --pool Aave --data-provider 0xA1901785c29cBd48bfA74e46b67C736b26054fa4",
|
||||
"external:deploy-assets-kovan": "npm run compile && hardhat --network kovan external:deploy-new-asset --symbol ${SYMBOL} --verify",
|
||||
"external:deploy-assets-main": "npm run compile && hardhat --network main external:deploy-new-asset --symbol ${SYMBOL} --verify",
|
||||
|
|
96
tasks/deployments/add-market-to-registry.ts
Normal file
96
tasks/deployments/add-market-to-registry.ts
Normal file
|
@ -0,0 +1,96 @@
|
|||
import { task } from 'hardhat/config';
|
||||
import { getParamPerNetwork } from '../../helpers/contracts-helpers';
|
||||
import { waitForTx } from '../../helpers/misc-utils';
|
||||
import { ConfigNames, loadPoolConfig } from '../../helpers/configuration';
|
||||
import { eNetwork } from '../../helpers/types';
|
||||
import {
|
||||
getFirstSigner,
|
||||
getLendingPoolAddressesProvider,
|
||||
getLendingPoolAddressesProviderRegistry,
|
||||
} from '../../helpers/contracts-getters';
|
||||
import { isAddress, parseEther } from 'ethers/lib/utils';
|
||||
import { isZeroAddress } from 'ethereumjs-util';
|
||||
import { Signer } from 'ethers';
|
||||
import { exit } from 'process';
|
||||
|
||||
task('add-market-to-registry', 'Adds address provider to registry')
|
||||
.addParam('pool', `Pool name to retrieve configuration, supported: ${Object.values(ConfigNames)}`)
|
||||
.addOptionalParam('addressesProvider', `Address of LendingPoolAddressProvider`)
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.addFlag('deployRegistry', 'Deploy a new address provider registry')
|
||||
.setAction(async ({ verify, addressesProvider, pool, deployRegistry }, DRE) => {
|
||||
await DRE.run('set-DRE');
|
||||
let signer: Signer;
|
||||
const network = <eNetwork>DRE.network.name;
|
||||
const poolConfig = loadPoolConfig(pool);
|
||||
const { ProviderId } = poolConfig;
|
||||
|
||||
let providerRegistryAddress = getParamPerNetwork(poolConfig.ProviderRegistry, network);
|
||||
let providerRegistryOwner = getParamPerNetwork(poolConfig.ProviderRegistryOwner, network);
|
||||
const currentSignerAddress = await (
|
||||
await (await getFirstSigner()).getAddress()
|
||||
).toLocaleLowerCase();
|
||||
let deployed = false;
|
||||
|
||||
if (
|
||||
deployRegistry ||
|
||||
!providerRegistryAddress ||
|
||||
!isAddress(providerRegistryAddress) ||
|
||||
isZeroAddress(providerRegistryAddress)
|
||||
) {
|
||||
console.log('- Deploying a new Address Providers Registry:');
|
||||
|
||||
await DRE.run('full:deploy-address-provider-registry', { verify });
|
||||
|
||||
providerRegistryAddress = (await getLendingPoolAddressesProviderRegistry()).address;
|
||||
providerRegistryOwner = await (await getFirstSigner()).getAddress();
|
||||
deployed = true;
|
||||
}
|
||||
|
||||
if (
|
||||
!providerRegistryOwner ||
|
||||
!isAddress(providerRegistryOwner) ||
|
||||
isZeroAddress(providerRegistryOwner)
|
||||
) {
|
||||
throw Error('config.ProviderRegistryOwner is missing or is not an address.');
|
||||
}
|
||||
|
||||
// Checks if deployer address is registry owner
|
||||
if (process.env.FORK) {
|
||||
await DRE.network.provider.request({
|
||||
method: 'hardhat_impersonateAccount',
|
||||
params: [providerRegistryOwner],
|
||||
});
|
||||
signer = DRE.ethers.provider.getSigner(providerRegistryOwner);
|
||||
const firstAccount = await getFirstSigner();
|
||||
await firstAccount.sendTransaction({ value: parseEther('10'), to: providerRegistryOwner });
|
||||
} else if (
|
||||
!deployed &&
|
||||
providerRegistryOwner.toLocaleLowerCase() !== currentSignerAddress.toLocaleLowerCase()
|
||||
) {
|
||||
console.error('ProviderRegistryOwner config does not match current signer:');
|
||||
console.error('Expected:', providerRegistryOwner);
|
||||
console.error('Current:', currentSignerAddress);
|
||||
exit(2);
|
||||
} else {
|
||||
signer = DRE.ethers.provider.getSigner(providerRegistryOwner);
|
||||
}
|
||||
|
||||
// 1. Address Provider Registry instance
|
||||
const addressesProviderRegistry = (
|
||||
await getLendingPoolAddressesProviderRegistry(providerRegistryAddress)
|
||||
).connect(signer);
|
||||
|
||||
const addressesProviderInstance = await getLendingPoolAddressesProvider(addressesProvider);
|
||||
|
||||
// 2. Set the provider at the Registry
|
||||
await waitForTx(
|
||||
await addressesProviderRegistry.registerAddressesProvider(
|
||||
addressesProviderInstance.address,
|
||||
ProviderId
|
||||
)
|
||||
);
|
||||
console.log(
|
||||
`Added LendingPoolAddressesProvider with address "${addressesProviderInstance.address}" to registry located at ${addressesProviderRegistry.address}`
|
||||
);
|
||||
});
|
|
@ -18,6 +18,7 @@ task(
|
|||
|
||||
const addressesProvider = await deployLendingPoolAddressesProvider(AaveConfig.MarketId, verify);
|
||||
await waitForTx(await addressesProvider.setPoolAdmin(admin));
|
||||
await waitForTx(await addressesProvider.setEmergencyAdmin(admin));
|
||||
|
||||
const addressesProviderRegistry = await deployLendingPoolAddressesProviderRegistry(verify);
|
||||
await waitForTx(
|
||||
|
|
|
@ -4,7 +4,6 @@ import {
|
|||
deployMockFlashLoanReceiver,
|
||||
deployWalletBalancerProvider,
|
||||
deployAaveProtocolDataProvider,
|
||||
deployWETHGateway,
|
||||
authorizeWETHGateway,
|
||||
} from '../../helpers/contracts-deployments';
|
||||
import { getParamPerNetwork } from '../../helpers/contracts-helpers';
|
||||
|
@ -13,18 +12,18 @@ import {
|
|||
ConfigNames,
|
||||
getReservesConfigByPool,
|
||||
getTreasuryAddress,
|
||||
getWethAddress,
|
||||
loadPoolConfig,
|
||||
} from '../../helpers/configuration';
|
||||
|
||||
import { tEthereumAddress, AavePools, eContractid } from '../../helpers/types';
|
||||
import { waitForTx, filterMapBy } from '../../helpers/misc-utils';
|
||||
import { waitForTx, filterMapBy, notFalsyOrZeroAddress } from '../../helpers/misc-utils';
|
||||
import { configureReservesByHelper, initReservesByHelper } from '../../helpers/init-helpers';
|
||||
import { getAllTokenAddresses } from '../../helpers/mock-helpers';
|
||||
import { ZERO_ADDRESS } from '../../helpers/constants';
|
||||
import {
|
||||
getAllMockedTokens,
|
||||
getLendingPoolAddressesProvider,
|
||||
getWETHGateway,
|
||||
} from '../../helpers/contracts-getters';
|
||||
import { insertContractAddressInDb } from '../../helpers/contracts-helpers';
|
||||
|
||||
|
@ -92,6 +91,10 @@ task('dev:initialize-lending-pool', 'Initialize lending pool configuration.')
|
|||
await insertContractAddressInDb(eContractid.AaveProtocolDataProvider, testHelpers.address);
|
||||
|
||||
const lendingPoolAddress = await addressesProvider.getLendingPool();
|
||||
const gateWay = await getParamPerNetwork(WethGateway, network);
|
||||
await authorizeWETHGateway(gateWay, lendingPoolAddress);
|
||||
|
||||
let gateway = getParamPerNetwork(WethGateway, network);
|
||||
if (!notFalsyOrZeroAddress(gateway)) {
|
||||
gateway = (await getWETHGateway()).address;
|
||||
}
|
||||
await authorizeWETHGateway(gateway, lendingPoolAddress);
|
||||
});
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
import { task } from 'hardhat/config';
|
||||
import { getParamPerNetwork } from '../../helpers/contracts-helpers';
|
||||
import {
|
||||
deployLendingPoolAddressesProvider,
|
||||
deployLendingPoolAddressesProviderRegistry,
|
||||
} from '../../helpers/contracts-deployments';
|
||||
import { deployLendingPoolAddressesProvider } from '../../helpers/contracts-deployments';
|
||||
import { notFalsyOrZeroAddress, waitForTx } from '../../helpers/misc-utils';
|
||||
import {
|
||||
ConfigNames,
|
||||
|
@ -11,16 +7,8 @@ import {
|
|||
getGenesisPoolAdmin,
|
||||
getEmergencyAdmin,
|
||||
} from '../../helpers/configuration';
|
||||
import { getParamPerNetwork } from '../../helpers/contracts-helpers';
|
||||
import { eNetwork } from '../../helpers/types';
|
||||
import {
|
||||
getFirstSigner,
|
||||
getLendingPoolAddressesProviderRegistry,
|
||||
} from '../../helpers/contracts-getters';
|
||||
import { formatEther, isAddress, parseEther } from 'ethers/lib/utils';
|
||||
import { isZeroAddress } from 'ethereumjs-util';
|
||||
import { Signer, BigNumber } from 'ethers';
|
||||
import { parse } from 'path';
|
||||
//import BigNumber from 'bignumber.js';
|
||||
|
||||
task(
|
||||
'full:deploy-address-provider',
|
||||
|
@ -28,57 +16,29 @@ task(
|
|||
)
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.addParam('pool', `Pool name to retrieve configuration, supported: ${Object.values(ConfigNames)}`)
|
||||
.setAction(async ({ verify, pool }, DRE) => {
|
||||
.addFlag('skipRegistry')
|
||||
.setAction(async ({ verify, pool, skipRegistry }, DRE) => {
|
||||
await DRE.run('set-DRE');
|
||||
let signer: Signer;
|
||||
const network = <eNetwork>DRE.network.name;
|
||||
const poolConfig = loadPoolConfig(pool);
|
||||
const { ProviderId, MarketId } = poolConfig;
|
||||
const { MarketId } = poolConfig;
|
||||
|
||||
const providerRegistryAddress = getParamPerNetwork(poolConfig.ProviderRegistry, network);
|
||||
const providerRegistryOwner = getParamPerNetwork(poolConfig.ProviderRegistryOwner, network);
|
||||
|
||||
if (
|
||||
!providerRegistryOwner ||
|
||||
!isAddress(providerRegistryOwner) ||
|
||||
isZeroAddress(providerRegistryOwner)
|
||||
) {
|
||||
throw Error('config.ProviderRegistryOwner is missing or is not an address.');
|
||||
}
|
||||
|
||||
// Checks if deployer address is registry owner
|
||||
if (process.env.MAINNET_FORK === 'true') {
|
||||
await DRE.network.provider.request({
|
||||
method: 'hardhat_impersonateAccount',
|
||||
params: [providerRegistryOwner],
|
||||
});
|
||||
signer = DRE.ethers.provider.getSigner(providerRegistryOwner);
|
||||
const firstAccount = await getFirstSigner();
|
||||
await firstAccount.sendTransaction({ value: parseEther('10'), to: providerRegistryOwner });
|
||||
} else {
|
||||
signer = DRE.ethers.provider.getSigner(providerRegistryOwner);
|
||||
}
|
||||
// 1. Address Provider Registry instance
|
||||
const addressesProviderRegistry = (
|
||||
await getLendingPoolAddressesProviderRegistry(providerRegistryAddress)
|
||||
).connect(signer);
|
||||
|
||||
console.log('Registry Address', addressesProviderRegistry.address);
|
||||
|
||||
// 2. Deploy address provider and set genesis manager
|
||||
// 1. Deploy address provider and set genesis manager
|
||||
const addressesProvider = await deployLendingPoolAddressesProvider(MarketId, verify);
|
||||
|
||||
// DISABLE SEC. 3 FOR GOVERNANCE USE!
|
||||
// 3. Set the provider at the Registry
|
||||
await waitForTx(
|
||||
await addressesProviderRegistry.registerAddressesProvider(
|
||||
addressesProvider.address,
|
||||
ProviderId
|
||||
)
|
||||
);
|
||||
|
||||
// 4. Set pool admins
|
||||
// 2. Add to registry or setup a new one
|
||||
if (!skipRegistry) {
|
||||
const providerRegistryAddress = getParamPerNetwork(
|
||||
poolConfig.ProviderRegistry,
|
||||
<eNetwork>DRE.network.name
|
||||
);
|
||||
|
||||
await DRE.run('add-market-to-registry', {
|
||||
pool,
|
||||
addressesProvider: addressesProvider.address,
|
||||
deployRegistry: !notFalsyOrZeroAddress(providerRegistryAddress),
|
||||
});
|
||||
}
|
||||
// 3. Set pool admins
|
||||
await waitForTx(await addressesProvider.setPoolAdmin(await getGenesisPoolAdmin(poolConfig)));
|
||||
await waitForTx(await addressesProvider.setEmergencyAdmin(await getEmergencyAdmin(poolConfig)));
|
||||
|
||||
|
|
|
@ -29,7 +29,10 @@ task('aave:dev', 'Deploy development enviroment')
|
|||
console.log('4. Deploy oracles');
|
||||
await localBRE.run('dev:deploy-oracles', { verify, pool: POOL_NAME });
|
||||
|
||||
console.log('5. Initialize lending pool');
|
||||
console.log('5. Deploy WETH Gateway');
|
||||
await localBRE.run('full-deploy-weth-gateway', { verify, pool: POOL_NAME });
|
||||
|
||||
console.log('6. Initialize lending pool');
|
||||
await localBRE.run('dev:initialize-lending-pool', { verify, pool: POOL_NAME });
|
||||
|
||||
console.log('\nFinished migration');
|
||||
|
|
|
@ -6,7 +6,8 @@ import { usingTenderly } from '../../helpers/tenderly-utils';
|
|||
|
||||
task('aave:mainnet', 'Deploy development enviroment')
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.setAction(async ({ verify }, DRE) => {
|
||||
.addFlag('skipRegistry', 'Skip addresses provider registration at Addresses Provider Registry')
|
||||
.setAction(async ({ verify, skipRegistry }, DRE) => {
|
||||
const POOL_NAME = ConfigNames.Aave;
|
||||
await DRE.run('set-DRE');
|
||||
|
||||
|
@ -18,7 +19,7 @@ task('aave:mainnet', 'Deploy development enviroment')
|
|||
console.log('Migration started\n');
|
||||
|
||||
console.log('1. Deploy address provider');
|
||||
await DRE.run('full:deploy-address-provider', { pool: POOL_NAME });
|
||||
await DRE.run('full:deploy-address-provider', { pool: POOL_NAME, skipRegistry });
|
||||
|
||||
console.log('2. Deploy lending pool');
|
||||
await DRE.run('full:deploy-lending-pool', { pool: POOL_NAME });
|
||||
|
|
|
@ -6,7 +6,8 @@ import { usingTenderly } from '../../helpers/tenderly-utils';
|
|||
|
||||
task('amm:mainnet', 'Deploy development enviroment')
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.setAction(async ({ verify }, DRE) => {
|
||||
.addFlag('skipRegistry', 'Skip addresses provider registration at Addresses Provider Registry')
|
||||
.setAction(async ({ verify, skipRegistry }, DRE) => {
|
||||
const POOL_NAME = ConfigNames.Amm;
|
||||
await DRE.run('set-DRE');
|
||||
|
||||
|
@ -18,7 +19,7 @@ task('amm:mainnet', 'Deploy development enviroment')
|
|||
console.log('Migration started\n');
|
||||
|
||||
console.log('1. Deploy address provider');
|
||||
await DRE.run('full:deploy-address-provider', { pool: POOL_NAME });
|
||||
await DRE.run('full:deploy-address-provider', { pool: POOL_NAME, skipRegistry });
|
||||
|
||||
console.log('2. Deploy lending pool');
|
||||
await DRE.run('full:deploy-lending-pool', { pool: POOL_NAME });
|
||||
|
|
|
@ -5,9 +5,10 @@ import { printContracts } from '../../helpers/misc-utils';
|
|||
import { usingTenderly } from '../../helpers/tenderly-utils';
|
||||
|
||||
task('sidechain:mainnet', 'Deploy market at sidechain')
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.addParam('pool', `Market pool configuration, one of ${Object.keys(ConfigNames)}`)
|
||||
.setAction(async ({ verify, pool }, DRE) => {
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.addFlag('skipRegistry', 'Skip addresses provider registration at Addresses Provider Registry')
|
||||
.setAction(async ({ verify, pool, skipRegistry }, DRE) => {
|
||||
const POOL_NAME = pool;
|
||||
await DRE.run('set-DRE');
|
||||
|
||||
|
@ -22,7 +23,7 @@ task('sidechain:mainnet', 'Deploy market at sidechain')
|
|||
await DRE.run('full:deploy-address-provider-registry', { pool: POOL_NAME });
|
||||
|
||||
console.log('1. Deploy address provider');
|
||||
await DRE.run('full:deploy-address-provider', { pool: POOL_NAME });
|
||||
await DRE.run('full:deploy-address-provider', { pool: POOL_NAME, skipRegistry });
|
||||
|
||||
console.log('2. Deploy lending pool');
|
||||
await DRE.run('full:deploy-lending-pool', { pool: POOL_NAME });
|
||||
|
|
|
@ -14,10 +14,10 @@ task('print-config', 'Inits the DRE, to have access to all the plugins')
|
|||
.addParam('pool', `Pool name to retrieve configuration, supported: ${Object.values(ConfigNames)}`)
|
||||
.setAction(async ({ pool, dataProvider }, localBRE) => {
|
||||
await localBRE.run('set-DRE');
|
||||
const network =
|
||||
process.env.MAINNET_FORK === 'true'
|
||||
? eEthereumNetwork.main
|
||||
: (localBRE.network.name as eNetwork);
|
||||
const network = process.env.FORK
|
||||
? (process.env.FORK as eNetwork)
|
||||
: (localBRE.network.name as eNetwork);
|
||||
console.log(network);
|
||||
const poolConfig = loadPoolConfig(pool);
|
||||
|
||||
const providerRegistryAddress = getParamPerNetwork(poolConfig.ProviderRegistry, network);
|
||||
|
@ -60,7 +60,7 @@ task('print-config', 'Inits the DRE, to have access to all the plugins')
|
|||
];
|
||||
const tokensFields = ['aToken', 'stableDebtToken', 'variableDebtToken'];
|
||||
for (const [symbol, address] of Object.entries(
|
||||
getParamPerNetwork(poolConfig.ReserveAssets, network)
|
||||
getParamPerNetwork(poolConfig.ReserveAssets, network as eNetwork)
|
||||
)) {
|
||||
console.log(`- ${symbol} asset config`);
|
||||
console.log(` - reserve address: ${address}`);
|
||||
|
|
|
@ -5,6 +5,8 @@ import { usingTenderly } from '../../helpers/tenderly-utils';
|
|||
import { HardhatRuntimeEnvironment } from 'hardhat/types';
|
||||
import { getFirstSigner } from '../../helpers/contracts-getters';
|
||||
import { formatEther } from 'ethers/lib/utils';
|
||||
import { fork } from 'child_process';
|
||||
import { env } from 'process';
|
||||
|
||||
task(`set-DRE`, `Inits the DRE, to have access to all the plugins' objects`).setAction(
|
||||
async (_, _DRE) => {
|
||||
|
@ -36,6 +38,18 @@ task(`set-DRE`, `Inits the DRE, to have access to all the plugins' objects`).set
|
|||
);
|
||||
}
|
||||
|
||||
console.log('- Enviroment');
|
||||
if (process.env.FORK) {
|
||||
console.log(' - Fork Mode activated at network: ', process.env.FORK);
|
||||
if (_DRE?.config?.networks?.hardhat?.forking?.url) {
|
||||
console.log(' - Provider URL:', _DRE.config.networks.hardhat.forking?.url?.split('/')[2]);
|
||||
} else {
|
||||
console.error(
|
||||
`[FORK][Error], missing Provider URL for "${_DRE.network.name}" network. Fill the URL at './helper-hardhat-config.ts' file`
|
||||
);
|
||||
}
|
||||
}
|
||||
console.log(' - Network :', _DRE.network.name);
|
||||
setDRE(_DRE);
|
||||
return _DRE;
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
WMATIC: mockTokens.WMATIC.address,
|
||||
USD: USD_ADDRESS,
|
||||
STAKE: mockTokens.STAKE.address,
|
||||
xSUSHI: mockTokens.xSUSHI.address
|
||||
xSUSHI: mockTokens.xSUSHI.address,
|
||||
},
|
||||
fallbackOracle
|
||||
);
|
||||
|
@ -295,9 +295,9 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
before(async () => {
|
||||
await rawBRE.run('set-DRE');
|
||||
const [deployer, secondaryWallet] = await getEthersSigners();
|
||||
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
|
||||
const FORK = process.env.FORK;
|
||||
|
||||
if (MAINNET_FORK) {
|
||||
if (FORK) {
|
||||
await rawBRE.run('aave:mainnet');
|
||||
} else {
|
||||
console.log('-> Deploying test environment...');
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
getUniswapRepayAdapter,
|
||||
getFlashLiquidationAdapter,
|
||||
} from '../../../helpers/contracts-getters';
|
||||
import { eEthereumNetwork, tEthereumAddress } from '../../../helpers/types';
|
||||
import { eEthereumNetwork, eNetwork, tEthereumAddress } from '../../../helpers/types';
|
||||
import { LendingPool } from '../../../types/LendingPool';
|
||||
import { AaveProtocolDataProvider } from '../../../types/AaveProtocolDataProvider';
|
||||
import { MintableERC20 } from '../../../types/MintableERC20';
|
||||
|
@ -116,9 +116,9 @@ export async function initializeMakeSuite() {
|
|||
|
||||
testEnv.addressesProvider = await getLendingPoolAddressesProvider();
|
||||
|
||||
if (process.env.MAINNET_FORK === 'true') {
|
||||
if (process.env.FORK) {
|
||||
testEnv.registry = await getLendingPoolAddressesProviderRegistry(
|
||||
getParamPerNetwork(AaveConfig.ProviderRegistry, eEthereumNetwork.main)
|
||||
getParamPerNetwork(AaveConfig.ProviderRegistry, process.env.FORK as eNetwork)
|
||||
);
|
||||
} else {
|
||||
testEnv.registry = await getLendingPoolAddressesProviderRegistry();
|
||||
|
|
|
@ -26,7 +26,7 @@ import {
|
|||
deployUniswapLiquiditySwapAdapter,
|
||||
deployUniswapRepayAdapter,
|
||||
deployFlashLiquidationAdapter,
|
||||
authorizeWETHGateway
|
||||
authorizeWETHGateway,
|
||||
} from '../../helpers/contracts-deployments';
|
||||
import { Signer } from 'ethers';
|
||||
import { TokenContractId, eContractid, tEthereumAddress, AavePools } from '../../helpers/types';
|
||||
|
@ -240,8 +240,8 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
console.log('Initialize configuration');
|
||||
|
||||
const config = loadPoolConfig(ConfigNames.Amm);
|
||||
|
||||
const {
|
||||
|
||||
const {
|
||||
ATokenNamePrefix,
|
||||
StableDebtTokenNamePrefix,
|
||||
VariableDebtTokenNamePrefix,
|
||||
|
@ -292,9 +292,9 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
before(async () => {
|
||||
await rawBRE.run('set-DRE');
|
||||
const [deployer, secondaryWallet] = await getEthersSigners();
|
||||
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
|
||||
const FORK = process.env.FORK;
|
||||
|
||||
if (MAINNET_FORK) {
|
||||
if (FORK) {
|
||||
await rawBRE.run('amm:mainnet');
|
||||
} else {
|
||||
console.log('-> Deploying test environment...');
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
getUniswapRepayAdapter,
|
||||
getFlashLiquidationAdapter,
|
||||
} from '../../../helpers/contracts-getters';
|
||||
import { eEthereumNetwork, tEthereumAddress } from '../../../helpers/types';
|
||||
import { eEthereumNetwork, eNetwork, tEthereumAddress } from '../../../helpers/types';
|
||||
import { LendingPool } from '../../../types/LendingPool';
|
||||
import { AaveProtocolDataProvider } from '../../../types/AaveProtocolDataProvider';
|
||||
import { MintableERC20 } from '../../../types/MintableERC20';
|
||||
|
@ -116,9 +116,9 @@ export async function initializeMakeSuite() {
|
|||
|
||||
testEnv.addressesProvider = await getLendingPoolAddressesProvider();
|
||||
|
||||
if (process.env.MAINNET_FORK === 'true') {
|
||||
if (process.env.FORK) {
|
||||
testEnv.registry = await getLendingPoolAddressesProviderRegistry(
|
||||
getParamPerNetwork(AmmConfig.ProviderRegistry, eEthereumNetwork.main)
|
||||
getParamPerNetwork(AmmConfig.ProviderRegistry, process.env.FORK as eNetwork)
|
||||
);
|
||||
} else {
|
||||
testEnv.registry = await getLendingPoolAddressesProviderRegistry();
|
||||
|
|
Loading…
Reference in New Issue
Block a user