diff --git a/source/batch-call/scripts/deploy.js b/source/batch-call/scripts/deploy.js index 82c191582..0ccfbc30f 100644 --- a/source/batch-call/scripts/deploy.js +++ b/source/batch-call/scripts/deploy.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') const { ChainIds, chainLabels, getReceiptUrl } = require('@airswap/utils') @@ -58,7 +58,7 @@ async function main() { ) ) - batchCallCommits[chainId] = require('node:child_process') + batchCallCommits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/source/delegate/scripts/deploy.js b/source/delegate/scripts/deploy.js index e0f323c98..7c019b004 100644 --- a/source/delegate/scripts/deploy.js +++ b/source/delegate/scripts/deploy.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') @@ -53,7 +53,7 @@ async function main() { { ...prettierConfig, parser: 'babel' } ) ) - delegateCommits[chainId] = require('node:child_process') + delegateCommits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/source/pool/scripts/deploy.js b/source/pool/scripts/deploy.js index 50eb650a4..b55027d49 100644 --- a/source/pool/scripts/deploy.js +++ b/source/pool/scripts/deploy.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') const { chainLabels, ChainIds, getReceiptUrl } = require('@airswap/utils') @@ -53,7 +53,7 @@ async function main() { { ...prettierConfig, parser: 'babel' } ) ) - poolCommits[chainId] = require('node:child_process') + poolCommits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/source/registry/scripts/deploy.js b/source/registry/scripts/deploy.js index 25c25eac9..971cefadd 100644 --- a/source/registry/scripts/deploy.js +++ b/source/registry/scripts/deploy.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') const { ChainIds, chainLabels, getReceiptUrl } = require('@airswap/utils') @@ -66,7 +66,7 @@ async function main() { { ...prettierConfig, parser: 'babel' } ) ) - registryCommits[chainId] = require('node:child_process') + registryCommits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/source/staking/scripts/deploy.js b/source/staking/scripts/deploy.js index 464819413..f8533927c 100644 --- a/source/staking/scripts/deploy.js +++ b/source/staking/scripts/deploy.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') const { chainLabels, ChainIds, getReceiptUrl } = require('@airswap/utils') @@ -68,7 +68,7 @@ async function main() { { ...prettierConfig, parser: 'babel' } ) ) - stakingCommits[chainId] = require('node:child_process') + stakingCommits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/source/swap-erc20/scripts/deploy.js b/source/swap-erc20/scripts/deploy.js index aff774707..8dbb5fc4c 100644 --- a/source/swap-erc20/scripts/deploy.js +++ b/source/swap-erc20/scripts/deploy.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') const poolDeploys = require('@airswap/pool/deploys.js') @@ -81,7 +81,7 @@ async function main() { { ...prettierConfig, parser: 'babel' } ) ) - swapERC20Commits[chainId] = require('node:child_process') + swapERC20Commits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/source/swap/scripts/deploy-adapters.js b/source/swap/scripts/deploy-adapters.js index e096f93ae..85b781377 100644 --- a/source/swap/scripts/deploy-adapters.js +++ b/source/swap/scripts/deploy-adapters.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') const { chainLabels, ChainIds, getReceiptUrl } = require('@airswap/utils') @@ -55,7 +55,7 @@ async function main() { { ...prettierConfig, parser: 'babel' } ) ) - adapterCommits[chainId] = require('node:child_process') + adapterCommits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/source/swap/scripts/deploy.js b/source/swap/scripts/deploy.js index d0a51d810..96218d949 100644 --- a/source/swap/scripts/deploy.js +++ b/source/swap/scripts/deploy.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') const { @@ -79,7 +79,7 @@ async function main() { { ...prettierConfig, parser: 'babel' } ) ) - swapCommits[chainId] = require('node:child_process') + swapCommits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/source/wrapper/scripts/deploy.js b/source/wrapper/scripts/deploy.js index 0fcc597ce..841c23bba 100644 --- a/source/wrapper/scripts/deploy.js +++ b/source/wrapper/scripts/deploy.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const fs = require('node:fs') +const fs = require('fs') const prettier = require('prettier') const { ethers, run } = require('hardhat') const { chainLabels, ChainIds, getReceiptUrl } = require('@airswap/utils') @@ -68,7 +68,7 @@ async function main() { { ...prettierConfig, parser: 'babel' } ) ) - wrapperCommits[chainId] = require('node:child_process') + wrapperCommits[chainId] = require('child_process') .execSync('git rev-parse HEAD') .toString() .trim() diff --git a/tools/libraries/package.json b/tools/libraries/package.json index 0850610b7..9fde87c4e 100644 --- a/tools/libraries/package.json +++ b/tools/libraries/package.json @@ -1,6 +1,6 @@ { "name": "@airswap/libraries", - "version": "5.0.7", + "version": "5.0.8", "description": "AirSwap: Libraries for Developers", "repository": { "type": "git", diff --git a/tools/libraries/src/Registry.ts b/tools/libraries/src/Registry.ts index 6e80495c5..af45653ac 100644 --- a/tools/libraries/src/Registry.ts +++ b/tools/libraries/src/Registry.ts @@ -1,7 +1,7 @@ import registryBlocks from '@airswap/registry/deploys-blocks.js' import registryDeploys from '@airswap/registry/deploys.js' import { Registry__factory } from '@airswap/registry/typechain/factories/contracts' -import type { ethers } from 'ethers' +import { ethers } from 'ethers' import { Contract, SwapERC20 } from './Contracts' import { Server } from './Server' diff --git a/tools/libraries/src/RegistryV3.ts b/tools/libraries/src/RegistryV3.ts index 3d3063f2b..6da57fdf6 100644 --- a/tools/libraries/src/RegistryV3.ts +++ b/tools/libraries/src/RegistryV3.ts @@ -1,4 +1,4 @@ -import type { ethers } from 'ethers' +import { ethers } from 'ethers' import { Registry__factory } from 'registry-v3/typechain/factories/contracts' import { Contract, SwapERC20 } from './Contracts' diff --git a/tools/libraries/src/Server.ts b/tools/libraries/src/Server.ts index c90c8fa87..bae545fc3 100644 --- a/tools/libraries/src/Server.ts +++ b/tools/libraries/src/Server.ts @@ -1,11 +1,11 @@ import * as url from 'node:url' import { isBrowser } from 'browser-or-node' -import type { ethers } from 'ethers' -import type { Client as HttpClient } from 'jayson' +import { ethers } from 'ethers' +import { Client as HttpClient } from 'jayson' import { TypedEmitter } from 'tiny-typed-emitter' import { - type JsonRpcError, + JsonRpcError, JsonRpcErrorCodes, JsonRpcWebsocket, WebsocketReadyStates, @@ -14,16 +14,16 @@ import { import { ChainIds, Direction, - type FullOrder, - type FullOrderERC20, + FullOrder, + FullOrderERC20, Indexes, - type OrderERC20, - type OrderFilter, - type OrderResponse, - type Pricing, + OrderERC20, + OrderFilter, + OrderResponse, + Pricing, ProtocolIds, - type ServerOptions, - type SupportedProtocolInfo, + ServerOptions, + SupportedProtocolInfo, isValidOrderERC20, isValidPricingERC20, orderERC20PropsToStrings, diff --git a/tools/libraries/test/Server.test.ts b/tools/libraries/test/Server.test.ts index 2247363b7..214f12e6e 100644 --- a/tools/libraries/test/Server.test.ts +++ b/tools/libraries/test/Server.test.ts @@ -7,8 +7,8 @@ import sinonChai from 'sinon-chai' import { ADDRESS_ZERO, ChainIds, - type Levels, - type OrderERC20, + Levels, + OrderERC20, ProtocolIds, createOrder, createOrderERC20, diff --git a/tools/libraries/test/test-utils.ts b/tools/libraries/test/test-utils.ts index 7f716e48a..d61badcf8 100644 --- a/tools/libraries/test/test-utils.ts +++ b/tools/libraries/test/test-utils.ts @@ -1,5 +1,5 @@ -import type { EventEmitter } from 'node:events' -import type { +import { EventEmitter } from 'node:events' +import { JsonRpcRequest, JsonRpcResponse, } from '@airswap/jsonrpc-client-websocket' diff --git a/tools/stores/package.json b/tools/stores/package.json index e28004469..41c5ea6ce 100644 --- a/tools/stores/package.json +++ b/tools/stores/package.json @@ -1,6 +1,6 @@ { "name": "@airswap/stores", - "version": "5.0.2", + "version": "5.0.3", "description": "AirSwap: Storage for Indexing", "repository": { "type": "git", diff --git a/tools/stores/redis/redis.ts b/tools/stores/redis/redis.ts index a558a82c6..6399a94ec 100644 --- a/tools/stores/redis/redis.ts +++ b/tools/stores/redis/redis.ts @@ -1,8 +1,8 @@ import { Direction, - type FullOrder, + FullOrder, Indexes, - type OrderFilter, + OrderFilter, THIRTY_DAYS, } from '@airswap/utils' import { SchemaFieldTypes, createClient } from 'redis' diff --git a/tools/stores/test/redis.ts b/tools/stores/test/redis.ts index 1c3bafe09..38cd66250 100644 --- a/tools/stores/test/redis.ts +++ b/tools/stores/test/redis.ts @@ -4,7 +4,7 @@ import { Redis, createIndex } from '../redis/redis' import { ADDRESS_ZERO, - type FullOrder, + FullOrder, createOrder, createOrderSignature, } from '@airswap/utils' diff --git a/tools/utils/package.json b/tools/utils/package.json index 4f3bdc7e6..fc2a8cc05 100644 --- a/tools/utils/package.json +++ b/tools/utils/package.json @@ -1,6 +1,6 @@ { "name": "@airswap/utils", - "version": "5.0.3", + "version": "5.0.4", "description": "AirSwap: Utilities for Developers", "repository": { "type": "git", diff --git a/tools/utils/src/metadata.ts b/tools/utils/src/metadata.ts index 353c8f599..e46f36fd5 100644 --- a/tools/utils/src/metadata.ts +++ b/tools/utils/src/metadata.ts @@ -9,7 +9,7 @@ import { } from './constants' import TOKEN_DEFAULTS from './tokendefaults' import TOKEN_LISTS from './tokenlists' -import type { +import { CollectionTokenAttribute, CollectionTokenInfo, CollectionTokenMetadata, diff --git a/tools/utils/src/swap-erc20.ts b/tools/utils/src/swap-erc20.ts index 8532cc9cd..0655d2688 100644 --- a/tools/utils/src/swap-erc20.ts +++ b/tools/utils/src/swap-erc20.ts @@ -18,7 +18,7 @@ import { SECONDS_IN_DAY, } from './constants' -import type { Signature, Settlement, Transfer } from './types' +import { Signature, Settlement, Transfer } from './types' export const EIP712SwapERC20 = { EIP712Domain: [ diff --git a/tools/utils/src/swap.ts b/tools/utils/src/swap.ts index e0da28383..9b4889869 100644 --- a/tools/utils/src/swap.ts +++ b/tools/utils/src/swap.ts @@ -15,7 +15,7 @@ import { SECONDS_IN_DAY, } from './constants' -import type { Settlement, Signature } from './types' +import { Settlement, Signature } from './types' export const EIP712Swap = { EIP712Domain: [ diff --git a/tools/utils/src/tokendefaults.ts b/tools/utils/src/tokendefaults.ts index 27c5ee859..2a9c7c20e 100644 --- a/tools/utils/src/tokendefaults.ts +++ b/tools/utils/src/tokendefaults.ts @@ -1,5 +1,5 @@ import { ChainIds } from './constants' -import type { TokenInfo } from './types' +import { TokenInfo } from './types' const TEST_TOKEN_DECIMALS = 6 export default [ diff --git a/tools/utils/test/utils.ts b/tools/utils/test/utils.ts index 7e98c1a4c..3e47be17f 100644 --- a/tools/utils/test/utils.ts +++ b/tools/utils/test/utils.ts @@ -1,6 +1,6 @@ import { assert, expect } from 'chai' import { ethers } from 'ethers' -import type { FullOrderERC20, Levels, UnsignedOrderERC20 } from '../index' +import { FullOrderERC20, Levels, UnsignedOrderERC20 } from '../index' import { ADDRESS_ZERO, diff --git a/yarn.lock b/yarn.lock index b3a54d76e..b4872c067 100644 --- a/yarn.lock +++ b/yarn.lock @@ -171,7 +171,22 @@ __metadata: languageName: unknown linkType: soft -"@airswap/utils@npm:5.0.3, @airswap/utils@workspace:tools/utils": +"@airswap/utils@npm:5.0.3": + version: 5.0.3 + resolution: "@airswap/utils@npm:5.0.3" + dependencies: + "@metamask/eth-sig-util": "npm:^5.0.2" + "@uniswap/token-lists": "npm:^1.0.0-beta.24" + bignumber.js: "npm:^9.0.1" + ethereumjs-util: "npm:^7.1.5" + ethers: "npm:^5.7.2" + lz-string: "npm:^1.5.0" + valid-url: "npm:^1.0.9" + checksum: 10c0/2bbe84a5efa32ba98dd34a54246c980a8ec0155b5fbf36e511fc1123302e19175f7a4bf0f2642fb9dee9d3c8c7c3bba98fac5f4394ef3f700a5edc9c91b3223d + languageName: node + linkType: hard + +"@airswap/utils@workspace:tools/utils": version: 0.0.0-use.local resolution: "@airswap/utils@workspace:tools/utils" dependencies: