diff --git a/src/limit-order-predicate.decoder.test.ts b/src/limit-order-predicate.decoder.test.ts index 38af05f..d3c669e 100644 --- a/src/limit-order-predicate.decoder.test.ts +++ b/src/limit-order-predicate.decoder.test.ts @@ -12,10 +12,10 @@ import { SeriesNonceManagerPredicateBuilder } from './series-nonce-manager-predi import {mocksForV3Chain} from './test/helpers'; import {LimitOrderPredicateV3Builder} from "./limit-order-predicate-v3.builder"; import { - LIMIT_ORDER_PROTOCOL_V3_ABI, - limitOrderProtocolAddresses + LIMIT_ORDER_PROTOCOL_V3_ABI } from "./limit-order-protocol.const"; import {SERIES_NONCE_MANAGER_ABI} from "./series-nonce-manager.const"; +import {limitOrderProtocolAddresses} from "./limit-order-protocol-addresses.const"; // eslint-disable-next-line max-len diff --git a/src/limit-order-protocol-addresses.const.ts b/src/limit-order-protocol-addresses.const.ts new file mode 100644 index 0000000..955ec0a --- /dev/null +++ b/src/limit-order-protocol-addresses.const.ts @@ -0,0 +1,16 @@ +import {ChainId} from "./model/limit-order-protocol.model"; + +export const limitOrderProtocolAddresses: { [key in ChainId]: string } = { + [ChainId.ethereumMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.binanceMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.polygonMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.optimismMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.arbitrumMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.auroraMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.gnosisMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.avalancheMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.fantomMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.klaytnMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', + [ChainId.zkSyncEraMainnet]: '0x6e2b76966cbd9cf4cc2fa0d76d24d5241e0abc2f', + [ChainId.baseMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', +} as const; diff --git a/src/limit-order-protocol.const.ts b/src/limit-order-protocol.const.ts index fad570b..2a3846a 100644 --- a/src/limit-order-protocol.const.ts +++ b/src/limit-order-protocol.const.ts @@ -2,8 +2,8 @@ import {AbiItem} from './model/abi.model'; import LimitOrderProtocolABISource from './abi/LimitOrderProtocol.json'; import LimitOrderProtocolV3ABISource from './abi/LimitOrderProtocolV3.json'; import ERC20ABISource from './abi/ERC20ABI.json'; -import { SignTypedDataVersion } from '@metamask/eth-sig-util'; -import { ChainId } from './model/limit-order-protocol.model'; +import {SignTypedDataVersion} from '@metamask/eth-sig-util'; +import {limitOrderProtocolAddresses} from "./limit-order-protocol-addresses.const"; export const PROTOCOL_NAME = '1inch Aggregation Router'; @@ -30,21 +30,6 @@ export const EIP712_DOMAIN = [ {name: 'verifyingContract', type: 'address'}, ]; -export const limitOrderProtocolAddresses: {[key in ChainId]: string} = { - [ChainId.ethereumMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.binanceMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.polygonMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.optimismMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.arbitrumMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.auroraMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.gnosisMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.avalancheMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.fantomMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.klaytnMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', - [ChainId.zkSyncEraMainnet]: '0x6e2b76966cbd9cf4cc2fa0d76d24d5241e0abc2f', - [ChainId.baseMainnet]: '0x1111111254eeb25477b68fb85ed929f73a960582', -} as const; - /** * @deprecated Change to `limitOrderProtocolAddresses` */ diff --git a/src/limit-order-v3.builder.test.ts b/src/limit-order-v3.builder.test.ts index bbcbfe4..d10f2d8 100644 --- a/src/limit-order-v3.builder.test.ts +++ b/src/limit-order-v3.builder.test.ts @@ -2,9 +2,9 @@ import {LimitOrderDecoder} from './limit-order.decoder'; import {LimitOrderLegacy} from './model/limit-order-protocol.model'; import Web3 from 'web3'; import {PrivateKeyProviderConnector} from './connector/private-key-provider.connector'; -import {limitOrderProtocolAddresses} from './limit-order-protocol.const'; import {largeInteractions, largeResult} from './test/mocks'; import {LimitOrderV3Builder} from "./limit-order-v3.builder"; +import {limitOrderProtocolAddresses} from "./limit-order-protocol-addresses.const"; describe('LimitOrderV3Builder - for build new limit order', () => { const chainId = 56; diff --git a/src/test/helpers.ts b/src/test/helpers.ts index b217439..6d1024b 100644 --- a/src/test/helpers.ts +++ b/src/test/helpers.ts @@ -6,13 +6,11 @@ import { Erc20Facade } from "../erc20.facade"; import { SeriesNonceManagerFacade } from "../series-nonce-manager.facade"; import { seriesNonceManagerContractAddresses } from "../series-nonce-manager.const"; import { SeriesNonceManagerPredicateBuilder } from "../series-nonce-manager-predicate.builder"; -import { - limitOrderProtocolAddresses -} from "../limit-order-protocol.const"; import {LimitOrderPredicateV3Builder} from "../limit-order-predicate-v3.builder"; import {LimitOrderProtocolV3Facade} from "../limit-order-protocol-v3.facade"; import {LimitOrderV3Builder} from "../limit-order-v3.builder"; import {rpcUrls} from "../utils/rpc-url.const"; +import {limitOrderProtocolAddresses} from "../limit-order-protocol-addresses.const"; export function mocksForV3Chain(