diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a697eb91..39d49c5a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,7 +9,7 @@ jobs: build: strategy: matrix: - node-version: [16.x, 18.x] + node-version: [18.x] name: Build with ${{ matrix.node-version }} runs-on: ubuntu-latest @@ -27,7 +27,7 @@ jobs: lint: strategy: matrix: - node-version: [16.x, 18.x] + node-version: [18.x] name: Check style with ${{ matrix.node-version }} runs-on: ubuntu-latest @@ -59,7 +59,7 @@ jobs: test: strategy: matrix: - node-version: [16.x, 18.x] + node-version: [18.x] name: Run all tests runs-on: ubuntu-latest diff --git a/README.md b/README.md index a5682ab9..64d685ed 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ npm install enft ## Prerequisites -- Support [Node.js](https://nodejs.org) version >= 16 +- Support [Node.js](https://nodejs.org) version >= 18 - Alchemy API Key - [apply here](https://auth.alchemyapi.io/signup) (**Recommended**) - **OR** - Infura NFT (Open Beta) API Key and API Key Secret - [apply here](https://www.infura.io/resources/apis/nft-api-beta-signup) diff --git a/docs/README.md b/docs/README.md index 2b8e80b1..295ff446 100644 --- a/docs/README.md +++ b/docs/README.md @@ -70,7 +70,7 @@ npm install enft ## Prerequisites -- Support [Node.js](https://nodejs.org) version >= 16 +- Support [Node.js](https://nodejs.org) version >= 18 - Alchemy API Key - [apply here](https://auth.alchemyapi.io/signup) (**Recommended**) - **OR** - Infura NFT (Open Beta) API Key and API Key Secret - [apply here](https://www.infura.io/resources/apis/nft-api-beta-signup) diff --git a/docs/classes/Auth.md b/docs/classes/Auth.md index 7b1ff46b..1e7a6f72 100644 --- a/docs/classes/Auth.md +++ b/docs/classes/Auth.md @@ -29,7 +29,7 @@ The main class for the Auth library. #### Defined in -[Auth/Auth.ts:29](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/Auth/Auth.ts#L29) +[Auth/Auth.ts:29](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/Auth/Auth.ts#L29) ## Methods @@ -54,7 +54,7 @@ Retrieves the API authentication data for the Ethereum API providers. #### Defined in -[Auth/Auth.ts:58](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/Auth/Auth.ts#L58) +[Auth/Auth.ts:58](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/Auth/Auth.ts#L58) ___ @@ -74,4 +74,4 @@ Retrieves the Ethereum provider. #### Defined in -[Auth/Auth.ts:49](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/Auth/Auth.ts#L49) +[Auth/Auth.ts:49](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/Auth/Auth.ts#L49) diff --git a/docs/classes/ENFT.md b/docs/classes/ENFT.md index aed1fc0a..b29c1d88 100644 --- a/docs/classes/ENFT.md +++ b/docs/classes/ENFT.md @@ -27,7 +27,7 @@ #### Defined in -[ENFT/ENFT.ts:29](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/ENFT/ENFT.ts#L29) +[ENFT/ENFT.ts:29](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/ENFT/ENFT.ts#L29) ## Methods @@ -64,7 +64,7 @@ A promise that resolves with the transaction data if available, otherwise null o #### Defined in -[ENFT/ENFT.ts:96](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/ENFT/ENFT.ts#L96) +[ENFT/ENFT.ts:96](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/ENFT/ENFT.ts#L96) ___ @@ -97,4 +97,4 @@ Returns a promise that resolves to a function. #### Defined in -[ENFT/ENFT.ts:54](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/ENFT/ENFT.ts#L54) +[ENFT/ENFT.ts:54](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/ENFT/ENFT.ts#L54) diff --git a/docs/enums/ItemType.md b/docs/enums/ItemType.md index 7aa06088..ee98e07c 100644 --- a/docs/enums/ItemType.md +++ b/docs/enums/ItemType.md @@ -21,7 +21,7 @@ #### Defined in -[types/enums/seaport.enum.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/enums/seaport.enum.ts#L12) +[types/enums/seaport.enum.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/enums/seaport.enum.ts#L12) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types/enums/seaport.enum.ts:18](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/enums/seaport.enum.ts#L18) +[types/enums/seaport.enum.ts:18](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/enums/seaport.enum.ts#L18) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types/enums/seaport.enum.ts:6](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/enums/seaport.enum.ts#L6) +[types/enums/seaport.enum.ts:6](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/enums/seaport.enum.ts#L6) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[types/enums/seaport.enum.ts:9](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/enums/seaport.enum.ts#L9) +[types/enums/seaport.enum.ts:9](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/enums/seaport.enum.ts#L9) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[types/enums/seaport.enum.ts:15](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/enums/seaport.enum.ts#L15) +[types/enums/seaport.enum.ts:15](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/enums/seaport.enum.ts#L15) ___ @@ -71,4 +71,4 @@ ___ #### Defined in -[types/enums/seaport.enum.ts:3](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/enums/seaport.enum.ts#L3) +[types/enums/seaport.enum.ts:3](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/enums/seaport.enum.ts#L3) diff --git a/docs/interfaces/ApiOptions.md b/docs/interfaces/ApiOptions.md index 3886f2bf..e686df5b 100644 --- a/docs/interfaces/ApiOptions.md +++ b/docs/interfaces/ApiOptions.md @@ -27,7 +27,7 @@ Alchemy object with API key (required if no Infura key is provided) #### Defined in -[types/interfaces/auth.interface.ts:26](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/auth.interface.ts#L26) +[types/interfaces/auth.interface.ts:26](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/auth.interface.ts#L26) ___ @@ -46,4 +46,4 @@ Infura object with API key and secret (required if no Alchemy key is provided) #### Defined in -[types/interfaces/auth.interface.ts:31](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/auth.interface.ts#L31) +[types/interfaces/auth.interface.ts:31](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/auth.interface.ts#L31) diff --git a/docs/interfaces/ClientOptions.md b/docs/interfaces/ClientOptions.md index f9c62df6..f6d18763 100644 --- a/docs/interfaces/ClientOptions.md +++ b/docs/interfaces/ClientOptions.md @@ -24,7 +24,7 @@ NFT contract address (required) #### Defined in -[types/interfaces/enft.interface.ts:10](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L10) +[types/interfaces/enft.interface.ts:10](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L10) ___ @@ -36,7 +36,7 @@ Discord webhook for built-in notification (optional) #### Defined in -[types/interfaces/enft.interface.ts:16](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L16) +[types/interfaces/enft.interface.ts:16](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L16) ___ @@ -48,7 +48,7 @@ Etherscan api key for eth to usd conversion (optional) #### Defined in -[types/interfaces/enft.interface.ts:20](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L20) +[types/interfaces/enft.interface.ts:20](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L20) ___ @@ -60,7 +60,7 @@ Test mode (optional) #### Defined in -[types/interfaces/enft.interface.ts:22](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L22) +[types/interfaces/enft.interface.ts:22](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L22) ___ @@ -72,7 +72,7 @@ Token type (optional) #### Defined in -[types/interfaces/enft.interface.ts:14](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L14) +[types/interfaces/enft.interface.ts:14](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L14) ___ @@ -84,7 +84,7 @@ Transaction hash (only required for debugTransaction) #### Defined in -[types/interfaces/enft.interface.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L12) +[types/interfaces/enft.interface.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L12) ___ @@ -96,4 +96,4 @@ Twitter api config for built-in notification (optional) #### Defined in -[types/interfaces/enft.interface.ts:18](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L18) +[types/interfaces/enft.interface.ts:18](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L18) diff --git a/docs/interfaces/Config.md b/docs/interfaces/Config.md index dc4cabde..eb49d7a5 100644 --- a/docs/interfaces/Config.md +++ b/docs/interfaces/Config.md @@ -19,7 +19,7 @@ #### Defined in -[types/interfaces/enft.interface.ts:26](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L26) +[types/interfaces/enft.interface.ts:26](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L26) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:28](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L28) +[types/interfaces/enft.interface.ts:28](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L28) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:29](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L29) +[types/interfaces/enft.interface.ts:29](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L29) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:27](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L27) +[types/interfaces/enft.interface.ts:27](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L27) diff --git a/docs/interfaces/Options.md b/docs/interfaces/Options.md index ccf6eff3..d666f59b 100644 --- a/docs/interfaces/Options.md +++ b/docs/interfaces/Options.md @@ -19,7 +19,7 @@ #### Defined in -[types/interfaces/enft.interface.ts:33](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L33) +[types/interfaces/enft.interface.ts:33](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L33) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:35](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L35) +[types/interfaces/enft.interface.ts:35](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L35) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:36](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L36) +[types/interfaces/enft.interface.ts:36](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L36) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:34](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L34) +[types/interfaces/enft.interface.ts:34](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L34) diff --git a/docs/interfaces/Swap.md b/docs/interfaces/Swap.md index 9c4d7d69..63c5f8c2 100644 --- a/docs/interfaces/Swap.md +++ b/docs/interfaces/Swap.md @@ -17,7 +17,7 @@ #### Defined in -[types/contracts/swap.contract.ts:4](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/swap.contract.ts#L4) +[types/contracts/swap.contract.ts:4](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/swap.contract.ts#L4) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[types/contracts/swap.contract.ts:5](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/swap.contract.ts#L5) +[types/contracts/swap.contract.ts:5](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/swap.contract.ts#L5) diff --git a/docs/interfaces/SwapData.md b/docs/interfaces/SwapData.md index 1920cda9..8a32a625 100644 --- a/docs/interfaces/SwapData.md +++ b/docs/interfaces/SwapData.md @@ -19,7 +19,7 @@ #### Defined in -[types/contracts/swap.contract.ts:10](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/swap.contract.ts#L10) +[types/contracts/swap.contract.ts:10](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/swap.contract.ts#L10) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/contracts/swap.contract.ts:9](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/swap.contract.ts#L9) +[types/contracts/swap.contract.ts:9](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/swap.contract.ts#L9) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/contracts/swap.contract.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/swap.contract.ts#L12) +[types/contracts/swap.contract.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/swap.contract.ts#L12) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/contracts/swap.contract.ts:11](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/swap.contract.ts#L11) +[types/contracts/swap.contract.ts:11](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/swap.contract.ts#L11) diff --git a/docs/interfaces/TwitterConfig.md b/docs/interfaces/TwitterConfig.md index 8e1538c6..6a31f3a4 100644 --- a/docs/interfaces/TwitterConfig.md +++ b/docs/interfaces/TwitterConfig.md @@ -19,7 +19,7 @@ #### Defined in -[types/interfaces/enft.interface.ts:43](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L43) +[types/interfaces/enft.interface.ts:43](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L43) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:42](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L42) +[types/interfaces/enft.interface.ts:42](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L42) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:40](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L40) +[types/interfaces/enft.interface.ts:40](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L40) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[types/interfaces/enft.interface.ts:41](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/enft.interface.ts#L41) +[types/interfaces/enft.interface.ts:41](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/enft.interface.ts#L41) diff --git a/docs/modules.md b/docs/modules.md index 8c93bd3d..a11966b7 100644 --- a/docs/modules.md +++ b/docs/modules.md @@ -56,7 +56,7 @@ #### Defined in -[types/interfaces/auth.interface.ts:41](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/auth.interface.ts#L41) +[types/interfaces/auth.interface.ts:41](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/auth.interface.ts#L41) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[types/interfaces/auth.interface.ts:39](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/auth.interface.ts#L39) +[types/interfaces/auth.interface.ts:39](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/auth.interface.ts#L39) ___ @@ -96,7 +96,7 @@ ___ #### Defined in -[types/utils/type.utils.ts:1](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/utils/type.utils.ts#L1) +[types/utils/type.utils.ts:1](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/utils/type.utils.ts#L1) ___ @@ -116,7 +116,7 @@ ___ #### Defined in -[types/contracts/seaport.contract.ts:11](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/seaport.contract.ts#L11) +[types/contracts/seaport.contract.ts:11](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/seaport.contract.ts#L11) ___ @@ -134,7 +134,7 @@ ___ #### Defined in -[types/contracts/token.contract.ts:21](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/token.contract.ts#L21) +[types/contracts/token.contract.ts:21](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/token.contract.ts#L21) ___ @@ -144,7 +144,7 @@ ___ #### Defined in -[types/models/market.model.ts:31](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/models/market.model.ts#L31) +[types/models/market.model.ts:31](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/models/market.model.ts#L31) ___ @@ -154,7 +154,7 @@ ___ #### Defined in -[types/models/market.model.ts:24](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/models/market.model.ts#L24) +[types/models/market.model.ts:24](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/models/market.model.ts#L24) ___ @@ -177,7 +177,7 @@ ___ #### Defined in -[types/models/market.model.ts:1](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/models/market.model.ts#L1) +[types/models/market.model.ts:1](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/models/market.model.ts#L1) ___ @@ -187,7 +187,7 @@ ___ #### Defined in -[types/models/market.model.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/models/market.model.ts#L12) +[types/models/market.model.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/models/market.model.ts#L12) ___ @@ -206,7 +206,7 @@ ___ #### Defined in -[types/contracts/seaport.contract.ts:4](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/seaport.contract.ts#L4) +[types/contracts/seaport.contract.ts:4](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/seaport.contract.ts#L4) ___ @@ -223,7 +223,7 @@ ___ #### Defined in -[types/interfaces/auth.interface.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/interfaces/auth.interface.ts#L12) +[types/interfaces/auth.interface.ts:12](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/interfaces/auth.interface.ts#L12) ___ @@ -244,7 +244,7 @@ ___ #### Defined in -[types/contracts/swap.contract.ts:15](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/swap.contract.ts#L15) +[types/contracts/swap.contract.ts:15](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/swap.contract.ts#L15) ___ @@ -263,7 +263,7 @@ ___ #### Defined in -[types/contracts/token.contract.ts:5](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/token.contract.ts#L5) +[types/contracts/token.contract.ts:5](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/token.contract.ts#L5) ___ @@ -273,7 +273,7 @@ ___ #### Defined in -[types/contracts/token.contract.ts:3](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/contracts/token.contract.ts#L3) +[types/contracts/token.contract.ts:3](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/contracts/token.contract.ts#L3) ___ @@ -307,4 +307,4 @@ ___ #### Defined in -[types/models/transaction.model.ts:8](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/a276033/src/types/models/transaction.model.ts#L8) +[types/models/transaction.model.ts:8](https://github.com/kenryu42/ethereum-nft-sales-bot/blob/d8d9fbf/src/types/models/transaction.model.ts#L8) diff --git a/package-lock.json b/package-lock.json index 21c4603c..9b6596b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "async-retry": "^1.3.3", "axios": "^1.3.3", "ethers": "^6.0.4", - "form-data": "^4.0.0", "gifenc": "^1.0.3", "joi": "^17.7.1", "sharp": "^0.31.3", diff --git a/package.json b/package.json index 7d45fb72..c4c28dc4 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/kenryu42/ethereum-nft-sales-bot#readme", "engines": { - "node": ">=16.0.0", + "node": ">=18.0.0", "npm": ">=8.0.0" }, "publishConfig": { @@ -52,7 +52,6 @@ "async-retry": "^1.3.3", "axios": "^1.3.3", "ethers": "^6.0.4", - "form-data": "^4.0.0", "gifenc": "^1.0.3", "joi": "^17.7.1", "sharp": "^0.31.3", diff --git a/src/_version.ts b/src/_version.ts index 2b27d82a..19653528 100644 --- a/src/_version.ts +++ b/src/_version.ts @@ -1,3 +1,3 @@ -const version = '1.0.5'; +const version = '1.0.6'; export default version; diff --git a/src/discord/handleEmbedMessage.ts b/src/discord/handleEmbedMessage.ts index 52684bba..bba9a56b 100644 --- a/src/discord/handleEmbedMessage.ts +++ b/src/discord/handleEmbedMessage.ts @@ -1,6 +1,5 @@ import axios from 'axios'; import retry from 'async-retry'; -import FormData from 'form-data'; import { getEthUsdPrice } from '../api/api.js'; import { formatPrice } from '../utils/helper.js'; import { Logger, log } from '../Logger/index.js'; @@ -170,14 +169,22 @@ const setImageField = async ( if (tokenVariants > 1) { tx.gifImage = await createGif(tx.tokens); - data.append('file', tx.gifImage, 'image.gif'); + data.append( + 'file', + new Blob([tx.gifImage], { type: 'image/gif' }), + 'image.gif' + ); embed.image = { url: 'attachment://image.gif' }; } else { const sharpImage = await parseImage(token.image); const imageBuffer = await sharpImage.resize(512).png().toBuffer(); const fileName = `${tokenId}.png`; - data.append('file', imageBuffer, fileName); + data.append( + 'file', + new Blob([imageBuffer], { type: 'image/png' }), + fileName + ); embed.image = { url: `attachment://${fileName}` }; } }; @@ -224,7 +231,11 @@ const setSwapFields = async ( embed.color = tx.interactedMarket.color; embed.timestamp = new Date(Date.now()).toISOString(); embed.image = { url: 'attachment://image.gif' }; - data.append('file', tx.gifImage, 'image.gif'); + data.append( + 'file', + new Blob([tx.gifImage], { type: 'image/gif' }), + 'image.gif' + ); }; /** @@ -339,7 +350,7 @@ const sendEmbedMessage = async ( const config = { headers: { - ...data.getHeaders() + 'Content-Type': 'multipart/form-data' } }; diff --git a/src/twitter/handleTweet.ts b/src/twitter/handleTweet.ts index b6fd79c2..1162cf25 100644 --- a/src/twitter/handleTweet.ts +++ b/src/twitter/handleTweet.ts @@ -95,6 +95,7 @@ const sendSweepTweet = async ( client: TwitterApi ): Promise => { const titleName = tx.contractData.name || tx.contractData.symbol; + const stolen = tx.totalPrice === 0 ? '(Possibly stolen. 🚨)' : ''; const content = ` ${tx.totalAmount} ${titleName} sold for ${formatPrice(tx.totalPrice)} ${ @@ -102,6 +103,7 @@ ${tx.totalAmount} ${titleName} sold for ${formatPrice(tx.totalPrice)} ${ } ${tx.usdPrice ? `($${tx.usdPrice})` : ''} on ${ tx.interactedMarket.displayName } +${stolen} ${tx.isBlurBid ? 'Seller' : 'Sweeper'}: ${tx.toAddrName} ${tx.interactedMarket.accountPage}${tx.toAddr} @@ -131,6 +133,7 @@ const sendSaleTweet = async ( const tokenId = Object.keys(tx.tokens)[0]; const token = tx.tokens[tokenId]; const isX2Y2 = tx.interactedMarket.name === 'x2y2' ? '/items' : ''; + const stolen = tx.totalPrice === 0 ? '(Possibly stolen. 🚨)' : ''; const content = ` ${token.name || `${tx.contractData.symbol} #${tokenId}`} sold for ${formatPrice( @@ -138,6 +141,7 @@ ${token.name || `${tx.contractData.symbol} #${tokenId}`} sold for ${formatPrice( )} ${tx.currency.name} ${tx.usdPrice ? `($${tx.usdPrice})` : ''} on ${ tx.interactedMarket.displayName } +${stolen} From: ${tx.fromAddrName} ${tx.interactedMarket.accountPage}${tx.fromAddr}${isX2Y2}