From 09572b67497eb944ff39684066fc66069eda559f Mon Sep 17 00:00:00 2001 From: Tom French Date: Fri, 10 Jul 2020 15:57:45 +0100 Subject: [PATCH] migrate to ethersv5 --- package.json | 7 +- src/abi/Multicall.json | 2 +- src/components/Common/WrapEth.tsx | 4 +- src/components/Pool/SwapsTable.tsx | 2 +- src/provider/UncheckedJsonRpcSigner.ts | 43 ---- src/provider/subgraph.ts | 2 +- src/stores/Provider.ts | 16 +- src/stores/Proxy.ts | 4 +- src/stores/Token.ts | 17 +- src/stores/Transaction.ts | 7 +- src/stores/actions/actions.ts | 4 +- src/utils/helpers.tsx | 20 +- yarn.lock | 265 +++++++++++++++++++++++-- 13 files changed, 288 insertions(+), 105 deletions(-) delete mode 100644 src/provider/UncheckedJsonRpcSigner.ts diff --git a/package.json b/package.json index b848d1f..7b454b2 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,12 @@ "@babel/core": "7.6.0", "@babel/plugin-proposal-decorators": "^7.6.0", "@babel/plugin-transform-react-jsx": "^7.3.0", + "@ethersproject/abi": "^5.0.1", + "@ethersproject/address": "^5.0.1", + "@ethersproject/constants": "^5.0.1", + "@ethersproject/contracts": "^5.0.1", + "@ethersproject/providers": "^5.0.4", + "@ethersproject/units": "^5.0.1", "@ledgerhq/hw-app-eth": "^4.72.1", "@ledgerhq/hw-transport-u2f": "^4.72.1", "@material-ui/core": "^4.5.0", @@ -45,7 +51,6 @@ "eslint-plugin-react-hooks": "^1.6.1", "ethereumjs-tx": "^2.1.1", "ethereumjs-util": "^6.1.0", - "ethers": "^4.0.45", "file-loader": "3.0.1", "fs-extra": "7.0.1", "hdkey": "^1.1.1", diff --git a/src/abi/Multicall.json b/src/abi/Multicall.json index 55bdc7d..a716333 100644 --- a/src/abi/Multicall.json +++ b/src/abi/Multicall.json @@ -45,7 +45,7 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { diff --git a/src/components/Common/WrapEth.tsx b/src/components/Common/WrapEth.tsx index e5e4cf3..39c9f37 100644 --- a/src/components/Common/WrapEth.tsx +++ b/src/components/Common/WrapEth.tsx @@ -4,7 +4,7 @@ import { useStores } from '../../contexts/storesContext'; import { toWei, formatBalance } from '../../utils/helpers'; import { ContractTypes } from '../../stores/Provider'; import Button from './Button'; -import { ethers } from 'ethers'; +import { parseEther } from '@ethersproject/units'; const Container = styled.div` display: flex; @@ -164,7 +164,7 @@ const WrapEth = () => { const actionButtonHandler = async (action: ButtonAction) => { if (action === ButtonAction.WRAP) { let overrides = { - value: ethers.utils.parseEther(ethAmount), + value: parseEther(ethAmount), }; await providerStore.sendTransaction( diff --git a/src/components/Pool/SwapsTable.tsx b/src/components/Pool/SwapsTable.tsx index a3a8d1a..309a259 100644 --- a/src/components/Pool/SwapsTable.tsx +++ b/src/components/Pool/SwapsTable.tsx @@ -5,7 +5,7 @@ import { padToDecimalPlaces } from '../../utils/helpers'; import { getEtherscanLink } from '../../utils/helpers'; import { useStores } from '../../contexts/storesContext'; import { TokenIconAddress } from '../Common/WalletBalances'; -import { getAddress } from 'ethers/utils'; +import { getAddress } from '@ethersproject/address'; const ExternalLink = require('../../assets/images/external-link.svg') as string; const formatDate = timestamp => { diff --git a/src/provider/UncheckedJsonRpcSigner.ts b/src/provider/UncheckedJsonRpcSigner.ts deleted file mode 100644 index 53d02af..0000000 --- a/src/provider/UncheckedJsonRpcSigner.ts +++ /dev/null @@ -1,43 +0,0 @@ -import * as ethers from 'ethers'; - -class UncheckedJsonRpcSigner extends ethers.Signer { - signer: any; - - constructor(signer) { - super(); - ethers.utils.defineReadOnly(this, 'signer', signer); - ethers.utils.defineReadOnly(this, 'provider', signer.provider); - } - - getAddress() { - return this.signer.getAddress(); - } - - sendTransaction(transaction) { - return this.signer.sendUncheckedTransaction(transaction).then(hash => { - return { - hash: hash, - nonce: null, - gasLimit: null, - gasPrice: null, - data: null, - value: null, - chainId: null, - confirmations: 0, - from: null, - wait: confirmations => { - return this.signer.provider.waitForTransaction( - hash, - confirmations - ); - }, - }; - }); - } - - signMessage(message) { - return this.signer.signMessage(message); - } -} - -export default UncheckedJsonRpcSigner; diff --git a/src/provider/subgraph.ts b/src/provider/subgraph.ts index 6c4c213..5eb9fb8 100644 --- a/src/provider/subgraph.ts +++ b/src/provider/subgraph.ts @@ -1,5 +1,5 @@ import fetch from 'isomorphic-fetch'; -import { getAddress } from 'ethers/utils'; +import { getAddress } from '@ethersproject/address'; import { Pool, PoolToken, Swap } from '../types'; import { bnum } from '../utils/helpers'; import { getSupportedChainId, SUBGRAPH_URLS } from './connectors'; diff --git a/src/stores/Provider.ts b/src/stores/Provider.ts index 53ef601..99b9630 100644 --- a/src/stores/Provider.ts +++ b/src/stores/Provider.ts @@ -1,7 +1,7 @@ import { action, observable, ObservableMap } from 'mobx'; import RootStore from 'stores/Root'; -import { ethers } from 'ethers'; -import UncheckedJsonRpcSigner from 'provider/UncheckedJsonRpcSigner'; +import { Contract } from '@ethersproject/contracts' +import { JsonRpcProvider, Web3Provider } from '@ethersproject/providers' import { ActionResponse, sendAction } from './actions/actions'; import { web3Window as window } from 'provider/Web3Window'; import { backupUrls, supportedChainId, web3Modal } from 'provider/connectors'; @@ -132,7 +132,7 @@ export default class ProviderStore { }); return account - ? new UncheckedJsonRpcSigner(library.getSigner(account)) + ? library.getSigner(account).connectUnchecked() : library; } @@ -140,11 +140,11 @@ export default class ProviderStore { type: ContractTypes, address: string, signerAccount?: string - ): ethers.Contract { + ): Contract { const library = this.providerStatus.library; if (signerAccount) { - return new ethers.Contract( + return new Contract( address, schema[type], this.getProviderOrSigner( @@ -154,7 +154,7 @@ export default class ProviderStore { ); } - return new ethers.Contract(address, schema[type], library); + return new Contract(address, schema[type], library); } @action sendTransaction = async ( @@ -286,7 +286,7 @@ export default class ProviderStore { await this.providerStatus.library.close(); } - let web3 = new ethers.providers.Web3Provider(provider); + let web3 = new Web3Provider(provider); if ((provider as any).isMetaMask) { console.log(`[Provider] MetaMask Auto Refresh Off`); @@ -348,7 +348,7 @@ export default class ProviderStore { this.providerStatus ); try { - let web3 = new ethers.providers.JsonRpcProvider( + let web3 = new JsonRpcProvider( backupUrls[supportedChainId] ); let network = await web3.getNetwork(); diff --git a/src/stores/Proxy.ts b/src/stores/Proxy.ts index ec06a86..7baf2f3 100644 --- a/src/stores/Proxy.ts +++ b/src/stores/Proxy.ts @@ -1,5 +1,5 @@ import { action, observable } from 'mobx'; -import { Interface } from 'ethers/utils'; +import { Interface } from '@ethersproject/abi'; import RootStore from './Root'; import { ContractTypes, schema } from './Provider'; import { FetchCode } from './Transaction'; @@ -60,7 +60,7 @@ export default class Proxy { ): string { const abi = schema[contractType]; const iface = new Interface(abi); - const data = iface.functions[action].encode(params); + const data = iface.encodeFunctionData(action, params); return data; } } diff --git a/src/stores/Token.ts b/src/stores/Token.ts index a0a6e49..a26074e 100644 --- a/src/stores/Token.ts +++ b/src/stores/Token.ts @@ -3,7 +3,8 @@ import RootStore from 'stores/Root'; import { ContractTypes } from 'stores/Provider'; import * as helpers from 'utils/helpers'; import { bnum, scale } from 'utils/helpers'; -import { parseEther, Interface } from 'ethers/utils'; +import { Interface } from '@ethersproject/abi'; +import { parseEther } from '@ethersproject/units'; import { FetchCode } from './Transaction'; import { BigNumber } from 'utils/bignumber'; import { AsyncStatus, UserAllowanceFetch } from './actions/fetch'; @@ -129,7 +130,7 @@ export default class TokenStore { tokenAddresses.forEach(value => { calls.push([ value, - iface.functions.allowance.encode([account, spender]), + iface.encodeFunctionData("allowance", [account, spender]), ]); }); @@ -409,14 +410,12 @@ export default class TokenStore { const iface = new Interface(tokenAbi); tokensToTrack.forEach(value => { - calls.push([value, iface.functions.totalSupply.encode([])]); + calls.push([value, iface.encodeFunctionData("totalSupply",[])]); }); try { const [blockNumber, response] = await multi.aggregate(calls); - const supplies = response.map(value => - bnum(iface.functions.totalSupply.decode(value)) - ); + const supplies = response.map(value => bnum(value)); this.setTotalSupplies( tokensToTrack, @@ -452,7 +451,7 @@ export default class TokenStore { if (value !== EtherKey) { calls.push([ value, - iface.functions.balanceOf.encode([account]), + iface.encodeFunctionData("balanceOf", [account]), ]); } }); @@ -464,9 +463,7 @@ export default class TokenStore { const [[blockNumber, response], ethBalance] = await Promise.all( promises ); - const balances = response.map(value => - bnum(iface.functions.balanceOf.decode(value)) - ); + const balances = response.map(value => bnum(value)); if (tokensToTrack[0] === EtherKey) { balances.unshift(bnum(ethBalance)); } diff --git a/src/stores/Transaction.ts b/src/stores/Transaction.ts index aec1ce1..dc60f0d 100644 --- a/src/stores/Transaction.ts +++ b/src/stores/Transaction.ts @@ -1,13 +1,12 @@ import { action, observable } from 'mobx'; -import { providers } from 'ethers'; +import { TransactionReceipt, TransactionResponse } from '@ethersproject/providers'; import RootStore from 'stores/Root'; -import { TransactionResponse } from 'ethers/providers'; export interface TransactionRecord { hash: string; - response: providers.TransactionResponse; + response: TransactionResponse; blockNumberChecked: number; - receipt: providers.TransactionReceipt | undefined; + receipt: TransactionReceipt | undefined; } const ERRORS = { diff --git a/src/stores/actions/actions.ts b/src/stores/actions/actions.ts index 76cfa00..31dd5a6 100644 --- a/src/stores/actions/actions.ts +++ b/src/stores/actions/actions.ts @@ -1,5 +1,5 @@ -import { Contract } from 'ethers'; -import { TransactionResponse } from 'ethers/providers'; +import { Contract } from '@ethersproject/contracts'; +import { TransactionResponse } from '@ethersproject/providers'; interface ActionRequest { contract: Contract; diff --git a/src/utils/helpers.tsx b/src/utils/helpers.tsx index 9a5ac9a..8458d54 100644 --- a/src/utils/helpers.tsx +++ b/src/utils/helpers.tsx @@ -1,17 +1,19 @@ // Libraries import React from 'react'; import jazzicon from 'jazzicon'; -import { ethers, utils } from 'ethers'; +import { getAddress } from '@ethersproject/address'; +import { MaxUint256 } from '@ethersproject/constants'; +import { formatEther } from '@ethersproject/units'; import { BigNumber } from 'utils/bignumber'; import { Pool } from '../types'; // Utils -export const MAX_GAS = utils.bigNumberify('0xffffffff'); -export const MAX_UINT = utils.bigNumberify(ethers.constants.MaxUint256); +export const MAX_GAS = new BigNumber('0xffffffff'); +export const MAX_UINT = MaxUint256; export const POOL_TOKENS_DECIMALS = 18; export function toChecksum(address) { - return utils.getAddress(address); + return getAddress(address); } export const formatDate = timestamp => { @@ -26,7 +28,7 @@ export const addZero = value => { }; export function bnum( - val: string | number | utils.BigNumber | BigNumber + val: string | number | BigNumber ): BigNumber { return new BigNumber(val.toString()); } @@ -37,11 +39,11 @@ export function scale(input: BigNumber, decimalPlaces: number): BigNumber { return input.times(scaleMul); } -export function fromWei(val: string | utils.BigNumber | BigNumber): string { - return utils.formatEther(val.toString()); +export function fromWei(val: string | BigNumber): string { + return formatEther(val.toString()); } -export function toWei(val: string | utils.BigNumber | BigNumber): BigNumber { +export function toWei(val: string | BigNumber): BigNumber { return scale(bnum(val.toString()), 18).integerValue(); } @@ -114,7 +116,7 @@ export function shortenTransactionHash(hash, digits = 4) { export function isAddress(value) { try { - return ethers.utils.getAddress(value.toLowerCase()); + return getAddress(value.toLowerCase()); } catch { return false; } diff --git a/yarn.lock b/yarn.lock index f792758..7ea5675 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1102,6 +1102,45 @@ resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== +"@ethersproject/abi@^5.0.0", "@ethersproject/abi@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.1.tgz#b6ba2bfb4278fbd6328b608e09741c2475ddad9c" + integrity sha512-9fqSa3jEYV4nN8tijW+jz4UnT/Ma9/b8y4+nHlsvuWqr32E2kYsT9SCIVpk/51iM6NOud7xsA6UxCox9zBeHKg== + dependencies: + "@ethersproject/address" "^5.0.0" + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/constants" "^5.0.0" + "@ethersproject/hash" "^5.0.0" + "@ethersproject/keccak256" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + "@ethersproject/strings" "^5.0.0" + +"@ethersproject/abstract-provider@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.1.tgz#7d4828a3b4690f95f4462abedcba7aeb118dadd5" + integrity sha512-/KOw65ayviYPtKLqFE1qozeIJJlfI1wE/tNA+iKUPUai6bU6vg2tbfLFGarRTCQe3HoWV1t7xSsD/z9T9xg74g== + dependencies: + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/networks" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + "@ethersproject/transactions" "^5.0.0" + "@ethersproject/web" "^5.0.0" + +"@ethersproject/abstract-signer@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.1.tgz#92149e771366467e86cc44dd0c49d28f93eaa852" + integrity sha512-Rp8DP+cLcSNFkd1YhwPSBcgEWLRipNakitwIwHngAmhbo4zdiWgALD/OLqdQ7SKF75CufF1W4BCuXcQgiWaRow== + dependencies: + "@ethersproject/abstract-provider" "^5.0.0" + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + "@ethersproject/address@5.0.0-beta.134": version "5.0.0-beta.134" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.0-beta.134.tgz#9c1790c87b763dc547ac12e2dbc9fa78d0799a71" @@ -1114,6 +1153,25 @@ "@ethersproject/rlp" ">=5.0.0-beta.126" bn.js "^4.4.0" +"@ethersproject/address@^5.0.0", "@ethersproject/address@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.1.tgz#882424fbbec1111abc1aa3482e647a72683c5377" + integrity sha512-kfQtXpBP2pI2TfoRRAYv8grHGiYw8U0c1KbMsC58/W33TIBy7gFSf/oAzOd94lNzdIUenKU0OuSzrHQfVcDDDA== + dependencies: + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/keccak256" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/rlp" "^5.0.0" + bn.js "^4.4.0" + +"@ethersproject/base64@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.1.tgz#9f067855f59db94edebb6cd80fbe79033406b317" + integrity sha512-WZDa+TYl6BQfUm9EQIDDfJFL0GiuYXNZPIWoiZx3uds7P1XMsvcW3k71AyjYUxIkU5AKW7awwPbzCbBeP1uXsA== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/bignumber@>=5.0.0-beta.130": version "5.0.0-beta.136" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.0-beta.136.tgz#5fd90ee708f3778733b02caf58453756524c758f" @@ -1124,6 +1182,16 @@ "@ethersproject/properties" ">=5.0.0-beta.131" bn.js "^4.4.0" +"@ethersproject/bignumber@^5.0.0": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.4.tgz#2061a85cfe07d496a005047442fcb3277d371169" + integrity sha512-fgfwehdxS4BPRvq2B+joKqchW2E2cV3DE+O/DhG7jH3m2blM1VIzjtIOtJNjNI/YCgkygGjT1DaZS1j29RAwHw== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + bn.js "^4.4.0" + "@ethersproject/bytes@5.0.0-beta.136", "@ethersproject/bytes@>=5.0.0-beta.129": version "5.0.0-beta.136" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.0-beta.136.tgz#3aa651df43b44c9e355eba993d8ab4440cb964bb" @@ -1131,6 +1199,13 @@ dependencies: "@ethersproject/logger" ">=5.0.0-beta.129" +"@ethersproject/bytes@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.2.tgz#42aa6e6fca4c594b282ef424dd082b8ffd67058b" + integrity sha512-QLE5zCreNv7KGh0AsXdvmdOYcWSJbnR654M+dLyY90g3D0ehVDSf+wxzG/GmWa79ESsqo/cWC1kJA1Vrcq7GFw== + dependencies: + "@ethersproject/logger" "^5.0.0" + "@ethersproject/constants@>=5.0.0-beta.128": version "5.0.0-beta.133" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.0-beta.133.tgz#af4ccd7232f3ed73aebe066a695ede32c497a394" @@ -1138,6 +1213,38 @@ dependencies: "@ethersproject/bignumber" ">=5.0.0-beta.130" +"@ethersproject/constants@^5.0.0", "@ethersproject/constants@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.1.tgz#51426b1d673661e905418ddeefca1f634866860d" + integrity sha512-Xec07hFCPN4wfC3WDiRay7KipkApl2msiKTrBHCuAwNMOM8M92+mlQp8tgfEL51DPwCZkmdk1f02kArc6caVSw== + dependencies: + "@ethersproject/bignumber" "^5.0.0" + +"@ethersproject/contracts@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.0.1.tgz#b11ad52f98f807e13a4bf0a89e45a2c56db19df3" + integrity sha512-1uPajmkvw3Oy/dxs5TKUsGaXzQ3s5qiXKSVpw9ZrhGG6fMRO3gNyUA+uSWk9IXK0ulj5P95F7vW8HmYOkzep/Q== + dependencies: + "@ethersproject/abi" "^5.0.0" + "@ethersproject/abstract-provider" "^5.0.0" + "@ethersproject/abstract-signer" "^5.0.0" + "@ethersproject/address" "^5.0.0" + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/constants" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + +"@ethersproject/hash@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.1.tgz#8190240d250b9442dd25f1e8ec2d66e7d0d38237" + integrity sha512-1ByUXYvkszrSSks07xctBtZfpFnIVmftxWlAAnguxh6Q65vKECd/EPi5uI5xVOvnrYMH9Vb8MK1SofPX/6fArQ== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/keccak256" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/strings" "^5.0.0" + "@ethersproject/keccak256@>=5.0.0-beta.127": version "5.0.0-beta.131" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.0-beta.131.tgz#b5778723ee75208065b9b9ad30c71d480f41bb31" @@ -1146,11 +1253,31 @@ "@ethersproject/bytes" ">=5.0.0-beta.129" js-sha3 "0.5.7" +"@ethersproject/keccak256@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.1.tgz#be91c11a8bdf4e94c8b900502d2a46b223fbdeb3" + integrity sha512-AtFm/4qHRQUvZcG3WYmaT7zV79dz72+N01w0XphcIBaD/7UZXyW85Uf08sirVlckHmh9fvc4UDWyHiroKsBT6Q== + dependencies: + "@ethersproject/bytes" "^5.0.0" + js-sha3 "0.5.7" + "@ethersproject/logger@>=5.0.0-beta.129": version "5.0.0-beta.134" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.0-beta.134.tgz#9eed0e2a733287476978f01b4304c6abf345072d" integrity sha512-0nqZqf12/dCNfUhmpSvJweW6xQk9ixqgo/Fy3bVMbGKbuzezZtKPphGB5ibspvimWrVK7U6jLBTKHgRQKjU8Lg== +"@ethersproject/logger@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.2.tgz#f24aa14a738a428d711c1828b44d50114a461b8b" + integrity sha512-NQe3O1/Nwkcp6bto6hsTvrcCeR/cOGK+RhOMn0Zi2FND6gdWsf1g+5ie8gQ1REqDX4MTGP/Y131dZas985ls/g== + +"@ethersproject/networks@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.1.tgz#c06ac151d0dfec421c1cb98a9153c109b3117111" + integrity sha512-Pe34JCTC6Apm/DkK3z97xotvEyu9YHKIFlDIu5hGV6yFDb4/sUfY2SHKYSGdUrV0418ZZVrwYDveJtBFMmYu2Q== + dependencies: + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties@>=5.0.0-beta.131": version "5.0.0-beta.138" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.0-beta.138.tgz#e634d25b8c9f9448ef8d739bf4bd2db831dbe79d" @@ -1158,6 +1285,43 @@ dependencies: "@ethersproject/logger" ">=5.0.0-beta.129" +"@ethersproject/properties@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.1.tgz#e1fecbfcb24f23bf3b64a2ac74f2751113d116e0" + integrity sha512-b3VZ/NpYIf64/hFXeWNxVCbY1xoMPIYM3n6Qnu6Ayr3bLt1olFPQfAaaRB0aOsLz7tMtmkT3DrA1KG/IrOgBRw== + dependencies: + "@ethersproject/logger" "^5.0.0" + +"@ethersproject/providers@^5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.0.4.tgz#18f3857651fc479f0606815db07335f311bcabbf" + integrity sha512-bnju7KB3v+NDcbHYxbZJawb20WRh/FLhop/XvHBmGUAbYSCV+cRftRvvgsdeyJOApjsCioMtmIe5iYkRxDx/DA== + dependencies: + "@ethersproject/abstract-provider" "^5.0.0" + "@ethersproject/abstract-signer" "^5.0.0" + "@ethersproject/address" "^5.0.0" + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/constants" "^5.0.0" + "@ethersproject/hash" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/networks" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + "@ethersproject/random" "^5.0.0" + "@ethersproject/rlp" "^5.0.0" + "@ethersproject/strings" "^5.0.0" + "@ethersproject/transactions" "^5.0.0" + "@ethersproject/web" "^5.0.0" + ws "7.2.3" + +"@ethersproject/random@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.0.1.tgz#cc5433c54e26faddf7c036e07a4f125d64503edb" + integrity sha512-nYzNhcp5Th4dCocV3yceZmh80bRmSQxqNRgND7Y/YgEgYJSSnknScpfRHACG//kgbsY8zui8ajXJeEnzS7yFbQ== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/rlp@>=5.0.0-beta.126": version "5.0.0-beta.132" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.0-beta.132.tgz#f7d31e0ee8792180ffd5c73969aa5b2f8804e967" @@ -1166,6 +1330,24 @@ "@ethersproject/bytes" ">=5.0.0-beta.129" "@ethersproject/logger" ">=5.0.0-beta.129" +"@ethersproject/rlp@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.1.tgz#3407b0cb78f82a1a219aecff57578c0558ae26c8" + integrity sha512-3F8XE1zS4w8w4xiK1hMtFuVs6UnhQlmrEHLT85GanqK8vG5wGi81IQmkukL9tQIu2a5jykoO46ibja+6N1fpFg== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + +"@ethersproject/signing-key@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.2.tgz#ca3cff00d92220fcf7d124e03a139182d627cff3" + integrity sha512-kgpCdtgoLoKXJTwJPw3ggRW7EO93YCQ98zY8hBpIb4OK3FxFCR3UUjlrGEwjMnLHDjFrxpKCeJagGWf477RyMQ== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + elliptic "6.5.3" + "@ethersproject/strings@5.0.0-beta.136": version "5.0.0-beta.136" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.0-beta.136.tgz#053cbf4f9f96a7537cbc50300597f2d707907f51" @@ -1175,6 +1357,49 @@ "@ethersproject/constants" ">=5.0.0-beta.128" "@ethersproject/logger" ">=5.0.0-beta.129" +"@ethersproject/strings@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.1.tgz#a93aafeede100c4aad7f48e25aad1ddc42eeccc7" + integrity sha512-N8LxdHGBT7GZdogkEOV5xKXYTz5PNHuNzcxLNPYfH3kpvWSyXshZBgAz8YE1a8sMZagGj+Ic6d3mHijdCTSkGA== + dependencies: + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/constants" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + +"@ethersproject/transactions@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.1.tgz#61480dc600f4a49eb99627778e3b46b381f8bdd9" + integrity sha512-IGc6/5hri3PrqR/ZCj89osDiq3Lt0CSrycn6vlRl8SjpBKYDdcT+Ru5xkeC7YcsnqcdBmTL+jyR3SLudU+x2Kw== + dependencies: + "@ethersproject/address" "^5.0.0" + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/bytes" "^5.0.0" + "@ethersproject/constants" "^5.0.0" + "@ethersproject/keccak256" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + "@ethersproject/rlp" "^5.0.0" + "@ethersproject/signing-key" "^5.0.0" + +"@ethersproject/units@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.0.1.tgz#f9fd97d0bfa0c23d55084b428053a29b42082a1f" + integrity sha512-7J7Jmm4hMZ+yFiqEd7D5oeVK/V74GDwQlT0Om1yxXLYX6UPcV5ChHkUz/xpHPT9JXQlQ+2D69HBf1dzvdflrmQ== + dependencies: + "@ethersproject/bignumber" "^5.0.0" + "@ethersproject/constants" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + +"@ethersproject/web@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.1.tgz#b741096b5ad9465a1148b7dba8988c1da16f592a" + integrity sha512-lWPg8BR6KoyiIKYRIM6j+XO9bT9vGM1JnxFj2HmhIvOrOjba7ZRd8ANBOsDVGfw5igLUdfqAUOf9WpSsH//TzA== + dependencies: + "@ethersproject/base64" "^5.0.0" + "@ethersproject/logger" "^5.0.0" + "@ethersproject/properties" "^5.0.0" + "@ethersproject/strings" "^5.0.0" + "@hapi/address@2.x.x": version "2.1.4" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" @@ -5216,7 +5441,20 @@ elliptic@6.3.3: hash.js "^1.0.0" inherits "^2.0.1" -elliptic@6.5.2, elliptic@^6.0.0, elliptic@^6.4.0, elliptic@^6.5.2: +elliptic@6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +elliptic@^6.0.0, elliptic@^6.4.0, elliptic@^6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== @@ -5893,21 +6131,6 @@ ethers@4.0.0-beta.3: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^4.0.45: - version "4.0.45" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.45.tgz#8d4cd764d7c7690836b583d4849203c225eb56e2" - integrity sha512-N/Wmc6Mw4pQO+Sss1HnKDCSS6KSCx0luoBMiPNq+1GbOaO3YaZOyplBEhj+NEoYsizZYODtkITg2oecPeNnidQ== - dependencies: - aes-js "3.0.0" - bn.js "^4.4.0" - elliptic "6.5.2" - 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" - ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" @@ -12217,11 +12440,6 @@ scrypt-js@2.0.3: resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" integrity sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q= -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== - scss-tokenizer@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" @@ -14312,6 +14530,11 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +ws@7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" + integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== + ws@^5.1.1: version "5.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"