diff --git a/contracts/package.json b/contracts/package.json index b719ea5e7..b7e1fc620 100755 --- a/contracts/package.json +++ b/contracts/package.json @@ -19,7 +19,7 @@ "devDependencies": { "ethers": "^5.5.3", "prettier": "^2.3.0", - "synthetix": "^2.74.1", + "synthetix": "^2.75.2", "typescript": "^4.4.2" } } diff --git a/package.json b/package.json index c29afe8bb..9722580cb 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "typescript": "^4.4.2" }, "resolutions": { - "ethers": "^5.5.3" + "ethers": "^5.5.3", + "@ethersproject/abi": "^5.6.4" }, "husky": { "hooks": { diff --git a/packages/contracts-interface/__tests__/index.test.ts b/packages/contracts-interface/__tests__/index.test.ts index 190d01823..838225fef 100644 --- a/packages/contracts-interface/__tests__/index.test.ts +++ b/packages/contracts-interface/__tests__/index.test.ts @@ -8,7 +8,7 @@ describe('@synthetixio/js tests', () => { let snxjs: SynthetixJS; beforeAll(() => { - snxjs = synthetix({ network: NetworkNameById[42] }); + snxjs = synthetix({ network: NetworkNameById[5] }); }); test('should return contracts', () => { @@ -17,7 +17,7 @@ describe('@synthetixio/js tests', () => { test('should return different contracts for the OVM', () => { const snxjsGoerli = synthetix({ network: NetworkNameById[5] }); - const snxjsGoerliOvm = synthetix({ network: NetworkNameById[42] }); + const snxjsGoerliOvm = synthetix({ network: NetworkNameById[420] }); const synthetixContractGoerli = snxjsGoerli.contracts['Synthetix']; const synthetixContractGoerliOvm = snxjsGoerliOvm.contracts['Synthetix']; expect(synthetixContractGoerli.address).not.toEqual(synthetixContractGoerliOvm.address); @@ -27,8 +27,8 @@ describe('@synthetixio/js tests', () => { const synthetixContract = snxjs.contracts['Synthetix']; const sUSDContract = snxjs.contracts['SynthsUSD']; const sETHContract = snxjs.contracts['SynthsETH']; - expect(synthetixContract.address).toEqual(snxjs.targets.ProxyERC20.address); - expect(sUSDContract.address).toEqual(snxjs.targets.ProxyERC20sUSD.address); + expect(synthetixContract.address).toEqual(snxjs.targets.ProxySynthetix.address); + expect(sUSDContract.address).toEqual(snxjs.targets.ProxysUSD.address); expect(sETHContract.address).toEqual(snxjs.targets.ProxysETH.address); }); @@ -36,8 +36,10 @@ describe('@synthetixio/js tests', () => { const snxjsGoerliOvm = synthetix({ network: NetworkNameById[5], useOvm: true }); const synthetixContractGoerliOvm = snxjsGoerliOvm.contracts['Synthetix']; const sUSDContractGoerliOvm = snxjsGoerliOvm.contracts['SynthsUSD']; - expect(synthetixContractGoerliOvm.address).toEqual(snxjsGoerliOvm.targets.ProxyERC20.address); - expect(sUSDContractGoerliOvm.address).toEqual(snxjsGoerliOvm.targets.ProxyERC20sUSD.address); + expect(synthetixContractGoerliOvm.address).toEqual( + snxjsGoerliOvm.targets.ProxySynthetix.address + ); + expect(sUSDContractGoerliOvm.address).toEqual(snxjsGoerliOvm.targets.ProxysUSD.address); }); test('should return the ethers object', () => { @@ -46,12 +48,19 @@ describe('@synthetixio/js tests', () => { test('should include the supported networks', () => { expect(snxjs.networkToChainId[NetworkNameById[1]]).toBe(NetworkIdByName.mainnet.toString()); - expect(snxjs.networkToChainId[NetworkNameById[42]]).toBe(NetworkIdByName.kovan.toString()); + expect(snxjs.networkToChainId[NetworkNameById[10]]).toBe( + NetworkIdByName['mainnet-ovm'].toString() + ); + + expect(snxjs.networkToChainId[NetworkNameById[420]]).toBe( + NetworkIdByName['goerli-ovm'].toString() + ); + expect(snxjs.networkToChainId[NetworkNameById[5]]).toBe(NetworkIdByName.goerli.toString()); }); test('should include the current network', () => { - expect(snxjs.network.name).toBe(NetworkNameById[42]); - expect(snxjs.network.id).toBe(NetworkIdByName.kovan.toString()); + expect(snxjs.network.name).toBe(NetworkNameById[5]); + expect(snxjs.network.id).toBe(NetworkIdByName.goerli.toString()); }); test('should return users', () => { diff --git a/packages/contracts-interface/package.json b/packages/contracts-interface/package.json index 96f1b7ea9..c7b51451a 100644 --- a/packages/contracts-interface/package.json +++ b/packages/contracts-interface/package.json @@ -38,7 +38,7 @@ "dependencies": { "@synthetixio/contracts": "workspace:*", "ethers": "^5.5.3", - "synthetix": "^2.74.1" + "synthetix": "^2.75.2" }, "devDependencies": { "@babel/core": "^7.11.0", diff --git a/packages/contracts-interface/src/index.ts b/packages/contracts-interface/src/index.ts index e3d7e489e..10c72f9ac 100644 --- a/packages/contracts-interface/src/index.ts +++ b/packages/contracts-interface/src/index.ts @@ -108,9 +108,7 @@ const getSynthetixContracts = ( return Object.values(targets) .map((target) => { if (target.name === 'Synthetix') { - target.address = targets.ProxyERC20.address; - } else if (target.name === 'SynthsUSD') { - target.address = targets.ProxyERC20sUSD.address; + target.address = targets.ProxySynthetix.address; } else if (target.name === 'FeePool') { target.address = targets.ProxyFeePool.address; } else if (target.name.match(/Synth(s|i)[a-zA-Z]+$/)) { diff --git a/packages/contracts-interface/src/synthetix.d.ts b/packages/contracts-interface/src/synthetix.d.ts index 471a49315..e1e39e39d 100644 --- a/packages/contracts-interface/src/synthetix.d.ts +++ b/packages/contracts-interface/src/synthetix.d.ts @@ -105,6 +105,11 @@ declare module 'synthetix' { fork: false, network: 'goerli', }, + 420: { + useOvm: true, + fork: false, + network: 'goerli', + }, 10: { useOvm: true, fork: false, @@ -128,7 +133,7 @@ declare module 'synthetix' { '-1': { useOvm: true, fork: false, - network: 'goerli', + network: 'invalid', }, } as const; export const networkToChainId = { @@ -138,7 +143,7 @@ declare module 'synthetix' { kovan: 42, 'kovan-ovm': 69, 'mainnet-fork': 31337, - 'goerli-ovm': '-1', + 'goerli-ovm': 420, } as const; // eslint-disable-next-line export function getSynths(arg: { network: NetworkName; useOvm?: boolean }): any; // Note contract interface will generate enums for this and return the correct type to consumers diff --git a/packages/contracts-interface/src/types.ts b/packages/contracts-interface/src/types.ts index eba49dd63..d9757d271 100644 --- a/packages/contracts-interface/src/types.ts +++ b/packages/contracts-interface/src/types.ts @@ -17,6 +17,7 @@ import { Synths as OptimismSynths } from '@synthetixio/contracts/build/mainnet-o export const NetworkIdByName = { mainnet: 1, goerli: 5, + 'goerli-ovm': 420, 'mainnet-ovm': 10, kovan: 42, 'kovan-ovm': 69, @@ -29,6 +30,7 @@ export const NetworkNameById = { 42: 'kovan', 10: 'mainnet-ovm', 69: 'kovan-ovm', + 420: 'goerli-ovm', 31337: 'mainnet-fork', } as const; diff --git a/packages/optimism-networks/__tests__/switch-to-l1.test.ts b/packages/optimism-networks/__tests__/switch-to-l1.test.ts index a2255a674..2baee6553 100644 --- a/packages/optimism-networks/__tests__/switch-to-l1.test.ts +++ b/packages/optimism-networks/__tests__/switch-to-l1.test.ts @@ -36,6 +36,23 @@ describe('switchToL1', () => { params: [{ chainId: '0x2a' }], }); }); + test('Switch to gorli when optimism gorli is selected', async () => { + const requestMock = jest.fn().mockResolvedValue(undefined); + const arg = { + ethereum: { + isMetaMask: true, + request: requestMock, + chainId: '0x45', + }, + } as any; + + await switchToL1(arg); + expect(requestMock).toBeCalledTimes(1); + expect(requestMock).toHaveBeenCalledWith({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x2a' }], + }); + }); test('Switch to mainnet when unsupported network selected', async () => { const requestMock = jest.fn().mockResolvedValue(undefined); const arg = { diff --git a/packages/optimism-networks/__tests__/switch-to-l2.test.ts b/packages/optimism-networks/__tests__/switch-to-l2.test.ts index f77c88735..5f23f2ca6 100644 --- a/packages/optimism-networks/__tests__/switch-to-l2.test.ts +++ b/packages/optimism-networks/__tests__/switch-to-l2.test.ts @@ -37,6 +37,23 @@ describe('switchToL2', () => { params: [{ chainId: '0x45' }], }); }); + test('Switch to Optimism Goerli when Goerli selected ', async () => { + const requestMock = jest.fn().mockResolvedValue(undefined); + const deps = { + ethereum: { + isMetaMask: true, + request: requestMock, + chainId: '0x5', + }, + } as any; + + await switchToL2(deps); + expect(requestMock).toBeCalledTimes(1); + expect(requestMock).toHaveBeenCalledWith({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x1a4' }], + }); + }); test('Switch to Optimism mainnet when unsupported network selected ', async () => { const requestMock = jest.fn().mockResolvedValue(undefined); const deps = { @@ -89,7 +106,7 @@ describe('switchToL2', () => { ], }); }); - test('switchToL2 adds optimism kovan network when needed', async () => { + test('switchToL2 adds optimism gorli network when needed', async () => { const requestMock = jest .fn() .mockRejectedValueOnce({ code: METAMASK_MISSING_NETWORK_ERROR_CODE }) // network missing in metamask @@ -98,7 +115,7 @@ describe('switchToL2', () => { ethereum: { isMetaMask: true, request: requestMock, - chainId: '0x2a', + chainId: '5', }, } as any; await switchToL2(deps); @@ -106,20 +123,20 @@ describe('switchToL2', () => { expect(requestMock).toBeCalledTimes(2); expect(requestMock).toHaveBeenNthCalledWith(1, { method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x45' }], + params: [{ chainId: '0x1a4' }], }); expect(requestMock).toHaveBeenNthCalledWith(2, { method: 'wallet_addEthereumChain', params: [ { - blockExplorerUrls: ['https://kovan-optimistic.etherscan.io'], - chainId: '0x45', - chainName: 'Optimism Kovan', + blockExplorerUrls: ['https://goerli-optimistic.etherscan.io'], + chainId: '0x1a4', + chainName: 'Optimism Goerli', iconUrls: [ 'https://optimism.io/images/metamask_icon.svg', 'https://optimism.io/images/metamask_icon.png', ], - rpcUrls: ['https://kovan.optimism.io'], + rpcUrls: ['https://goerli.optimism.io/'], }, ], }); diff --git a/packages/optimism-networks/src/constants.ts b/packages/optimism-networks/src/constants.ts index c9f34924c..a6ad16cba 100644 --- a/packages/optimism-networks/src/constants.ts +++ b/packages/optimism-networks/src/constants.ts @@ -7,13 +7,13 @@ export const DEFAULT_LAYER2_NETWORK = 10; export const L1_TO_L2_NETWORK_MAPPER: NetworkMapper = { 1: 10, 42: 69, - 31337: 420, + 5: 420, }; export const L2_TO_L1_NETWORK_MAPPER: NetworkMapper = { 10: 1, 69: 42, - 420: 31337, + 420: 5, }; export const OPTIMISM_NETWORKS: Record<number, OptimismNetwork> = { @@ -27,11 +27,12 @@ export const OPTIMISM_NETWORKS: Record<number, OptimismNetwork> = { 'https://optimism.io/images/metamask_icon.png', ], }, - 69: { - chainId: '0x45', - chainName: 'Optimism Kovan', - rpcUrls: ['https://kovan.optimism.io'], - blockExplorerUrls: ['https://kovan-optimistic.etherscan.io'], + + 420: { + chainId: '0x1a4', + chainName: 'Optimism Goerli', + rpcUrls: ['https://goerli.optimism.io/'], + blockExplorerUrls: ['https://goerli-optimistic.etherscan.io'], iconUrls: [ 'https://optimism.io/images/metamask_icon.svg', 'https://optimism.io/images/metamask_icon.png', diff --git a/packages/optimism-networks/src/types.ts b/packages/optimism-networks/src/types.ts index 73f77c204..327e00768 100644 --- a/packages/optimism-networks/src/types.ts +++ b/packages/optimism-networks/src/types.ts @@ -10,6 +10,7 @@ export type OptimismNetwork = { export enum NetworkId { Mainnet = 10, Kovan = 69, + Goerli = 420, } export type OptimismWatcher = { diff --git a/packages/queries/README.md b/packages/queries/README.md index 1ff7368f3..78c616124 100644 --- a/packages/queries/README.md +++ b/packages/queries/README.md @@ -5,11 +5,13 @@ This library provides React hooks for retrieving data from the [Synthetix subgra ## Usage Install `react-query` and `@synthetixio/queries`. + ``` npm i react-query @synthetixio/queries ``` Add `QueryClientProvider` and `SynthetixQueryContextProvider` in a wrapping component. + ``` import { createQueryContext, @@ -23,7 +25,7 @@ export default function MyApp() { <QueryClientProvider client={queryClient}> <SynthetixQueryContextProvider value={createQueryContext({ - networkId: 1 // Options: 1 (Mainnet), 10 (Optimism), 42 (Kovan), and 69 (Optimism Kovan) + networkId: 1 // Options: 1 (Mainnet), 10 (Optimism), 42 (Kovan), 69 (Optimism Kovan),42 (Goerli) and 69 (Optimism Goerli) })} > <Component /> @@ -33,7 +35,8 @@ export default function MyApp() { } ``` -In a child component, import hooks from the `useSynthetixQueries()` function. +In a child component, import hooks from the `useSynthetixQueries()` function. + ``` import useSynthetixQueries from '@synthetixio/queries' @@ -60,7 +63,7 @@ export default function Component() { ### Subgraph Queries -`useSynthetixQueries().subgraph` contains two methods for [each entity on the Synthetix Subgraph](https://github.com/Synthetixio/synthetix-subgraph/blob/main/subgraphs/main.graphql), one for querying individual entities and another for groups. They are generated by the [codegen-graph-ts](https://github.com/dbeal-eth/codegen-graph-ts) library. For example, you can retrieve the daily candles for any synth with the `useSynthetixQueries().subgraph.useGetDailyCandleById()` and `useSynthetixQueries().subgraph.useGetDailyCandles()` hooks. +`useSynthetixQueries().subgraph` contains two methods for [each entity on the Synthetix Subgraph](https://github.com/Synthetixio/synthetix-subgraph/blob/main/subgraphs/main.graphql), one for querying individual entities and another for groups. They are generated by the [codegen-graph-ts](https://github.com/dbeal-eth/codegen-graph-ts) library. For example, you can retrieve the daily candles for any synth with the `useSynthetixQueries().subgraph.useGetDailyCandleById()` and `useSynthetixQueries().subgraph.useGetDailyCandles()` hooks. _Note that IDs follow different conventions depending on the entity. See the comments in [the GraphQL file](https://github.com/Synthetixio/synthetix-subgraph/blob/main/subgraphs/main.graphql) or [the implementation of the mappings](https://github.com/Synthetixio/synthetix-subgraph/tree/main/src) for more information._ diff --git a/packages/queries/__tests__/.eslintrc b/packages/queries/__tests__/.eslintrc new file mode 100644 index 000000000..11218ee86 --- /dev/null +++ b/packages/queries/__tests__/.eslintrc @@ -0,0 +1,7 @@ +{ + "rules": { + "no-console": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-non-null-assertion": "off" + } +} diff --git a/packages/queries/__tests__/network.test.ts b/packages/queries/__tests__/network.test.ts index 135116926..9a7047117 100644 --- a/packages/queries/__tests__/network.test.ts +++ b/packages/queries/__tests__/network.test.ts @@ -2,8 +2,6 @@ import { NetworkIdByName } from '@synthetixio/contracts-interface'; import { wei } from '@synthetixio/wei'; import { renderHook } from '@testing-library/react-hooks'; import { BigNumber } from '@ethersproject/bignumber'; -import { JsonRpcProvider } from '@ethersproject/providers'; -import { set } from 'lodash'; import useEthGasPriceQuery, { computeGasFee } from '../src/queries/network/useEthGasPriceQuery'; import { getFakeQueryContext, getWrapper } from '../testUtils'; @@ -15,9 +13,7 @@ describe('@synthetixio/queries network useEthGasPriceQuery', () => { // set to 0.015 gwei const defaultGasPrice = wei(0.015, 9).toBN(); //mock provider - set(ctx.provider as JsonRpcProvider, 'getGasPrice', async () => - Promise.resolve(defaultGasPrice) - ); + ctx.provider!.getGasPrice = jest.fn().mockResolvedValue(defaultGasPrice); const { result, waitFor } = renderHook(() => useEthGasPriceQuery(ctx), { wrapper }); @@ -37,9 +33,7 @@ describe('@synthetixio/queries network useEthGasPriceQuery', () => { // set to 0.015 gwei const defaultGasPrice = wei(0.015, 9).toBN(); //mock provider - set(ctx.provider as JsonRpcProvider, 'getGasPrice', async () => - Promise.resolve(defaultGasPrice) - ); + ctx.provider!.getGasPrice = jest.fn().mockResolvedValue(defaultGasPrice); const { result, waitFor } = renderHook(() => useEthGasPriceQuery(ctx), { wrapper }); @@ -51,6 +45,25 @@ describe('@synthetixio/queries network useEthGasPriceQuery', () => { average: { gasPrice: defaultGasPrice }, }); }); + test('Should query getGasPrice from provider if network is Goerli', async () => { + const ctx = getFakeQueryContext(); + ctx.networkId = NetworkIdByName.kovan; + const wrapper = getWrapper(); + // set to 0.015 gwei + const defaultGasPrice = wei(0.015, 9).toBN(); + //mock provider + + ctx.provider!.getGasPrice = jest.fn().mockResolvedValue(defaultGasPrice); + const { result, waitFor } = renderHook(() => useEthGasPriceQuery(ctx), { wrapper }); + + await waitFor(() => result.current.isSuccess); + + expect(result.current.data).toEqual({ + fastest: { gasPrice: defaultGasPrice }, + fast: { gasPrice: defaultGasPrice }, + average: { gasPrice: defaultGasPrice }, + }); + }); test('Should throw an error if getGasPrice fails', async () => { const ctx = getFakeQueryContext(); @@ -88,9 +101,7 @@ describe('@synthetixio/queries network useEthGasPriceQuery', () => { // set to 100 gwei const defaultBaseFeePerGas = wei(100, 9).toBN(); //mock provider - set(ctx.provider as JsonRpcProvider, 'getBlock', async () => - Promise.resolve({ baseFeePerGas: defaultBaseFeePerGas }) - ); + ctx.provider!.getBlock = jest.fn().mockResolvedValue({ baseFeePerGas: defaultBaseFeePerGas }); const { result, waitFor } = renderHook(() => useEthGasPriceQuery(ctx), { wrapper }); diff --git a/packages/queries/src/constants.ts b/packages/queries/src/constants.ts index 041300e1e..16c707708 100644 --- a/packages/queries/src/constants.ts +++ b/packages/queries/src/constants.ts @@ -72,6 +72,20 @@ export const DEFAULT_SUBGRAPH_ENDPOINTS: { [networkId: number]: SubgraphEndpoint issuance: 'https://api.thegraph.com/subgraphs/name/synthetixio-team/optimism-issuance', subgraph: 'https://api.thegraph.com/subgraphs/name/synthetixio-team/optimism-main', }, + 5: { + // using main for everything since it includes exchanges, exchanger and issuance + exchanges: 'https://api.thegraph.com/subgraphs/name/bachstatter/goerli-main', + exchanger: 'https://api.thegraph.com/subgraphs/name/bachstatter/goerli-main', + issuance: 'https://api.thegraph.com/subgraphs/name/bachstatter/goerli-main', + subgraph: 'https://api.thegraph.com/subgraphs/name/bachstatter/goerli-main', + }, + 420: { + // The graph doesn't support goerli-optimism (so just using goerli for now) + exchanges: 'https://api.thegraph.com/subgraphs/name/bachstatter/goerli-main', + exchanger: 'https://api.thegraph.com/subgraphs/name/bachstatter/goerli-main', + issuance: 'https://api.thegraph.com/subgraphs/name/bachstatter/goerli-main', + subgraph: 'https://api.thegraph.com/subgraphs/name/bachstatter/goerli-main', + }, 42: { exchanges: 'https://api.thegraph.com/subgraphs/name/synthetixio-team/kovan-exchanges', diff --git a/packages/queries/src/mutations/useEVMTxn.ts b/packages/queries/src/mutations/useEVMTxn.ts index 436999f67..7bc13e62a 100644 --- a/packages/queries/src/mutations/useEVMTxn.ts +++ b/packages/queries/src/mutations/useEVMTxn.ts @@ -39,7 +39,8 @@ const useEVMTxn = ( if (!txn || !ctx.provider) return null; const isNotOvm = ctx.networkId !== NetworkIdByName['mainnet-ovm'] && - ctx.networkId !== NetworkIdByName['kovan-ovm']; + ctx.networkId !== NetworkIdByName['kovan-ovm'] && + ctx.networkId !== NetworkIdByName['goerli-ovm']; if (isNotOvm) { return null; } diff --git a/packages/queries/src/queries/synths/useSynthsTotalSupplyQuery.ts b/packages/queries/src/queries/synths/useSynthsTotalSupplyQuery.ts index 49e02b4e9..0d2949998 100644 --- a/packages/queries/src/queries/synths/useSynthsTotalSupplyQuery.ts +++ b/packages/queries/src/queries/synths/useSynthsTotalSupplyQuery.ts @@ -15,17 +15,20 @@ const useSynthsTotalSupplyQuery = ( return useQuery<SynthsTotalSupplyData>( ['synths', 'totalSupply', ctx.networkId], async () => { + if (!ctx.snxjs) throw Error('Expected snxjs to be defined'); + if (!ctx.networkId) throw Error('Expected networkId to be defined'); const { contracts: { SynthUtil, ExchangeRates, CollateralManagerState, EtherWrapper }, - } = ctx.snxjs!; + } = ctx.snxjs; const [sETHKey, sBTCKey, sUSDKey] = [Synths.sETH, Synths.sBTC, Synths.sUSD].map( formatBytes32String ); const isL2 = - NetworkIdByName['mainnet-ovm'] === ctx.networkId! || - NetworkIdByName['kovan-ovm'] === ctx.networkId!; + NetworkIdByName['mainnet-ovm'] === ctx.networkId || + NetworkIdByName['kovan-ovm'] === ctx.networkId || + NetworkIdByName['goerli-ovm'] === ctx.networkId; const [ synthTotalSupplies, @@ -178,7 +181,7 @@ const useSynthsTotalSupplyQuery = ( }; }, { - enabled: !!ctx.snxjs, + enabled: Boolean(ctx.snxjs && ctx.networkId), ...options, } ); diff --git a/yarn.lock b/yarn.lock index 3eaf7da7f..fc63f000f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1376,40 +1376,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:5.0.7": - version: 5.0.7 - resolution: "@ethersproject/abi@npm:5.0.7" - dependencies: - "@ethersproject/address": ^5.0.4 - "@ethersproject/bignumber": ^5.0.7 - "@ethersproject/bytes": ^5.0.4 - "@ethersproject/constants": ^5.0.4 - "@ethersproject/hash": ^5.0.4 - "@ethersproject/keccak256": ^5.0.3 - "@ethersproject/logger": ^5.0.5 - "@ethersproject/properties": ^5.0.3 - "@ethersproject/strings": ^5.0.4 - checksum: 47bce732782187ef0343662aa0ffdabb98be752d3ede57234205b118df511f35d8cddabd468f139e367d908ce7fbb0555f5af943f4b47cf3165c8fd61811183d - languageName: node - linkType: hard - -"@ethersproject/abi@npm:5.6.3, @ethersproject/abi@npm:^5.6.3": - version: 5.6.3 - resolution: "@ethersproject/abi@npm:5.6.3" - dependencies: - "@ethersproject/address": ^5.6.1 - "@ethersproject/bignumber": ^5.6.2 - "@ethersproject/bytes": ^5.6.1 - "@ethersproject/constants": ^5.6.1 - "@ethersproject/hash": ^5.6.1 - "@ethersproject/keccak256": ^5.6.1 - "@ethersproject/logger": ^5.6.0 - "@ethersproject/properties": ^5.6.0 - "@ethersproject/strings": ^5.6.1 - checksum: 64b89ca153c22dbe95cc024abac7e08849f92b9b33b024b67da6ac127706d37fcbd36cf5713a462b8c3371b49664c4181ca4ab81e6ee55413ea5265e8b59f175 - languageName: node - linkType: hard - "@ethersproject/abi@npm:^5.6.4": version: 5.6.4 resolution: "@ethersproject/abi@npm:5.6.4" @@ -1455,7 +1421,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/address@npm:5.6.1, @ethersproject/address@npm:^5.0.4, @ethersproject/address@npm:^5.6.1": +"@ethersproject/address@npm:5.6.1, @ethersproject/address@npm:^5.0.2, @ethersproject/address@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/address@npm:5.6.1" dependencies: @@ -1487,7 +1453,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bignumber@npm:5.6.2, @ethersproject/bignumber@npm:^5.0.7, @ethersproject/bignumber@npm:^5.6.2": +"@ethersproject/bignumber@npm:5.6.2, @ethersproject/bignumber@npm:^5.6.2": version: 5.6.2 resolution: "@ethersproject/bignumber@npm:5.6.2" dependencies: @@ -1498,7 +1464,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bytes@npm:5.6.1, @ethersproject/bytes@npm:^5.0.4, @ethersproject/bytes@npm:^5.6.1": +"@ethersproject/bytes@npm:5.6.1, @ethersproject/bytes@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/bytes@npm:5.6.1" dependencies: @@ -1507,7 +1473,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/constants@npm:5.6.1, @ethersproject/constants@npm:^5.0.4, @ethersproject/constants@npm:^5.6.1": +"@ethersproject/constants@npm:5.6.1, @ethersproject/constants@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/constants@npm:5.6.1" dependencies: @@ -1534,7 +1500,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/hash@npm:5.6.1, @ethersproject/hash@npm:^5.0.4, @ethersproject/hash@npm:^5.6.1": +"@ethersproject/hash@npm:5.6.1, @ethersproject/hash@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/hash@npm:5.6.1" dependencies: @@ -1591,7 +1557,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/keccak256@npm:5.6.1, @ethersproject/keccak256@npm:^5.0.3, @ethersproject/keccak256@npm:^5.6.1": +"@ethersproject/keccak256@npm:5.6.1, @ethersproject/keccak256@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/keccak256@npm:5.6.1" dependencies: @@ -1601,7 +1567,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/logger@npm:5.6.0, @ethersproject/logger@npm:^5.0.5, @ethersproject/logger@npm:^5.6.0": +"@ethersproject/logger@npm:5.6.0, @ethersproject/logger@npm:^5.6.0": version: 5.6.0 resolution: "@ethersproject/logger@npm:5.6.0" checksum: 6eee38a973c7a458552278971c109a3e5df3c257e433cb959da9a287ea04628d1f510d41b83bd5f9da5ddc05d97d307ed2162a9ba1b4fcc50664e4f60061636c @@ -1627,7 +1593,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/properties@npm:5.6.0, @ethersproject/properties@npm:^5.0.3, @ethersproject/properties@npm:^5.6.0": +"@ethersproject/properties@npm:5.6.0, @ethersproject/properties@npm:^5.6.0": version: 5.6.0 resolution: "@ethersproject/properties@npm:5.6.0" dependencies: @@ -1723,7 +1689,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/strings@npm:5.6.1, @ethersproject/strings@npm:^5.0.4, @ethersproject/strings@npm:^5.6.1": +"@ethersproject/strings@npm:5.6.1, @ethersproject/strings@npm:^5.6.1": version: 5.6.1 resolution: "@ethersproject/strings@npm:5.6.1" dependencies: @@ -2184,6 +2150,26 @@ __metadata: languageName: node linkType: hard +"@nomiclabs/hardhat-etherscan@npm:^3.1.0": + version: 3.1.0 + resolution: "@nomiclabs/hardhat-etherscan@npm:3.1.0" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@ethersproject/address": ^5.0.2 + cbor: ^5.0.2 + chalk: ^2.4.2 + debug: ^4.1.1 + fs-extra: ^7.0.1 + lodash: ^4.17.11 + semver: ^6.3.0 + table: ^6.8.0 + undici: ^5.4.0 + peerDependencies: + hardhat: ^2.0.4 + checksum: 3f28abc39edce2936226b6d0087c3be78bffcba68b6935f3f60767f0e10233e940ddc74803dff91f7ddf9464a7199aab00fba08d8b3865dbc2f8936f53a7a5a5 + languageName: node + linkType: hard + "@npmcli/fs@npm:^2.1.0": version: 2.1.0 resolution: "@npmcli/fs@npm:2.1.0" @@ -2285,7 +2271,7 @@ __metadata: eslint: ^7.26.0 ethers: ^5.5.3 jest: ^27.0.6 - synthetix: ^2.74.1 + synthetix: ^2.75.2 ts-loader: ^8.0.2 ts-node: ^10.2.1 typescript: ^4.4.2 @@ -2300,7 +2286,7 @@ __metadata: dependencies: ethers: ^5.5.3 prettier: ^2.3.0 - synthetix: ^2.74.1 + synthetix: ^2.75.2 typescript: ^4.4.2 languageName: unknown linkType: soft @@ -3823,6 +3809,13 @@ __metadata: languageName: node linkType: hard +"bignumber.js@npm:^9.0.1": + version: 9.0.2 + resolution: "bignumber.js@npm:9.0.2" + checksum: 8637b71d0a99104b20413c47578953970006fec6b4df796b9dcfd9835ea9c402ea0e727eba9a5ca9f9a393c1d88b6168c5bbe0887598b708d4f8b4870ad62e1f + languageName: node + linkType: hard + "binary-extensions@npm:^1.0.0": version: 1.13.1 resolution: "binary-extensions@npm:1.13.1" @@ -4217,6 +4210,16 @@ __metadata: languageName: node linkType: hard +"cbor@npm:^5.0.2": + version: 5.2.0 + resolution: "cbor@npm:5.2.0" + dependencies: + bignumber.js: ^9.0.1 + nofilter: ^1.0.4 + checksum: b3c39dae64370f361526dbec88f51d0f1b47027224cdd21dbd64c228f0fe7eaa945932d349ec5324068a6c6dcdbb1e3b46242852524fd53c526d14cb60514bdc + languageName: node + linkType: hard + "chalk@npm:^2.0.0, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -6193,6 +6196,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^7.0.1": + version: 7.0.1 + resolution: "fs-extra@npm:7.0.1" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: 141b9dccb23b66a66cefdd81f4cda959ff89282b1d721b98cea19ba08db3dcbe6f862f28841f3cf24bb299e0b7e6c42303908f65093cb7e201708e86ea5a8dcf + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -6502,7 +6516,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" checksum: 3f109d70ae123951905d85032ebeae3c2a5a7a997430df00ea30df0e3a6c60cf6689b109654d6fdacd28810a053348c4d14642da1d075049e6be1ba5216218da @@ -8101,6 +8115,18 @@ __metadata: languageName: node linkType: hard +"jsonfile@npm:^4.0.0": + version: 4.0.0 + resolution: "jsonfile@npm:4.0.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 6447d6224f0d31623eef9b51185af03ac328a7553efcee30fa423d98a9e276ca08db87d71e17f2310b0263fd3ffa6c2a90a6308367f661dc21580f9469897c9e + languageName: node + linkType: hard + "keccak@npm:^3.0.0": version: 3.0.2 resolution: "keccak@npm:3.0.2" @@ -8334,7 +8360,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.12, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.7.0": +"lodash@npm:^4.17.11, lodash@npm:^4.17.12, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -9003,6 +9029,13 @@ __metadata: languageName: node linkType: hard +"nofilter@npm:^1.0.4": + version: 1.0.4 + resolution: "nofilter@npm:1.0.4" + checksum: 54d864f745de5c3312994e880cf2d4f55e34830d6adc8275dce3731507ca380d21040336e4a277a4901551c07f04c452fbeffd57fad1dc8f68a2943eaf894a04 + languageName: node + linkType: hard + "nopt@npm:^5.0.0": version: 5.0.0 resolution: "nopt@npm:5.0.0" @@ -11098,10 +11131,11 @@ __metadata: languageName: node linkType: hard -"synthetix@npm:^2.74.1": - version: 2.74.1 - resolution: "synthetix@npm:2.74.1" +"synthetix@npm:^2.75.2": + version: 2.75.2 + resolution: "synthetix@npm:2.75.2" dependencies: + "@nomiclabs/hardhat-etherscan": ^3.1.0 abi-decoder: ^2.3.0 commander: ^8.1.0 inquirer: ^6.5.2 @@ -11112,11 +11146,11 @@ __metadata: web3-utils: ^1.2.2 bin: snx: bin.js - checksum: 69d46d3a90f2799fb7627d912355ae8f748536a34770ce1d674328e4e9bb59ccb5a78fc1e659d2a43ab95ef43903ff0fd97acd7b952c1522a1d18c522b15a440 + checksum: dd2c7978337f1f3fa90842e0f7f3254be955a5218ea2aac9195c91d32f324e629617c9eda053d716cb36d9114164ce937c460b8b21881797e1fb80fcd6178080 languageName: node linkType: hard -"table@npm:^6.0.9": +"table@npm:^6.0.9, table@npm:^6.8.0": version: 6.8.0 resolution: "table@npm:6.8.0" dependencies: @@ -11525,6 +11559,13 @@ __metadata: languageName: node linkType: hard +"undici@npm:^5.4.0": + version: 5.8.0 + resolution: "undici@npm:5.8.0" + checksum: 7b486ad064da00628d3906e140b86223023cd3494c811da8d7aa1375c2392fe6a6ac421af236c056fd3d3136bba3a91b99e0505dde071dd946070946eb0718b8 + languageName: node + linkType: hard + "unicode-canonical-property-names-ecmascript@npm:^2.0.0": version: 2.0.0 resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" @@ -11586,7 +11627,7 @@ __metadata: languageName: node linkType: hard -"universalify@npm:^0.1.2": +"universalify@npm:^0.1.0, universalify@npm:^0.1.2": version: 0.1.2 resolution: "universalify@npm:0.1.2" checksum: 40cdc60f6e61070fe658ca36016a8f4ec216b29bf04a55dce14e3710cc84c7448538ef4dad3728d0bfe29975ccd7bfb5f414c45e7b78883567fb31b246f02dff