From 4065d5a007827d5ea391414199951cf3ead4f748 Mon Sep 17 00:00:00 2001 From: nicolas Date: Thu, 28 May 2020 12:50:08 -0300 Subject: [PATCH] Allow to load Safe Apps with ENS names (#911) * Remove ethereum-ens in favour of web3.eth.ens * Allow load Apps from ENS names * remove comment * review changes * replace REACT_APP_IPFS_NODE by REACT_APP_IPFS_GATEWAY * review fixes * TS Errors * fix paths * Fix validtor * Apps: Move App form to a separate file * re-build * review changes * fix iframeEl type * remove validation * fix type * update web3 version * remove type in getContentFromENS Co-authored-by: lukasschor Co-authored-by: Mati Dastugue Co-authored-by: Fernando Co-authored-by: Mikhail Mikheev --- .env.example | 1 + package.json | 35 ++- src/components/forms/validator.ts | 14 +- src/logic/contracts/generateBatchRequests.ts | 2 +- src/logic/safe/transactions/gasNew.ts | 2 +- src/logic/safe/transactions/send.ts | 4 +- src/logic/tokens/utils/tokenHelpers.ts | 2 +- src/logic/wallets/getWeb3.ts | 8 +- .../safe/components/Apps/AddAppForm.tsx | 203 +++++++++++++ .../safe/components/Apps/ManageApps.tsx | 179 ++--------- src/routes/safe/components/Apps/index.tsx | 10 +- .../safe/components/Apps/sendTransactions.ts | 2 +- src/routes/safe/components/Apps/types.d.ts | 8 + src/routes/safe/components/Apps/utils.ts | 8 +- .../ContractInteraction/utils/index.ts | 2 +- yarn.lock | 284 +----------------- 16 files changed, 300 insertions(+), 464 deletions(-) create mode 100644 src/routes/safe/components/Apps/AddAppForm.tsx create mode 100644 src/routes/safe/components/Apps/types.d.ts diff --git a/.env.example b/.env.example index 51bd50d3..cb172be8 100644 --- a/.env.example +++ b/.env.example @@ -9,6 +9,7 @@ REACT_APP_GOOGLE_ANALYTICS_ID_MAINNET= # For all environments REACT_APP_INFURA_TOKEN= +REACT_APP_IPFS_GATEWAY=https://ipfs.io/ipfs PUBLIC_URL=/app/ # For production environments diff --git a/package.json b/package.json index 056be06c..de9932fc 100644 --- a/package.json +++ b/package.json @@ -161,20 +161,19 @@ "bignumber.js": "9.0.0", "bnc-onboard": "1.9.0", "classnames": "^2.2.6", - "connected-react-router": "6.8.0", + "connected-react-router": "6.8.0", "currency-flags": "2.1.2", - "date-fns": "2.13.0", + "date-fns": "2.13.0", "electron-is-dev": "^1.1.0", "electron-log": "4.1.2", "electron-updater": "4.3.1", - "ethereum-ens": "0.8.0", "express": "^4.17.1", - "final-form-calculate": "^1.3.1", "final-form": "4.19.1", + "final-form-calculate": "^1.3.1", "history": "4.10.1", "immortal-db": "^1.0.2", "immutable": "^4.0.0-rc.9", - "js-cookie": "^2.2.1", + "js-cookie": "^2.2.1", "lodash.memoize": "^4.1.2", "material-ui-search-bar": "^1.0.0-beta.13", "notistack": "https://github.com/gnosis/notistack.git#v0.9.4", @@ -182,9 +181,10 @@ "polished": "3.6.3", "qrcode.react": "1.0.0", "query-string": "6.12.1", + "react": "16.13.1", "react-dom": "16.13.1", - "react-final-form-listeners": "^1.0.2", "react-final-form": "6.4.0", + "react-final-form-listeners": "^1.0.2", "react-ga": "^2.7.0", "react-hot-loader": "4.12.21", "react-qr-reader": "^2.2.1", @@ -192,16 +192,15 @@ "react-router-dom": "5.2.0", "react-scripts": "^3.4.1", "react-window": "^1.8.5", - "react": "16.13.1", "recompose": "^0.30.0", + "redux": "4.0.5", "redux-actions": "^2.6.5", "redux-thunk": "^2.3.0", - "redux": "4.0.5", "reselect": "^4.0.0", "semver": "7.3.2", "styled-components": "^5.0.1", - "truffle-contract": "4.0.31", - "web3": "1.2.7" + "truffle-contract": "4.0.31", + "web3": "1.2.8" }, "devDependencies": { "@testing-library/jest-dom": "^4.2.4", @@ -209,24 +208,24 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^25.2.1", "@types/node": "^13.11.0", - "@types/react-dom": "^16.9.6", "@types/react": "^16.9.32", + "@types/react-dom": "^16.9.6", "@typescript-eslint/eslint-plugin": "^2.34.0", - "@typescript-eslint/parser": "^2.34.0", - "autoprefixer": "9.7.6", + "@typescript-eslint/parser": "^2.34.0", + "autoprefixer": "9.7.6", "cross-env": "^7.0.2", - "dotenv-expand": "^5.1.0", "dotenv": "^8.2.0", + "dotenv-expand": "^5.1.0", + "electron": "7.1.8", "electron-builder": "22.2.0", "electron-notarize": "^0.2.1", - "electron": "7.1.8", + "eslint": "^6.8.0", "eslint-config-prettier": "6.11.0", "eslint-plugin-import": "2.20.2", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-react": "^7.18.3", "eslint-plugin-sort-destructure-keys": "1.3.4", - "eslint": "^6.8.0", "ethereumjs-abi": "0.6.8", "husky": "^4.2.2", "lint-staged": "10.2.2", @@ -234,7 +233,7 @@ "prettier": "2.0.5", "react-app-rewired": "^2.1.6", "truffle": "5.1.23", - "typescript": "~3.7.2" , - "wait-on": "5.0.0" + "typescript": "~3.7.2", + "wait-on": "5.0.0" } } diff --git a/src/components/forms/validator.ts b/src/components/forms/validator.ts index 93db7da9..8f9b95af 100644 --- a/src/components/forms/validator.ts +++ b/src/components/forms/validator.ts @@ -13,7 +13,19 @@ export const simpleMemoize = (fn) => { } } -export const required = (value?: string) => (value && value.trim() !== '' ? undefined : 'Required') +export const required = (value?: string) => { + const required = 'Required' + + if (!value) { + return required + } + + if (typeof value === 'string' && !value.trim().length) { + return required + } + + return undefined +} export const mustBeInteger = (value: string) => !Number.isInteger(Number(value)) || value.includes('.') ? 'Must be an integer' : undefined diff --git a/src/logic/contracts/generateBatchRequests.ts b/src/logic/contracts/generateBatchRequests.ts index a7d7c529..a898d70f 100644 --- a/src/logic/contracts/generateBatchRequests.ts +++ b/src/logic/contracts/generateBatchRequests.ts @@ -13,7 +13,7 @@ import { getWeb3 } from 'src/logic/wallets/getWeb3' */ const generateBatchRequests = ({ abi, address, batch, context, methods }: any): any => { const web3 = getWeb3() - const contractInstance = new web3.eth.Contract(abi, address) + const contractInstance: any = new web3.eth.Contract(abi, address) const localBatch = batch ? null : new web3.BatchRequest() const values = methods.map((methodObject) => { diff --git a/src/logic/safe/transactions/gasNew.ts b/src/logic/safe/transactions/gasNew.ts index 23460231..60d6a655 100644 --- a/src/logic/safe/transactions/gasNew.ts +++ b/src/logic/safe/transactions/gasNew.ts @@ -29,7 +29,7 @@ export const estimateTxGasCosts = async (safeAddress, to, data, tx?: any, preApp try { const web3 = getWeb3() const from = await getAccountFrom(web3) - const safeInstance = new web3.eth.Contract(GnosisSafeSol.abi as any, safeAddress) + const safeInstance: any = new web3.eth.Contract(GnosisSafeSol.abi as any, safeAddress) const nonce = await safeInstance.methods.nonce().call() const threshold = await safeInstance.methods.getThreshold().call() diff --git a/src/logic/safe/transactions/send.ts b/src/logic/safe/transactions/send.ts index 7d812792..3b372111 100644 --- a/src/logic/safe/transactions/send.ts +++ b/src/logic/safe/transactions/send.ts @@ -40,7 +40,7 @@ export const getApprovalTransaction = async ({ try { const web3 = getWeb3() - const contract = new web3.eth.Contract(GnosisSafeSol.abi as any, safeInstance.address) + const contract: any = new web3.eth.Contract(GnosisSafeSol.abi as any, safeInstance.address) return contract.methods.approveHash(txHash) } catch (err) { @@ -64,7 +64,7 @@ export const getExecutionTransaction = async ({ }) => { try { const web3 = getWeb3() - const contract = new web3.eth.Contract(GnosisSafeSol.abi as any, safeInstance.address) + const contract: any = new web3.eth.Contract(GnosisSafeSol.abi as any, safeInstance.address) return contract.methods.execTransaction( to, diff --git a/src/logic/tokens/utils/tokenHelpers.ts b/src/logic/tokens/utils/tokenHelpers.ts index e3a4d220..334d2ab3 100644 --- a/src/logic/tokens/utils/tokenHelpers.ts +++ b/src/logic/tokens/utils/tokenHelpers.ts @@ -59,7 +59,7 @@ export const isAddressAToken = async (tokenAddress) => { export const hasDecimalsMethod = async (address) => { try { const web3 = getWeb3() - const token = new web3.eth.Contract(ERC20Detailed.abi as any, address) + const token: any = new web3.eth.Contract(ERC20Detailed.abi as any, address) await token.methods.decimals().call() return true } catch (e) { diff --git a/src/logic/wallets/getWeb3.ts b/src/logic/wallets/getWeb3.ts index 2e9f566c..24549816 100644 --- a/src/logic/wallets/getWeb3.ts +++ b/src/logic/wallets/getWeb3.ts @@ -1,4 +1,3 @@ -import ENS from 'ethereum-ens' import Web3 from 'web3' import { sameAddress } from './ethAddresses' @@ -116,10 +115,9 @@ export const getProviderInfo = async (web3Provider, providerName = 'Wallet') => } } -export const getAddressFromENS = async (name) => { - const ens = new ENS(web3) - return await ens.resolver(name).addr() -} +export const getAddressFromENS = (name: string) => web3.eth.ens.getAddress(name) + +export const getContentFromENS = (name: string) => web3.eth.ens.getContenthash(name) export const setWeb3 = (provider) => { web3 = new Web3(provider) diff --git a/src/routes/safe/components/Apps/AddAppForm.tsx b/src/routes/safe/components/Apps/AddAppForm.tsx new file mode 100644 index 00000000..fd5f2609 --- /dev/null +++ b/src/routes/safe/components/Apps/AddAppForm.tsx @@ -0,0 +1,203 @@ +import { Checkbox, Text, TextField } from '@gnosis.pm/safe-react-components' +import memoize from 'lodash.memoize' +import React, { useState } from 'react' +import { FormSpy } from 'react-final-form' +import styled from 'styled-components' + +import Field from 'src/components/forms/Field' +import DebounceValidationField from 'src/components/forms/Field/DebounceValidationField' +import GnoForm from 'src/components/forms/GnoForm' +import { required } from 'src/components/forms/validator' +import Img from 'src/components/layout/Img' +import { getContentFromENS } from 'src/logic/wallets/getWeb3' +import appsIconSvg from 'src/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg' +import { isValid as isURLValid } from 'src/utils/url' + +import { getAppInfoFromUrl } from './utils' +import { SafeApp } from './types' + +const APP_INFO: SafeApp = { + id: undefined, + url: '', + name: '', + iconUrl: appsIconSvg, + error: false, +} + +const StyledText = styled(Text)` + margin-bottom: 19px; +` + +const StyledTextFileAppName = styled(TextField)` + && { + width: 335px; + } +` + +const AppInfo = styled.div` + margin: 36px 0 24px 0; + + img { + margin-right: 10px; + } +` + +const StyledCheckbox = styled(Checkbox)` + margin: 0; +` + +const uniqueAppValidator = memoize((appList, value) => { + const exists = appList.some((a) => { + try { + const currentUrl = new URL(a.url) + const newUrl = new URL(value) + return currentUrl.href === newUrl.href + } catch (error) { + return 'There was a problem trying to validate the URL existence.' + } + }) + return exists ? 'This app is already registered.' : undefined +}) + +const getIpfsLinkFromEns = memoize(async (name) => { + try { + const content = await getContentFromENS(name) + if (content && content.protocolType === 'ipfs') { + return `${process.env.REACT_APP_IPFS_GATEWAY}/${content.decoded}/` + } + } catch (error) { + console.error(error) + return undefined + } +}) + +const getUrlFromFormValue = memoize(async (value: string) => { + const isUrlValid = isURLValid(value) + let ensContent + if (!isUrlValid) { + ensContent = await getIpfsLinkFromEns(value) + } + + if (!isUrlValid && ensContent === undefined) { + return undefined + } + return isUrlValid ? value : ensContent +}) + +const curriedSafeAppValidator = memoize((appList) => async (value: string) => { + const url = await getUrlFromFormValue(value) + + if (!url) { + return 'Provide a valid url or ENS name.' + } + + const appExistsRes = uniqueAppValidator(appList, url) + if (appExistsRes) { + return appExistsRes + } + + const appInfo = await getAppInfoFromUrl(url) + if (appInfo.error) { + return 'This is not a valid Safe app.' + } +}) + +const composeValidatorsApps = (...validators: Function[]) => (value, values, meta) => { + if (!meta.modified) { + return + } + return validators.reduce((error, validator) => error || validator(value), undefined) +} + +type Props = { + formId: string + appList: Array + closeModal: () => void + onAppAdded: (app: SafeApp) => void + setIsSubmitDisabled: (status: boolean) => void +} + +const AddAppForm = ({ appList, formId, closeModal, onAppAdded, setIsSubmitDisabled }: Props) => { + const [appInfo, setAppInfo] = useState(APP_INFO) + const safeAppValidator = curriedSafeAppValidator(appList) + + const onFormStatusChange = async ({ pristine, valid, validating, values, errors }) => { + if (!pristine) { + setIsSubmitDisabled(validating || !valid) + } + + if (validating) { + return + } + + if (!values.appUrl || !values.appUrl.length || errors.appUrl) { + setAppInfo(APP_INFO) + return + } + + const url = await getUrlFromFormValue(values.appUrl) + const appInfo = await getAppInfoFromUrl(url) + setAppInfo({ ...appInfo }) + } + + const handleSubmit = () => { + closeModal() + onAppAdded(appInfo) + } + + return ( + + {() => ( + <> + Add custom app + + + + Token image + + + + + + + This app is not a Gnosis product and I agree to use this app
at my own risk. +

+ } + name="agreed" + type="checkbox" + validate={required} + /> + + )} +
+ ) +} + +export default AddAppForm diff --git a/src/routes/safe/components/Apps/ManageApps.tsx b/src/routes/safe/components/Apps/ManageApps.tsx index ecbbdb08..b8928516 100644 --- a/src/routes/safe/components/Apps/ManageApps.tsx +++ b/src/routes/safe/components/Apps/ManageApps.tsx @@ -1,166 +1,22 @@ -import { ButtonLink, Checkbox, ManageListModal, Text, TextField } from '@gnosis.pm/safe-react-components' +import { ButtonLink, ManageListModal } from '@gnosis.pm/safe-react-components' import React, { useState } from 'react' -import { FormSpy } from 'react-final-form' -import styled from 'styled-components' -import { getAppInfoFromUrl } from './utils' - -import Field from 'src/components/forms/Field' -import DebounceValidationField from 'src/components/forms/Field/DebounceValidationField' -import GnoForm from 'src/components/forms/GnoForm' -import { required } from 'src/components/forms/validator' -import Img from 'src/components/layout/Img' import appsIconSvg from 'src/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg' -import { isValid as isURLValid } from 'src/utils/url' +import AddAppFrom from './AddAppForm' +import { SafeApp } from './types' const FORM_ID = 'add-apps-form' -const StyledText = styled(Text)` - margin-bottom: 19px; -` - -const StyledTextFileAppName = styled(TextField)` - && { - width: 335px; - } -` - -const AppInfo = styled.div` - margin: 36px 0 24px 0; - - img { - margin-right: 10px; - } -` - -const StyledCheckbox = styled(Checkbox)` - margin: 0; -` -const APP_INFO = { iconUrl: appsIconSvg, name: '', error: false } - -const urlValidator = (value) => { - return isURLValid(value) ? undefined : 'Please, provide a valid url' +type Props = { + appList: Array + onAppAdded: (app: any) => void + onAppToggle: (appId: string, enabled: boolean) => void } -const composeValidatorsApps = (...validators) => (value, values, meta) => { - if (!meta.modified) { - return - } - return validators.reduce((error, validator) => error || validator(value), undefined) -} - -const ManageApps = ({ appList, onAppAdded, onAppToggle }) => { +const ManageApps = ({ appList, onAppAdded, onAppToggle }: Props) => { const [isOpen, setIsOpen] = useState(false) - - const [appInfo, setAppInfo] = useState(APP_INFO) const [isSubmitDisabled, setIsSubmitDisabled] = useState(true) - const onItemToggle = (itemId, checked) => { - onAppToggle(itemId, checked) - } - - const handleSubmit = () => { - setIsOpen(false) - onAppAdded(appInfo) - } - - const cleanAppInfo = () => setAppInfo(APP_INFO) - - const safeAppValidator = async (value) => { - const appInfo = await getAppInfoFromUrl(value) - - if (appInfo.error) { - setAppInfo(APP_INFO) - return 'This is not a valid Safe app.' - } - - setAppInfo({ ...appInfo }) - } - - const uniqueAppValidator = (value) => { - const exists = appList.find((a) => { - try { - const currentUrl = new URL(a.url) - const newUrl = new URL(value) - return currentUrl.href === newUrl.href - } catch (error) { - return 'There was a problem trying to validate the URL existence.' - } - }) - return exists ? 'This app is already registered.' : undefined - } - - const onFormStatusChange = ({ pristine, valid, validating }) => { - if (!pristine) { - setIsSubmitDisabled(validating || !valid || appInfo.error) - } - } - - const customRequiredValidator = (value) => { - if (!value || !value.length) { - setAppInfo(APP_INFO) - return 'Required' - } - } - - const getAddAppForm = () => { - return ( - - {() => ( - <> - Add custom app - - - - Token image - - - - - - - This app is not a Gnosis product and I agree to use this app
at my own risk. -

- } - name="agreed" - type="checkbox" - validate={required} - /> - - )} -
- ) - } - const onSubmitForm = () => { // This sucks, but it's the way the docs suggest // https://github.com/final-form/react-final-form/blob/master/docs/faq.md#via-documentgetelementbyid @@ -169,16 +25,17 @@ const ManageApps = ({ appList, onAppAdded, onAppToggle }) => { const toggleOpen = () => setIsOpen(!isOpen) - const closeModal = () => { - setIsOpen(false) - cleanAppInfo() - } + const closeModal = () => setIsOpen(false) const getItemList = () => appList.map((a) => { return { ...a, checked: !a.disabled } }) + const onItemToggle = (itemId, checked) => { + onAppToggle(itemId, checked) + } + const ButtonLinkAux: any = ButtonLink return ( @@ -190,7 +47,15 @@ const ManageApps = ({ appList, onAppAdded, onAppToggle }) => { + } isSubmitFormDisabled={isSubmitDisabled} itemList={getItemList()} onClose={closeModal} diff --git a/src/routes/safe/components/Apps/index.tsx b/src/routes/safe/components/Apps/index.tsx index 475db212..66ab85f1 100644 --- a/src/routes/safe/components/Apps/index.tsx +++ b/src/routes/safe/components/Apps/index.tsx @@ -21,6 +21,7 @@ import { } from 'src/routes/safe/store/selectors' import { loadFromStorage, saveToStorage } from 'src/utils/storage' import { isSameHref } from 'src/utils/url' +import { SafeApp } from './types' const APPS_STORAGE_KEY = 'APPS_STORAGE_KEY' const APPS_LEGAL_DISCLAIMER_STORAGE_KEY = 'APPS_LEGAL_DISCLAIMER_STORAGE_KEY' @@ -43,12 +44,13 @@ const operations = { } function Apps({ closeModal, closeSnackbar, enqueueSnackbar, openModal }) { - const [appList, setAppList] = useState([]) + const [appList, setAppList] = useState>([]) const [legalDisclaimerAccepted, setLegalDisclaimerAccepted] = useState(false) - const [selectedApp, setSelectedApp] = useState() + const [selectedApp, setSelectedApp] = useState() const [loading, setLoading] = useState(true) const [appIsLoading, setAppIsLoading] = useState(true) - const [iframeEl, setIframeEl] = useState(null) + const [iframeEl, setIframeEl] = useState(null) + const history = useHistory() const granted = useSelector(grantedSelector) const safeName = useSelector(safeNameSelector) @@ -145,7 +147,7 @@ function Apps({ closeModal, closeSnackbar, enqueueSnackbar, openModal }) { ) } - const onAppAdded = (app) => { + const onAppAdded = (app: SafeApp) => { const newAppList = [ { url: app.url, disabled: false }, ...appList.map((a) => ({ diff --git a/src/routes/safe/components/Apps/sendTransactions.ts b/src/routes/safe/components/Apps/sendTransactions.ts index 65db405f..5bbe4781 100644 --- a/src/routes/safe/components/Apps/sendTransactions.ts +++ b/src/routes/safe/components/Apps/sendTransactions.ts @@ -17,7 +17,7 @@ const multiSendAbi = [ const sendTransactions = (dispatch, safeAddress, txs, enqueueSnackbar, closeSnackbar, origin) => { const web3 = getWeb3() - const multiSend = new web3.eth.Contract(multiSendAbi as any, multiSendAddress) + const multiSend: any = new web3.eth.Contract(multiSendAbi as any, multiSendAddress) const joinedTxs = txs .map((tx) => diff --git a/src/routes/safe/components/Apps/types.d.ts b/src/routes/safe/components/Apps/types.d.ts new file mode 100644 index 00000000..635ba78f --- /dev/null +++ b/src/routes/safe/components/Apps/types.d.ts @@ -0,0 +1,8 @@ +export type SafeApp = { + id: string | undefined + url: string + name: string + iconUrl: string + disabled?: boolean + error: boolean +} diff --git a/src/routes/safe/components/Apps/utils.ts b/src/routes/safe/components/Apps/utils.ts index 322ca613..53f1a7c5 100644 --- a/src/routes/safe/components/Apps/utils.ts +++ b/src/routes/safe/components/Apps/utils.ts @@ -2,6 +2,8 @@ import axios from 'axios' import appsIconSvg from 'src/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg' +import { SafeApp } from './types' + const removeLastTrailingSlash = (url) => { if (url.substr(-1) === '/') { return url.substr(0, url.length - 1) @@ -10,7 +12,7 @@ const removeLastTrailingSlash = (url) => { } const gnosisAppsUrl = removeLastTrailingSlash(process.env.REACT_APP_GNOSIS_APPS_URL) -export const staticAppsList = [ +export const staticAppsList: Array<{ url: string; disabled: boolean }> = [ { url: `${gnosisAppsUrl}/compound`, disabled: false }, { url: `${gnosisAppsUrl}/aave`, disabled: false }, { url: `${gnosisAppsUrl}/pool-together`, disabled: false }, @@ -28,10 +30,10 @@ export const getAppInfoFromOrigin = (origin) => { } } -export const getAppInfoFromUrl = async (appUrl) => { +export const getAppInfoFromUrl = async (appUrl: string): Promise => { let res = { id: undefined, url: appUrl, name: 'unknown', iconUrl: appsIconSvg, error: true } - if (!appUrl) { + if (!appUrl.length) { return res } diff --git a/src/routes/safe/components/Balances/SendModal/screens/ContractInteraction/utils/index.ts b/src/routes/safe/components/Balances/SendModal/screens/ContractInteraction/utils/index.ts index 60f9cbc3..4fa20b0d 100644 --- a/src/routes/safe/components/Balances/SendModal/screens/ContractInteraction/utils/index.ts +++ b/src/routes/safe/components/Balances/SendModal/screens/ContractInteraction/utils/index.ts @@ -50,7 +50,7 @@ export const formMutators = { export const createTxObject = (method, contractAddress, values) => { const web3 = getWeb3() - const contract = new web3.eth.Contract([method], contractAddress) + const contract: any = new web3.eth.Contract([method], contractAddress) const { inputs, name } = method const args = inputs.map(({ type }, index) => values[`methodInput-${name}_${index}_${type}`]) diff --git a/yarn.lock b/yarn.lock index d47fc442..d437aa16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3918,7 +3918,7 @@ bluebird-lst@^1.0.9: dependencies: bluebird "^3.5.5" -bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.5: +bluebird@^3.5.0, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -6722,7 +6722,7 @@ eth-block-tracker@^4.2.0, eth-block-tracker@^4.4.1, eth-block-tracker@^4.4.2: pify "^3.0.0" safe-event-emitter "^1.0.1" -eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.0: +eth-ens-namehash@2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= @@ -6907,18 +6907,6 @@ ethereum-common@0.2.0: resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== -ethereum-ens@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/ethereum-ens/-/ethereum-ens-0.8.0.tgz#6d0f79acaa61fdbc87d2821779c4e550243d4c57" - integrity sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg== - dependencies: - bluebird "^3.4.7" - eth-ens-namehash "^2.0.0" - js-sha3 "^0.5.7" - pako "^1.0.4" - underscore "^1.8.3" - web3 "^1.0.0-beta.34" - ethereum-private-key-to-address@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/ethereum-private-key-to-address/-/ethereum-private-key-to-address-0.0.3.tgz#1f1dccaefd1198c2dcde55501f331a846bd0aad0" @@ -11935,7 +11923,7 @@ pad@^3.2.0: dependencies: wcwidth "^1.0.1" -pako@^1.0.4, pako@~1.0.5: +pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -16094,11 +16082,6 @@ underscore@1.9.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== -underscore@^1.8.3: - version "1.10.2" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.10.2.tgz#73d6aa3668f3188e4adb0f1943bd12cfd7efaaaf" - integrity sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg== - unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -16535,16 +16518,6 @@ web3-bzz@1.2.1: swarm-js "0.1.39" underscore "1.9.1" -web3-bzz@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.7.tgz#aa0f3d162f0777a5f35367dc5b70012dd1e129d0" - integrity sha512-iTIWBR+Z+Bn09WprtKm46LmyNOasg2lUn++AjXkBTB8UNxlUybxtza84yl2ETTZUs0zuFzdSSAEgbjhygG+9oA== - dependencies: - "@types/node" "^10.12.18" - got "9.6.0" - swarm-js "^0.1.40" - underscore "1.9.1" - web3-bzz@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.8.tgz#7ff2c2de362f82ae3825e48c70ec63b3aca2b8ef" @@ -16564,15 +16537,6 @@ web3-core-helpers@1.2.1: web3-eth-iban "1.2.1" web3-utils "1.2.1" -web3-core-helpers@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.7.tgz#522f859775ea0d15e7e40359c46d4efc5da92aee" - integrity sha512-bdU++9QATGeCetVrMp8pV97aQtVkN5oLBf/TWu/qumC6jK/YqrvLlBJLdwbz0QveU8zOSap6GCvJbqKvmmbV2A== - dependencies: - underscore "1.9.1" - web3-eth-iban "1.2.7" - web3-utils "1.2.7" - web3-core-helpers@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.8.tgz#86776d8f658b63bb630c84a314686661e599aa68" @@ -16593,17 +16557,6 @@ web3-core-method@1.2.1: web3-core-subscriptions "1.2.1" web3-utils "1.2.1" -web3-core-method@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.7.tgz#73fd80d2bf0765ff6efc454db49ac83d1769a45e" - integrity sha512-e1TI0QUnByDMbQ8QHwnjxfjKw0LIgVRY4TYrlPijET9ebqUJU1HCayn/BHIMpV6LKyR1fQj9EldWyT64wZQXkg== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.7" - web3-core-promievent "1.2.7" - web3-core-subscriptions "1.2.7" - web3-utils "1.2.7" - web3-core-method@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.8.tgz#f28a79935432aebfa019e4a50f9b6ae6c9ef4297" @@ -16623,13 +16576,6 @@ web3-core-promievent@1.2.1: any-promise "1.3.0" eventemitter3 "3.1.2" -web3-core-promievent@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.7.tgz#fc7fa489f4cf76a040800f3dfd4b45c51bd3a39f" - integrity sha512-jNmsM/czCeMGQqKKwM9/HZVTJVIF96hdMVNN/V9TGvp+EEE7vDhB4pUocDnc/QF9Z/5QFBCVmvNWttlRgZmU0A== - dependencies: - eventemitter3 "3.1.2" - web3-core-promievent@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.8.tgz#a93ca2a19cae8b60883412619e04e69e11804eb5" @@ -16648,17 +16594,6 @@ web3-core-requestmanager@1.2.1: web3-providers-ipc "1.2.1" web3-providers-ws "1.2.1" -web3-core-requestmanager@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.7.tgz#9da0efce898ead7004d4ac50f748f5131cfe4d79" - integrity sha512-HJb/txjHixu1dxIebiZQKBoJCaNu4gsh7mq/uj6Z/w6tIHbybL90s/7ADyMED353yyJ2tDWtYJqeMVAR+KtdaA== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.7" - web3-providers-http "1.2.7" - web3-providers-ipc "1.2.7" - web3-providers-ws "1.2.7" - web3-core-requestmanager@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.8.tgz#da7259e72a433858d04c59b999c5116bfb797c09" @@ -16679,15 +16614,6 @@ web3-core-subscriptions@1.2.1: underscore "1.9.1" web3-core-helpers "1.2.1" -web3-core-subscriptions@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.7.tgz#30c64aede03182832883b17c77e21cbb0933c86e" - integrity sha512-W/CzQYOUawdMDvkgA/fmLsnG5aMpbjrs78LZMbc0MFXLpH3ofqAgO2by4QZrrTShUUTeWS0ZuEkFFL/iFrSObw== - dependencies: - eventemitter3 "3.1.2" - underscore "1.9.1" - web3-core-helpers "1.2.7" - web3-core-subscriptions@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.8.tgz#50945498fb0bd655f842cbcc13873d96956aa93e" @@ -16707,19 +16633,6 @@ web3-core@1.2.1: web3-core-requestmanager "1.2.1" web3-utils "1.2.1" -web3-core@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.7.tgz#9248b04331e458c76263d758c51b0cc612953900" - integrity sha512-QA0MTae0gXcr3KHe3cQ4x56+Wh43ZKWfMwg1gfCc3NNxPRM1jJ8qudzyptCAUcxUGXWpDG8syLIn1APDz5J8BQ== - dependencies: - "@types/bn.js" "^4.11.4" - "@types/node" "^12.6.1" - bignumber.js "^9.0.0" - web3-core-helpers "1.2.7" - web3-core-method "1.2.7" - web3-core-requestmanager "1.2.7" - web3-utils "1.2.7" - web3-core@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.8.tgz#2a488bb11519b71e7738265329bddc00fc200dd3" @@ -16742,15 +16655,6 @@ web3-eth-abi@1.2.1: underscore "1.9.1" web3-utils "1.2.1" -web3-eth-abi@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.7.tgz#6f3471b578649fddd844a14d397a3dd430fc44a5" - integrity sha512-4FnlT1q+D0XBkxSMXlIb/eG337uQeMaUdtVQ4PZ3XzxqpcoDuMgXm4o+3NRxnWmr4AMm6QKjM+hcC7c0mBKcyg== - dependencies: - ethers "4.0.0-beta.3" - underscore "1.9.1" - web3-utils "1.2.7" - web3-eth-abi@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.8.tgz#7537138f3e5cd1ccf98233fa07f388aa8dc1fff1" @@ -16777,23 +16681,6 @@ web3-eth-accounts@1.2.1: web3-core-method "1.2.1" web3-utils "1.2.1" -web3-eth-accounts@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.7.tgz#087f55d04a01b815b93151aac2fc1677436b9c59" - integrity sha512-AE7QWi/iIQIjXwlAPtlMabm/OPFF0a1PhxT1EiTckpYNP8fYs6jW7lYxEtJPPJIKqfMjoi1xkEqTVR1YZQ88lg== - dependencies: - "@web3-js/scrypt-shim" "^0.1.0" - crypto-browserify "3.12.0" - eth-lib "^0.2.8" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - underscore "1.9.1" - uuid "3.3.2" - web3-core "1.2.7" - web3-core-helpers "1.2.7" - web3-core-method "1.2.7" - web3-utils "1.2.7" - web3-eth-accounts@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.8.tgz#e63afc6d4902f2beb0cf60e6b755c86fa5b5ccd7" @@ -16825,21 +16712,6 @@ web3-eth-contract@1.2.1: web3-eth-abi "1.2.1" web3-utils "1.2.1" -web3-eth-contract@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.7.tgz#13d7f6003d6221f9a5fd61c2d3b5d039477c9674" - integrity sha512-uW23Y0iL7XroRNbf9fWZ1N6OYhEYTJX8gTuYASuRnpYrISN5QGiQML6pq/NCzqypR1bl5E0fuINZQSK/xefIVw== - dependencies: - "@types/bn.js" "^4.11.4" - underscore "1.9.1" - web3-core "1.2.7" - web3-core-helpers "1.2.7" - web3-core-method "1.2.7" - web3-core-promievent "1.2.7" - web3-core-subscriptions "1.2.7" - web3-eth-abi "1.2.7" - web3-utils "1.2.7" - web3-eth-contract@1.2.8, web3-eth-contract@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.8.tgz#ff75920ac698a70781edcebbf75287a6d0f14499" @@ -16869,20 +16741,6 @@ web3-eth-ens@1.2.1: web3-eth-contract "1.2.1" web3-utils "1.2.1" -web3-eth-ens@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.7.tgz#0bfa7d4b6c7753abbb31a2eb01a364b538f4c860" - integrity sha512-SPRnvUNWQ0CnnTDBteGIJkvFWEizJcAHlVsrFLICwcwFZu+appjX1UOaoGu2h3GXWtc/XZlu7B451Gi+Os2cTg== - dependencies: - eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.2.7" - web3-core-helpers "1.2.7" - web3-core-promievent "1.2.7" - web3-eth-abi "1.2.7" - web3-eth-contract "1.2.7" - web3-utils "1.2.7" - web3-eth-ens@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.8.tgz#247daddfdbf7533adb0f45cd2f75c75e52f7e678" @@ -16906,14 +16764,6 @@ web3-eth-iban@1.2.1: bn.js "4.11.8" web3-utils "1.2.1" -web3-eth-iban@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.7.tgz#832809c28586be3c667a713b77a2bcba11b7970f" - integrity sha512-2NrClz1PoQ3nSJBd+91ylCOVga9qbTxjRofq/oSCoHVAEvz3WZyttx9k5DC+0rWqwJF1h69ufFvdHAAlmN/4lg== - dependencies: - bn.js "4.11.8" - web3-utils "1.2.7" - web3-eth-iban@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.8.tgz#414e80a7fb2d1ea16490bc2c8fc29a996aec5612" @@ -16933,18 +16783,6 @@ web3-eth-personal@1.2.1: web3-net "1.2.1" web3-utils "1.2.1" -web3-eth-personal@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.7.tgz#322cc2b14c37737b21772a53e4185686a04bf9be" - integrity sha512-2OAa1Spz0uB29dwCM8+1y0So7E47A4gKznjBEwXIYEcUIsvwT5X7ofFhC2XxyRpqlIWZSQAxRSSJFyupRRXzyw== - dependencies: - "@types/node" "^12.6.1" - web3-core "1.2.7" - web3-core-helpers "1.2.7" - web3-core-method "1.2.7" - web3-net "1.2.7" - web3-utils "1.2.7" - web3-eth-personal@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.8.tgz#8ebb27210b4c9c9555a30c5bb2ce8db12f84cd24" @@ -16976,25 +16814,6 @@ web3-eth@1.2.1: web3-net "1.2.1" web3-utils "1.2.1" -web3-eth@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.7.tgz#9427daefd3641200679c2946f77fc184dbfb5b4c" - integrity sha512-ljLd0oB4IjWkzFGVan4HkYhJXhSXgn9iaSaxdJixKGntZPgWMJfxeA+uLwTrlxrWzhvy4f+39WnT7wCh5e9TGg== - dependencies: - underscore "1.9.1" - web3-core "1.2.7" - web3-core-helpers "1.2.7" - web3-core-method "1.2.7" - web3-core-subscriptions "1.2.7" - web3-eth-abi "1.2.7" - web3-eth-accounts "1.2.7" - web3-eth-contract "1.2.7" - web3-eth-ens "1.2.7" - web3-eth-iban "1.2.7" - web3-eth-personal "1.2.7" - web3-net "1.2.7" - web3-utils "1.2.7" - web3-eth@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.8.tgz#cf6a16fae4d7c12b90cfb6ef570cb1a2acc34c1b" @@ -17023,15 +16842,6 @@ web3-net@1.2.1: web3-core-method "1.2.1" web3-utils "1.2.1" -web3-net@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.7.tgz#c355621a8769c9c1a967c801e7db90c92a0e3808" - integrity sha512-j9qeZrS1FNyCeA0BfdLojkxOZQz3FKa1DJI+Dw9fEVhZS68vLOFANu2RB96gR9BoPHo5+k5D3NsKOoxt1gw3Gg== - dependencies: - web3-core "1.2.7" - web3-core-method "1.2.7" - web3-utils "1.2.7" - web3-net@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.8.tgz#582fc2d4ba32c2e5c7761624e4be7c5434142d66" @@ -17130,14 +16940,6 @@ web3-providers-http@1.2.1: web3-core-helpers "1.2.1" xhr2-cookies "1.1.0" -web3-providers-http@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.7.tgz#31eb15390c103169b3d7d31bdb1ccae9e3f1629d" - integrity sha512-vazGx5onuH/zogrwkUaLFJwFcJ6CckP65VFSHoiV+GTQdkOqgoDIha7StKkslvDz4XJ2FuY/zOZHbtuOYeltXQ== - dependencies: - web3-core-helpers "1.2.7" - xhr2-cookies "1.1.0" - web3-providers-http@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.8.tgz#cd7fc4d49df6980b5dd0fb1b5a808bc4b6a0069d" @@ -17155,15 +16957,6 @@ web3-providers-ipc@1.2.1: underscore "1.9.1" web3-core-helpers "1.2.1" -web3-providers-ipc@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.7.tgz#4e6716e8723d431df3d6bfa1acd2f7c04e7071ad" - integrity sha512-/zc0y724H2zbkV4UbGGMhsEiLfafjagIzfrsWZnyTZUlSB0OGRmmFm2EkLJAgtXrLiodaHHyXKM0vB8S24bxdA== - dependencies: - oboe "2.1.4" - underscore "1.9.1" - web3-core-helpers "1.2.7" - web3-providers-ipc@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.8.tgz#47be918ddd077999aa14703169b76c807f45d894" @@ -17182,16 +16975,6 @@ web3-providers-ws@1.2.1: web3-core-helpers "1.2.1" websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" -web3-providers-ws@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.7.tgz#95b1cc5dc25e9b9d6630d6754f9354313b62f532" - integrity sha512-b5XzqDpRkNVe6MFs5K6iqOEyjQikHtg3KuU2/ClCDV37hm0WN4xCRVMC0LwegulbDXZej3zT9+1CYzGaGFREzA== - dependencies: - "@web3-js/websocket" "^1.0.29" - eventemitter3 "^4.0.0" - underscore "1.9.1" - web3-core-helpers "1.2.7" - web3-providers-ws@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.8.tgz#9e6454edc82d753d398c8d1e044632c234434a46" @@ -17212,16 +16995,6 @@ web3-shh@1.2.1: web3-core-subscriptions "1.2.1" web3-net "1.2.1" -web3-shh@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.7.tgz#5382c7bc2f39539eb2841c4576d23ade25720461" - integrity sha512-f6PAgcpG0ZAo98KqCmeHoDEx5qzm3d5plet18DkT4U6WIeYowKdec8vZaLPRR7c2XreXFJ2gQf45CB7oqR7U/w== - dependencies: - web3-core "1.2.7" - web3-core-method "1.2.7" - web3-core-subscriptions "1.2.7" - web3-net "1.2.7" - web3-shh@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.8.tgz#5162d9d13bc6838d390df1cd39e5f87235c1c2ae" @@ -17245,20 +17018,6 @@ web3-utils@1.2.1: underscore "1.9.1" utf8 "3.0.0" -web3-utils@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.7.tgz#b68e232917e4376f81cf38ef79878e5903d18e93" - integrity sha512-FBh/CPJND+eiPeUF9KVbTyTZtXNWxPWtByBaWS6e2x4ACazPX711EeNaZaChIOGSLGe6se2n7kg6wnawe/MjuQ== - dependencies: - bn.js "4.11.8" - eth-lib "0.2.7" - ethereum-bloom-filters "^1.0.6" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - underscore "1.9.1" - utf8 "3.0.0" - web3-utils@1.2.8, web3-utils@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.8.tgz#5321d91715cd4c0869005705a33c4c042a532b18" @@ -17286,31 +17045,7 @@ web3@1.2.1: web3-shh "1.2.1" web3-utils "1.2.1" -web3@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.7.tgz#fcb83571036c1c6f475bc984785982a444e8d78e" - integrity sha512-jAAJHMfUlTps+jH2li1ckDFEpPrEEriU/ubegSTGRl3KRdNhEqT93+3kd7FHJTn3NgjcyURo2+f7Da1YcZL8Mw== - dependencies: - web3-bzz "1.2.7" - web3-core "1.2.7" - web3-eth "1.2.7" - web3-eth-personal "1.2.7" - web3-net "1.2.7" - web3-shh "1.2.7" - web3-utils "1.2.7" - -web3@^0.20.7: - version "0.20.7" - resolved "https://registry.yarnpkg.com/web3/-/web3-0.20.7.tgz#1605e6d81399ed6f85a471a4f3da0c8be57df2f7" - integrity sha512-VU6/DSUX93d1fCzBz7WP/SGCQizO1rKZi4Px9j/3yRyfssHyFcZamMw2/sj4E8TlfMXONvZLoforR8B4bRoyTQ== - dependencies: - bignumber.js "git+https://github.com/frozeman/bignumber.js-nolookahead.git" - crypto-js "^3.1.4" - utf8 "^2.1.1" - xhr2-cookies "^1.1.0" - xmlhttprequest "*" - -web3@^1.0.0-beta.34: +web3@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.8.tgz#20b24baa769e0224a708ef5bf196a5b83d19540b" integrity sha512-rXUn16VKxn2aIe9v0KX+bSm2JXdq/Vnj3lZ0Rub2Q5YUSycHdCBaDtJRukl/jB5ygAdyr5/cUwvJzhNDJSYsGw== @@ -17323,6 +17058,17 @@ web3@^1.0.0-beta.34: web3-shh "1.2.8" web3-utils "1.2.8" +web3@^0.20.7: + version "0.20.7" + resolved "https://registry.yarnpkg.com/web3/-/web3-0.20.7.tgz#1605e6d81399ed6f85a471a4f3da0c8be57df2f7" + integrity sha512-VU6/DSUX93d1fCzBz7WP/SGCQizO1rKZi4Px9j/3yRyfssHyFcZamMw2/sj4E8TlfMXONvZLoforR8B4bRoyTQ== + dependencies: + bignumber.js "git+https://github.com/frozeman/bignumber.js-nolookahead.git" + crypto-js "^3.1.4" + utf8 "^2.1.1" + xhr2-cookies "^1.1.0" + xmlhttprequest "*" + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"