diff --git a/.changeset/two-sloths-remember.md b/.changeset/two-sloths-remember.md deleted file mode 100644 index 51e1b33564..0000000000 --- a/.changeset/two-sloths-remember.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@moralisweb3/evm-api': patch -'@moralisweb3/evm-utils': patch ---- - -Due to inconsistencies in the api regarding `contractType` on NFT datatypes, we have removed the tight validation check. This means that the type is not 'ERC721' | 'ERC1155' anymore, but a string. This allows other contractTypes to be parsed without throwing errors diff --git a/demos/cli/package.json b/demos/cli/package.json index cc3d1ba0da..1d4f984d3c 100644 --- a/demos/cli/package.json +++ b/demos/cli/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "dotenv": "^16.0.1", - "moralis": "^2.6.5" + "moralis": "^2.6.6" }, "devDependencies": { "@moralisweb3/eslint-config": "^1.0.1", diff --git a/demos/express-proxy/package.json b/demos/express-proxy/package.json index 72bc6cd4ef..2e4146ad92 100644 --- a/demos/express-proxy/package.json +++ b/demos/express-proxy/package.json @@ -4,13 +4,13 @@ "main": "dist/index.js", "private": true, "dependencies": { - "@moralisweb3/core": "^2.6.5", + "@moralisweb3/core": "^2.6.6", "@types/express-rate-limit": "^6.0.0", "dotenv": "^16.0.1", "envalid": "7.3.1", "express": "^4.18.1", "express-rate-limit": "^6.5.1", - "moralis": "^2.6.5", + "moralis": "^2.6.6", "redis": "^4.2.0", "cors": "^2.8.5" }, diff --git a/demos/firebase-auth-ext/hosting/package.json b/demos/firebase-auth-ext/hosting/package.json index 5758dc02ea..e59bd89cfb 100644 --- a/demos/firebase-auth-ext/hosting/package.json +++ b/demos/firebase-auth-ext/hosting/package.json @@ -4,9 +4,9 @@ "private": true, "dependencies": { "@ethersproject/providers": "^5.7.1", - "@moralisweb3/client-firebase-auth-utils": "^2.6.5", - "@moralisweb3/client-firebase-evm-auth": "^2.6.5", - "@moralisweb3/client-firebase-sol-auth": "^2.6.5", + "@moralisweb3/client-firebase-auth-utils": "^2.6.6", + "@moralisweb3/client-firebase-evm-auth": "^2.6.6", + "@moralisweb3/client-firebase-sol-auth": "^2.6.6", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/demos/firebase-proxy/functions/package.json b/demos/firebase-proxy/functions/package.json index d6ba19db65..eafdd7c495 100644 --- a/demos/firebase-proxy/functions/package.json +++ b/demos/firebase-proxy/functions/package.json @@ -19,7 +19,7 @@ "firebase-admin": "^10.0.2", "firebase-functions": "^3.18.0", "firebase-functions-rate-limiter": "^3.9.1", - "moralis": "^2.6.5" + "moralis": "^2.6.6" }, "devDependencies": { "@firebase/app-types": "^0.7.0", diff --git a/demos/moralis-stream/package.json b/demos/moralis-stream/package.json index a04200a782..9dfa15e462 100644 --- a/demos/moralis-stream/package.json +++ b/demos/moralis-stream/package.json @@ -4,11 +4,11 @@ "main": "dist/index.js", "private": true, "dependencies": { - "@moralisweb3/core": "^2.6.5", + "@moralisweb3/core": "^2.6.6", "dotenv": "^16.0.1", "envalid": "7.3.1", "express": "^4.18.1", - "moralis": "^2.6.5", + "moralis": "^2.6.6", "ngrok": "^4.3.3", "redis": "^4.2.0", "web3-utils": "^1.7.5", diff --git a/demos/nextjs/package.json b/demos/nextjs/package.json index 11a1bf29cc..a685e8e322 100644 --- a/demos/nextjs/package.json +++ b/demos/nextjs/package.json @@ -12,7 +12,7 @@ "axios": "^0.27.2", "eslint": "^8.22.0", "ethers": "5.6.9", - "moralis": "^2.6.5", + "moralis": "^2.6.6", "next": "12.2.5", "next-auth": "4.10.3", "react": "^18.2.0", diff --git a/demos/parse-server/package.json b/demos/parse-server/package.json index feb511819c..dafc7f650e 100644 --- a/demos/parse-server/package.json +++ b/demos/parse-server/package.json @@ -5,14 +5,14 @@ "private": true, "dependencies": { "@codemirror/language": "^0.20.0", - "@moralisweb3/core": "^2.6.5", + "@moralisweb3/core": "^2.6.6", "dotenv": "^16.0.1", "envalid": "7.3.1", "express": "^4.18.1", "express-rate-limit": "^6.5.1", "graphql": "^16.6.0", "graphql-ws": "^5.10.1", - "moralis": "^2.6.5", + "moralis": "^2.6.6", "parse-dashboard": "^4.1.4", "parse-server": "^5.2.7" }, diff --git a/demos/supabase-auth/package.json b/demos/supabase-auth/package.json index 2981ee7e32..d48e9f7492 100644 --- a/demos/supabase-auth/package.json +++ b/demos/supabase-auth/package.json @@ -4,13 +4,13 @@ "main": "dist/index.js", "private": true, "dependencies": { - "@moralisweb3/core": "^2.6.5", + "@moralisweb3/core": "^2.6.6", "@supabase/supabase-js": "^1.35.4", "dotenv": "^16.0.1", "envalid": "7.3.1", "express": "^4.18.1", "jsonwebtoken": "^8.5.1", - "moralis": "^2.6.5", + "moralis": "^2.6.6", "uuid": "^8.3.2", "cors": "^2.8.5" }, diff --git a/packages/apiUtils/CHANGELOG.md b/packages/apiUtils/CHANGELOG.md index f2cb1a66e8..f31386a089 100644 --- a/packages/apiUtils/CHANGELOG.md +++ b/packages/apiUtils/CHANGELOG.md @@ -1,5 +1,12 @@ # @moralisweb3/api-utils +## 2.6.6 + +### Patch Changes + +- Updated dependencies []: + - @moralisweb3/core@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/apiUtils/package.json b/packages/apiUtils/package.json index 4829d1d1c4..8c1dd798f6 100644 --- a/packages/apiUtils/package.json +++ b/packages/apiUtils/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/api-utils", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -15,16 +15,16 @@ "test:coverage": "yarn run test --coverage --coverageReporters json-summary", "test:watch": "yarn run test --watch", "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", "build": "tsc", "dev": "tsc --watch" }, "devDependencies": { "prettier": "^2.5.1", "typescript": "^4.5.5", - "@moralisweb3/evm-utils": "^2.6.5" + "@moralisweb3/evm-utils": "^2.6.6" }, "dependencies": { - "@moralisweb3/core": "^2.6.5" + "@moralisweb3/core": "^2.6.6" } } diff --git a/packages/auth/CHANGELOG.md b/packages/auth/CHANGELOG.md index 5323ffc528..dda28430d8 100644 --- a/packages/auth/CHANGELOG.md +++ b/packages/auth/CHANGELOG.md @@ -1,5 +1,15 @@ # @moralisweb3/auth +## 2.6.6 + +### Patch Changes + +- Updated dependencies [[`11ba50f7`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/11ba50f7ad4b43dd22eeb227452bc1be6c8888e4), [`d87f37c5`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/d87f37c5a56d5db5ca79ede9bb463d6ad20a13ab)]: + - @moralisweb3/evm-utils@2.6.6 + - @moralisweb3/core@2.6.6 + - @moralisweb3/api-utils@2.6.6 + - @moralisweb3/sol-utils@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/auth/package.json b/packages/auth/package.json index 030d9f0d9c..b4ea762806 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/auth", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -15,7 +15,7 @@ "test:coverage": "yarn run test --coverage --coverageReporters json-summary", "test:watch": "yarn run test --watch", "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", "gen:api-typeses": "openapi-typescript https://authapi.moralis.io/api-docs-json --output src/generated/types.ts", "build": "tsc -p tsconfig.build.json", "dev": "tsc --watch" @@ -28,9 +28,9 @@ "typescript": "^4.5.5" }, "dependencies": { - "@moralisweb3/api-utils": "^2.6.5", - "@moralisweb3/core": "^2.6.5", - "@moralisweb3/evm-utils": "^2.6.5", - "@moralisweb3/sol-utils": "^2.6.5" + "@moralisweb3/api-utils": "^2.6.6", + "@moralisweb3/core": "^2.6.6", + "@moralisweb3/evm-utils": "^2.6.6", + "@moralisweb3/sol-utils": "^2.6.6" } } diff --git a/packages/client/firebaseAuthUtils/CHANGELOG.md b/packages/client/firebaseAuthUtils/CHANGELOG.md index c76a09938f..acef11b86c 100644 --- a/packages/client/firebaseAuthUtils/CHANGELOG.md +++ b/packages/client/firebaseAuthUtils/CHANGELOG.md @@ -1,5 +1,7 @@ # @moralisweb3/client-firebase-auth-utils +## 2.6.6 + ## 2.6.5 ## 2.6.4 diff --git a/packages/client/firebaseAuthUtils/package.json b/packages/client/firebaseAuthUtils/package.json index ecc35f003c..eb9624c33f 100644 --- a/packages/client/firebaseAuthUtils/package.json +++ b/packages/client/firebaseAuthUtils/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/client-firebase-auth-utils", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", diff --git a/packages/client/firebaseEvmAuth/CHANGELOG.md b/packages/client/firebaseEvmAuth/CHANGELOG.md index d477171ab7..2d6bf198fc 100644 --- a/packages/client/firebaseEvmAuth/CHANGELOG.md +++ b/packages/client/firebaseEvmAuth/CHANGELOG.md @@ -1,5 +1,12 @@ # @moralisweb3/client-firebase-evm-auth +## 2.6.6 + +### Patch Changes + +- Updated dependencies []: + - @moralisweb3/client-firebase-auth-utils@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/client/firebaseEvmAuth/package.json b/packages/client/firebaseEvmAuth/package.json index bccaeece31..ce6f8c178d 100644 --- a/packages/client/firebaseEvmAuth/package.json +++ b/packages/client/firebaseEvmAuth/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/client-firebase-evm-auth", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -22,7 +22,7 @@ }, "dependencies": { "firebase": "^9.10.0", - "@moralisweb3/client-firebase-auth-utils": "^2.6.5", + "@moralisweb3/client-firebase-auth-utils": "^2.6.6", "@ethersproject/providers": "^5.7.1", "@metamask/detect-provider": "^1.2.0" } diff --git a/packages/client/firebaseSolAuth/CHANGELOG.md b/packages/client/firebaseSolAuth/CHANGELOG.md index 704ce705cd..8897ca0c89 100644 --- a/packages/client/firebaseSolAuth/CHANGELOG.md +++ b/packages/client/firebaseSolAuth/CHANGELOG.md @@ -1,5 +1,12 @@ # @moralisweb3/client-firebase-sol-auth +## 2.6.6 + +### Patch Changes + +- Updated dependencies []: + - @moralisweb3/client-firebase-auth-utils@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/client/firebaseSolAuth/package.json b/packages/client/firebaseSolAuth/package.json index ed4e324dd8..6092bc785c 100644 --- a/packages/client/firebaseSolAuth/package.json +++ b/packages/client/firebaseSolAuth/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/client-firebase-sol-auth", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -22,7 +22,7 @@ }, "dependencies": { "firebase": "^9.10.0", - "@moralisweb3/client-firebase-auth-utils": "^2.6.5", + "@moralisweb3/client-firebase-auth-utils": "^2.6.6", "bs58": "^5.0.0" } } diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index fe2c6b3d7e..323a00d73f 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,7 @@ # @moralisweb3/core +## 2.6.6 + ## 2.6.5 ## 2.6.4 diff --git a/packages/core/package.json b/packages/core/package.json index 93ee058f97..b58f81f4fb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/core", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -15,7 +15,7 @@ "test:coverage": "yarn run test --coverage --coverageReporters json-summary", "test:watch": "yarn run test --watch", "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", "prebuild": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts", "build": "tsc -p tsconfig.build.json", "dev": "tsc --watch" diff --git a/packages/evmApi/CHANGELOG.md b/packages/evmApi/CHANGELOG.md index 34fbc537f8..b37aa8455c 100644 --- a/packages/evmApi/CHANGELOG.md +++ b/packages/evmApi/CHANGELOG.md @@ -1,5 +1,16 @@ # @moralisweb3/evm-api +## 2.6.6 + +### Patch Changes + +- [#749](https://github.com/MoralisWeb3/Moralis-JS-SDK/pull/749) [`d87f37c5`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/d87f37c5a56d5db5ca79ede9bb463d6ad20a13ab) Thanks [@ErnoW](https://github.com/ErnoW)! - Due to inconsistencies in the api regarding `contractType` on NFT datatypes, we have removed the tight validation check. This means that the type is not 'ERC721' | 'ERC1155' anymore, but a string. This allows other contractTypes to be parsed without throwing errors + +- Updated dependencies [[`11ba50f7`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/11ba50f7ad4b43dd22eeb227452bc1be6c8888e4), [`d87f37c5`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/d87f37c5a56d5db5ca79ede9bb463d6ad20a13ab)]: + - @moralisweb3/evm-utils@2.6.6 + - @moralisweb3/core@2.6.6 + - @moralisweb3/api-utils@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/evmApi/package.json b/packages/evmApi/package.json index ac1fae16e5..64f8299201 100644 --- a/packages/evmApi/package.json +++ b/packages/evmApi/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/evm-api", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -15,7 +15,7 @@ "test:coverage": "yarn run test --coverage --coverageReporters json-summary", "test:watch": "yarn run test --watch", "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", "gen:api-types": "openapi-typescript https://deep-index.moralis.io/api-docs-2.1/v2.1/swagger.json --output src/generated/types.ts", "build": "tsc -p tsconfig.build.json", "dev": "tsc --watch" @@ -26,8 +26,8 @@ "typescript": "^4.5.5" }, "dependencies": { - "@moralisweb3/api-utils": "^2.6.5", - "@moralisweb3/core": "^2.6.5", - "@moralisweb3/evm-utils": "^2.6.5" + "@moralisweb3/api-utils": "^2.6.6", + "@moralisweb3/core": "^2.6.6", + "@moralisweb3/evm-utils": "^2.6.6" } } diff --git a/packages/evmApi/src/generated/types.ts b/packages/evmApi/src/generated/types.ts index 5edc200f8f..a39dc8cda2 100644 --- a/packages/evmApi/src/generated/types.ts +++ b/packages/evmApi/src/generated/types.ts @@ -252,6 +252,11 @@ export interface components { topic2: string; /** @example null */ topic3: string; + /** + * @description Respective Chain Id + * @example 1 + */ + chainId: string; }; logEvent: { /** @@ -290,6 +295,11 @@ export interface components { }; }; log: { + /** + * @description Respective Chain Id + * @example 1 + */ + chainId: string; /** @example 273 */ log_index: string; /** diff --git a/packages/evmApi/src/resolvers/block/getBlock.ts b/packages/evmApi/src/resolvers/block/getBlock.ts index 97662c0269..6b187a5ec7 100644 --- a/packages/evmApi/src/resolvers/block/getBlock.ts +++ b/packages/evmApi/src/resolvers/block/getBlock.ts @@ -55,6 +55,7 @@ const apiToResult = (core: MoralisCore, apiData: ApiResult, params: Params) => { blockTimestamp: log.blockTimestamp, logIndex: +log.logIndex, transactionIndex: +log.transactionIndex, + chain: log.chainId, }), ), }, diff --git a/packages/evmApi/src/resolvers/events/getContractLogs.ts b/packages/evmApi/src/resolvers/events/getContractLogs.ts index f4724ee097..b59b28a150 100644 --- a/packages/evmApi/src/resolvers/events/getContractLogs.ts +++ b/packages/evmApi/src/resolvers/events/getContractLogs.ts @@ -30,6 +30,7 @@ export const getContractLogs = createPaginatedEndpointFactory((core) => // eslint-disable-next-line @typescript-eslint/no-non-null-assertion topics: [log.topic0, log.topic1!, log.topic2!, log.topic3!], blockNumber: Number(log.block_number), + chain: log.chainId, }, core, ), diff --git a/packages/evmApi/src/resolvers/transaction/getTransaction.ts b/packages/evmApi/src/resolvers/transaction/getTransaction.ts index 64dcd6a8fe..0a163fc74e 100644 --- a/packages/evmApi/src/resolvers/transaction/getTransaction.ts +++ b/packages/evmApi/src/resolvers/transaction/getTransaction.ts @@ -53,6 +53,7 @@ export const getTransaction = createEndpointFactory((core) => blockTimestamp: log.block_timestamp, logIndex: +log.log_index, transactionIndex: +log.transaction_index, + chain: EvmChainResolver.resolve(log.chainId, core), }, core, ), diff --git a/packages/evmUtils/CHANGELOG.md b/packages/evmUtils/CHANGELOG.md index c79490b313..73aeab2fd3 100644 --- a/packages/evmUtils/CHANGELOG.md +++ b/packages/evmUtils/CHANGELOG.md @@ -1,5 +1,16 @@ # @moralisweb3/evm-utils +## 2.6.6 + +### Patch Changes + +- [#762](https://github.com/MoralisWeb3/Moralis-JS-SDK/pull/762) [`11ba50f7`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/11ba50f7ad4b43dd22eeb227452bc1be6c8888e4) Thanks [@ErnoW](https://github.com/ErnoW)! - Better equality check for EvmTransactionReceipt: chain+hash+address + +* [#749](https://github.com/MoralisWeb3/Moralis-JS-SDK/pull/749) [`d87f37c5`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/d87f37c5a56d5db5ca79ede9bb463d6ad20a13ab) Thanks [@ErnoW](https://github.com/ErnoW)! - Due to inconsistencies in the api regarding `contractType` on NFT datatypes, we have removed the tight validation check. This means that the type is not 'ERC721' | 'ERC1155' anymore, but a string. This allows other contractTypes to be parsed without throwing errors + +* Updated dependencies []: + - @moralisweb3/core@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/evmUtils/package.json b/packages/evmUtils/package.json index 40d3fc7874..2fe0c04f23 100644 --- a/packages/evmUtils/package.json +++ b/packages/evmUtils/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/evm-utils", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -15,8 +15,8 @@ "test:coverage": "yarn run test --coverage --coverageReporters json-summary", "test:watch": "yarn run test --watch", "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", - "build": "tsc", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "build": "tsc -p tsconfig.build.json", "dev": "tsc --watch" }, "devDependencies": { @@ -27,6 +27,6 @@ "dependencies": { "@ethersproject/address": "^5.6.0", "@ethersproject/transactions": "^5.6.0", - "@moralisweb3/core": "^2.6.5" + "@moralisweb3/core": "^2.6.6" } } diff --git a/packages/evmUtils/src/dataTypes/EvmTransactionLog/EvmTransactionLog.test.ts b/packages/evmUtils/src/dataTypes/EvmTransactionLog/EvmTransactionLog.test.ts index 40a6726d2b..d547c46400 100644 --- a/packages/evmUtils/src/dataTypes/EvmTransactionLog/EvmTransactionLog.test.ts +++ b/packages/evmUtils/src/dataTypes/EvmTransactionLog/EvmTransactionLog.test.ts @@ -14,6 +14,7 @@ const INVALID_ADDRESS = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96000'; const DATA = '0x00000000000000000000000000000000000000000000213ba4fc56e2e24648b200000000000000000000000000000000000000000000002e9e527eb8ff21faf7'; const TOPIC = ['0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1']; +const CHAIN = '0x1'; const inputWithAllData = { logIndex: LOG_INDEX, @@ -25,9 +26,11 @@ const inputWithAllData = { blockHash: BLOCK_HASH, blockNumber: BLOCK_NUMBER, blockTimestamp: BLOCK_TIMESTAMP, + chain: CHAIN, }; const inputWithoutOptionalData = { + chain: CHAIN, transactionHash: TRANSACTION_HASH, address: ADDRESS, data: DATA, @@ -46,6 +49,7 @@ const inputWithInvalidData = { blockHash: BLOCK_HASH, blockNumber: BLOCK_NUMBER, blockTimestamp: BLOCK_TIMESTAMP, + chain: CHAIN, }; describe('EvmTransactionLog', () => { @@ -86,9 +90,39 @@ describe('EvmTransactionLog', () => { expect(equality).toBe(true); }); - it('should confirm inequality of 2 EvmTransactionLog', () => { + it('should confirm inequality of 2 EvmTransactionLog on transactionHash mismatch', () => { const transactionLogA = EvmTransactionLog.create(inputWithAllData); - const transactionLogB = EvmTransactionLog.create(inputWithoutOptionalData); + const transactionLogB = EvmTransactionLog.create({ + ...inputWithAllData, + transactionHash: '0x9a05a830919012da906d76c18b30e64b45df2c914988d2553f78362d4b5d8b0f', + }); + const equality = transactionLogA.equals(transactionLogB); + + expect(equality).toBe(false); + }); + + it('should confirm inequality of 2 EvmTransactionLog on address mismatch', () => { + const transactionLogA = EvmTransactionLog.create(inputWithAllData); + const transactionLogB = EvmTransactionLog.create({ + ...inputWithAllData, + address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96046', + }); + const equality = transactionLogA.equals(transactionLogB); + + expect(equality).toBe(false); + }); + + it('should confirm inequality of 2 EvmTransactionLog on logIndex mismatch', () => { + const transactionLogA = EvmTransactionLog.create(inputWithAllData); + const transactionLogB = EvmTransactionLog.create({ ...inputWithAllData, logIndex: 13 }); + const equality = transactionLogA.equals(transactionLogB); + + expect(equality).toBe(false); + }); + + it('should confirm inequality of 2 EvmTransactionLog on chain mismatch', () => { + const transactionLogA = EvmTransactionLog.create(inputWithAllData); + const transactionLogB = EvmTransactionLog.create({ ...inputWithAllData, chain: '0x2' }); const equality = transactionLogA.equals(transactionLogB); expect(equality).toBe(false); diff --git a/packages/evmUtils/src/dataTypes/EvmTransactionLog/EvmTransactionLog.ts b/packages/evmUtils/src/dataTypes/EvmTransactionLog/EvmTransactionLog.ts index e9684fcfd2..de4833b754 100644 --- a/packages/evmUtils/src/dataTypes/EvmTransactionLog/EvmTransactionLog.ts +++ b/packages/evmUtils/src/dataTypes/EvmTransactionLog/EvmTransactionLog.ts @@ -1,6 +1,7 @@ import MoralisCore, { maybe, MoralisCoreProvider, MoralisDataObject } from '@moralisweb3/core'; import { EvmAddress } from '../EvmAddress'; import { EvmTransactionLogData, EvmTransactionLogInput } from './types'; +import { EvmChain } from '../EvmChain'; /** * This can be any valid {@link EvmTransactionLogInput} or {@link EvmTransactionLog}. @@ -48,6 +49,7 @@ export class EvmTransactionLog implements MoralisDataObject { blockNumber: value.blockNumber, blockTimestamp: value.blockTimestamp, address: EvmAddress.create(value.address, core), + chain: EvmChain.create(value.chain, core), }; } @@ -65,7 +67,8 @@ export class EvmTransactionLog implements MoralisDataObject { return ( value._value.transactionHash === this._value.transactionHash && value._value.address.equals(this._value.address) && - value._value.logIndex === this._value.logIndex + value._value.logIndex === this._value.logIndex && + value._value.chain.equals(this._value.chain) ); } @@ -84,6 +87,7 @@ export class EvmTransactionLog implements MoralisDataObject { return { ...value, address: value.address.format(), + chain: value.chain?.format(), }; } @@ -208,4 +212,16 @@ export class EvmTransactionLog implements MoralisDataObject { get blockTimestamp() { return this._value.blockTimestamp; } + + /** + * @returns the chainId for the particular log. + * + * @example + * ```ts + * log.chainId; // "1" + * ``` + */ + get chain() { + return this._value.chain; + } } diff --git a/packages/evmUtils/src/dataTypes/EvmTransactionLog/types.ts b/packages/evmUtils/src/dataTypes/EvmTransactionLog/types.ts index 1fb744c120..110662c4b0 100644 --- a/packages/evmUtils/src/dataTypes/EvmTransactionLog/types.ts +++ b/packages/evmUtils/src/dataTypes/EvmTransactionLog/types.ts @@ -1,4 +1,5 @@ import { EvmAddressish, EvmAddress } from '../EvmAddress'; +import { EvmChain, EvmChainish } from '../EvmChain'; /** * Valid EvmTransactionLog input. @@ -15,6 +16,7 @@ import { EvmAddressish, EvmAddress } from '../EvmAddress'; * blockTimestamp: "2021-05-07T11:08:35.000Z", * logIndex: "273", * transactionIndex: "204", + * chain: "1" * } * ``` */ @@ -28,6 +30,7 @@ export interface EvmTransactionLogInput { blockHash: string; blockNumber: number; blockTimestamp?: string; + chain: EvmChainish; } /** @@ -43,4 +46,5 @@ export interface EvmTransactionLogData { blockHash: string; blockNumber: number; blockTimestamp?: string; + chain: EvmChain; } diff --git a/packages/evmUtils/tsconfig.build.json b/packages/evmUtils/tsconfig.build.json new file mode 100644 index 0000000000..b4c56f4a53 --- /dev/null +++ b/packages/evmUtils/tsconfig.build.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./lib/", + "declarationDir": "./lib/", + "rootDir": "./src" + }, + "exclude": ["test/**/*", "**/__mocks__/*", "**/test/*", "**/*.test.ts", "integration/**/*"] +} diff --git a/packages/moralis/CHANGELOG.md b/packages/moralis/CHANGELOG.md index 7e20ffb323..bfd9884452 100644 --- a/packages/moralis/CHANGELOG.md +++ b/packages/moralis/CHANGELOG.md @@ -1,5 +1,19 @@ # moralis +## 2.6.6 + +### Patch Changes + +- Updated dependencies [[`11ba50f7`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/11ba50f7ad4b43dd22eeb227452bc1be6c8888e4), [`d87f37c5`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/d87f37c5a56d5db5ca79ede9bb463d6ad20a13ab)]: + - @moralisweb3/evm-utils@2.6.6 + - @moralisweb3/evm-api@2.6.6 + - @moralisweb3/core@2.6.6 + - @moralisweb3/auth@2.6.6 + - @moralisweb3/streams@2.6.6 + - @moralisweb3/api-utils@2.6.6 + - @moralisweb3/sol-utils@2.6.6 + - @moralisweb3/sol-api@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/moralis/package.json b/packages/moralis/package.json index 7514188e4f..e4e15aa93f 100644 --- a/packages/moralis/package.json +++ b/packages/moralis/package.json @@ -1,7 +1,7 @@ { "name": "moralis", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -12,18 +12,18 @@ ], "scripts": { "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", "build": "tsc", "dev": "tsc --watch" }, "dependencies": { - "@moralisweb3/auth": "^2.6.5", - "@moralisweb3/core": "^2.6.5", - "@moralisweb3/streams": "^2.6.5", - "@moralisweb3/api-utils": "^2.6.5", - "@moralisweb3/evm-api": "^2.6.5", - "@moralisweb3/evm-utils": "^2.6.5", - "@moralisweb3/sol-api": "^2.6.5", - "@moralisweb3/sol-utils": "^2.6.5" + "@moralisweb3/auth": "^2.6.6", + "@moralisweb3/core": "^2.6.6", + "@moralisweb3/streams": "^2.6.6", + "@moralisweb3/api-utils": "^2.6.6", + "@moralisweb3/evm-api": "^2.6.6", + "@moralisweb3/evm-utils": "^2.6.6", + "@moralisweb3/sol-api": "^2.6.6", + "@moralisweb3/sol-utils": "^2.6.6" } } diff --git a/packages/solApi/CHANGELOG.md b/packages/solApi/CHANGELOG.md index 50926edf74..81e15936d6 100644 --- a/packages/solApi/CHANGELOG.md +++ b/packages/solApi/CHANGELOG.md @@ -1,5 +1,14 @@ # @moralisweb3/sol-api +## 2.6.6 + +### Patch Changes + +- Updated dependencies []: + - @moralisweb3/core@2.6.6 + - @moralisweb3/api-utils@2.6.6 + - @moralisweb3/sol-utils@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/solApi/package.json b/packages/solApi/package.json index 03497e0e6f..9873544692 100644 --- a/packages/solApi/package.json +++ b/packages/solApi/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/sol-api", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -15,7 +15,7 @@ "test:coverage": "yarn run test --coverage --coverageReporters json-summary", "test:watch": "yarn run test --watch", "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", "gen:api-types": "openapi-typescript https://solana-gateway.moralis.io/api-json/ --output src/generated/types.ts", "build": "tsc -p tsconfig.build.json", "dev": "tsc --watch" @@ -26,8 +26,8 @@ "typescript": "^4.5.5" }, "dependencies": { - "@moralisweb3/api-utils": "^2.6.5", - "@moralisweb3/core": "^2.6.5", - "@moralisweb3/sol-utils": "^2.6.5" + "@moralisweb3/api-utils": "^2.6.6", + "@moralisweb3/core": "^2.6.6", + "@moralisweb3/sol-utils": "^2.6.6" } } diff --git a/packages/solUtils/CHANGELOG.md b/packages/solUtils/CHANGELOG.md index 86562ddef1..294d8bb9d7 100644 --- a/packages/solUtils/CHANGELOG.md +++ b/packages/solUtils/CHANGELOG.md @@ -1,5 +1,12 @@ # @moralisweb3/sol-utils +## 2.6.6 + +### Patch Changes + +- Updated dependencies []: + - @moralisweb3/core@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/solUtils/package.json b/packages/solUtils/package.json index 57f393f4f1..0bf28d5956 100644 --- a/packages/solUtils/package.json +++ b/packages/solUtils/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/sol-utils", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -15,8 +15,8 @@ "test:coverage": "yarn run test --coverage --coverageReporters json-summary", "test:watch": "yarn run test --watch", "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf lib.esm && rm -rf tsconfig.tsbuildinfo", - "build": "tsc", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "build": "tsc -p tsconfig.build.json", "dev": "tsc --watch" }, "devDependencies": { @@ -25,7 +25,7 @@ "typescript": "^4.5.5" }, "dependencies": { - "@moralisweb3/core": "^2.6.5", + "@moralisweb3/core": "^2.6.6", "@solana/web3.js": "^1.56.2" } } diff --git a/packages/solUtils/tsconfig.build.json b/packages/solUtils/tsconfig.build.json new file mode 100644 index 0000000000..b4c56f4a53 --- /dev/null +++ b/packages/solUtils/tsconfig.build.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./lib/", + "declarationDir": "./lib/", + "rootDir": "./src" + }, + "exclude": ["test/**/*", "**/__mocks__/*", "**/test/*", "**/*.test.ts", "integration/**/*"] +} diff --git a/packages/streams/CHANGELOG.md b/packages/streams/CHANGELOG.md index 4199d667fd..25ef378ed2 100644 --- a/packages/streams/CHANGELOG.md +++ b/packages/streams/CHANGELOG.md @@ -1,5 +1,14 @@ # @moralisweb3/streams +## 2.6.6 + +### Patch Changes + +- Updated dependencies [[`11ba50f7`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/11ba50f7ad4b43dd22eeb227452bc1be6c8888e4), [`d87f37c5`](https://github.com/MoralisWeb3/Moralis-JS-SDK/commit/d87f37c5a56d5db5ca79ede9bb463d6ad20a13ab)]: + - @moralisweb3/evm-utils@2.6.6 + - @moralisweb3/core@2.6.6 + - @moralisweb3/api-utils@2.6.6 + ## 2.6.5 ### Patch Changes diff --git a/packages/streams/package.json b/packages/streams/package.json index 637cd5aff2..48b237d118 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -1,7 +1,7 @@ { "name": "@moralisweb3/streams", "author": "Moralis", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "private": false, "main": "./lib/index.js", @@ -15,7 +15,7 @@ "test:coverage": "yarn run test --coverage --coverageReporters json-summary", "test:watch": "yarn run test --watch", "lint": "eslint . --ext .js,.ts,.tsx,jsx", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", "gen:api-types": "openapi-typescript https://api.moralis-streams.com/api-docs/swagger.json --output src/generated/types.ts", "gen:api-types-beta": "openapi-typescript https://streams-api-stage.aws-prod-streams-master-1.moralis.io/api-docs/swagger.json --output src/generated/types.ts", "build": "tsc -p tsconfig.build.json", @@ -32,9 +32,9 @@ "typescript": "^4.5.5" }, "dependencies": { - "@moralisweb3/api-utils": "^2.6.5", - "@moralisweb3/core": "^2.6.5", - "@moralisweb3/evm-utils": "^2.6.5", + "@moralisweb3/api-utils": "^2.6.6", + "@moralisweb3/core": "^2.6.6", + "@moralisweb3/evm-utils": "^2.6.6", "ethereumjs-util": "^7.1.0", "web3-eth-abi": "^1.8.0" } diff --git a/packages/testUtils/package.json b/packages/testUtils/package.json index 98e0056531..b0e198ddd5 100644 --- a/packages/testUtils/package.json +++ b/packages/testUtils/package.json @@ -10,7 +10,7 @@ "sideEffects": false, "scripts": { "lint": "eslint .", - "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf tsconfig.build.tsbuildinfo && rm -rf ./node_modules/.cache/nx", "build": "tsc" }, "devDependencies": {