diff --git a/contracts/package.json b/contracts/package.json index b719ea5e7..28d08092a 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.74.2-alpha", "typescript": "^4.4.2" } } diff --git a/packages/contracts-interface/__tests__/index.test.ts b/packages/contracts-interface/__tests__/index.test.ts index 190d01823..76952f540 100644 --- a/packages/contracts-interface/__tests__/index.test.ts +++ b/packages/contracts-interface/__tests__/index.test.ts @@ -47,6 +47,7 @@ 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[5]]).toBe(NetworkIdByName.goerli.toString()); }); test('should include the current network', () => { diff --git a/packages/contracts-interface/package.json b/packages/contracts-interface/package.json index 96f1b7ea9..716d04933 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.74.2-alpha" }, "devDependencies": { "@babel/core": "^7.11.0", 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;