From 81665fe6792ca572d6070cc8896550c72bbd0991 Mon Sep 17 00:00:00 2001 From: hschiau Date: Tue, 24 Sep 2024 09:14:29 +0300 Subject: [PATCH 1/5] SERVICES-2608: update sdk-core and sdk-native-auth-server - update sdk-core to v13.6.3 - update sdk-native-auth-server to v1.0.19 --- package-lock.json | 320 ++++++++++++++++++++++++++++------------------ package.json | 4 +- 2 files changed, 201 insertions(+), 123 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e3d08bfb..3452beafe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,10 +14,10 @@ "@datastructures-js/priority-queue": "^6.1.0", "@elastic/elasticsearch": "7.12.0", "@golevelup/nestjs-rabbitmq": "^4.0.0", - "@multiversx/sdk-core": "^12.8.0", + "@multiversx/sdk-core": "^13.6.3", "@multiversx/sdk-data-api-client": "^0.5.8", "@multiversx/sdk-exchange": "^0.2.20", - "@multiversx/sdk-native-auth-server": "1.0.15", + "@multiversx/sdk-native-auth-server": "1.0.19", "@multiversx/sdk-nestjs-cache": "^3.7.0", "@multiversx/sdk-nestjs-common": "^3.7.0", "@multiversx/sdk-nestjs-elastic": "^3.7.0", @@ -2750,18 +2750,20 @@ } }, "node_modules/@multiversx/sdk-core": { - "version": "12.8.0", - "resolved": "https://registry.npmjs.org/@multiversx/sdk-core/-/sdk-core-12.8.0.tgz", - "integrity": "sha512-+XtnwQ/dUaXrpu/GCNud7r5AaQtNKRVqeKnjVUoKKHr14ohXbg9FW2Xx7IrJvehEMupjdx+6phR+nAXR60bIbQ==", + "version": "13.6.3", + "resolved": "https://registry.npmjs.org/@multiversx/sdk-core/-/sdk-core-13.6.3.tgz", + "integrity": "sha512-zMnJShVc3v9+Y4qzKjZ3kpBn7IJHTCOisveMhpdfOJ/CaYgjYKo56vKPMNycBRLIGe5jIY9d/cupzclvmiLjQw==", "dependencies": { "@multiversx/sdk-transaction-decoder": "1.0.2", "bech32": "1.1.4", - "bignumber.js": "9.0.1", "blake2b": "2.1.3", "buffer": "6.0.3", - "json-duplicate-key-handle": "1.0.0", - "keccak": "3.0.2", - "protobufjs": "7.2.4" + "json-bigint": "1.0.0", + "keccak": "3.0.2" + }, + "peerDependencies": { + "bignumber.js": "^9.0.1", + "protobufjs": "^7.2.6" } }, "node_modules/@multiversx/sdk-data-api-client": { @@ -2937,16 +2939,61 @@ } }, "node_modules/@multiversx/sdk-native-auth-server": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/@multiversx/sdk-native-auth-server/-/sdk-native-auth-server-1.0.15.tgz", - "integrity": "sha512-Ec9Js92TlK2rMBgdIlhTAxMwZ/+47atYYuBoALQL5a2BNKu9QqRyCrY+1kuaNT4wQLTIEYdne7Ax/JzZuJUfqg==", + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/@multiversx/sdk-native-auth-server/-/sdk-native-auth-server-1.0.19.tgz", + "integrity": "sha512-fICB4otonPyhjYNn+KDlfTqPbY8EaP3fOwXDldwAIzmnMrnBrwcTflZ7apTEtdoAj6dhUCJltOit1UdZhbSJyg==", "dependencies": { - "@multiversx/sdk-wallet": "^2.1.1", - "axios": "^1.6.5", + "@multiversx/sdk-wallet": "^4.5.0", + "axios": "^1.7.4", "bech32": "^2.0.0" }, "peerDependencies": { - "@multiversx/sdk-core": "^12.x" + "@multiversx/sdk-core": "^13.x" + } + }, + "node_modules/@multiversx/sdk-native-auth-server/node_modules/@multiversx/sdk-wallet": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@multiversx/sdk-wallet/-/sdk-wallet-4.5.1.tgz", + "integrity": "sha512-rvaMUV6OxNj9gchOn7wSCPZcWc6hjs1nQuY6QwnaEcBfPsHtFemNNt+t3uxPZOrDhAwXqUgyy9WdltvOs8somg==", + "dependencies": { + "@multiversx/sdk-bls-wasm": "0.3.5", + "@noble/ed25519": "1.7.3", + "@noble/hashes": "1.3.0", + "bech32": "1.1.4", + "bip39": "3.0.2", + "blake2b": "2.1.3", + "ed25519-hd-key": "1.1.2", + "ed2curve": "0.3.0", + "keccak": "3.0.1", + "scryptsy": "2.1.0", + "tweetnacl": "1.0.3", + "uuid": "8.3.2" + } + }, + "node_modules/@multiversx/sdk-native-auth-server/node_modules/@multiversx/sdk-wallet/node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "node_modules/@multiversx/sdk-native-auth-server/node_modules/@noble/hashes": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.0.tgz", + "integrity": "sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@multiversx/sdk-native-auth-server/node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/@multiversx/sdk-native-auth-server/node_modules/bech32": { @@ -2954,6 +3001,40 @@ "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" }, + "node_modules/@multiversx/sdk-native-auth-server/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@multiversx/sdk-native-auth-server/node_modules/keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@multiversx/sdk-native-auth-server/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@multiversx/sdk-nestjs-cache": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/@multiversx/sdk-nestjs-cache/-/sdk-nestjs-cache-3.7.0.tgz", @@ -3008,53 +3089,6 @@ "@nestjs/swagger": "^7.x" } }, - "node_modules/@multiversx/sdk-nestjs-common/node_modules/@multiversx/sdk-core": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@multiversx/sdk-core/-/sdk-core-13.1.0.tgz", - "integrity": "sha512-Z8lDPX4mKKD0QUtAqRzM0bf8zex3xCWRd5yYRLCxjW1F+jYg+9LjIQjkyvDSWGYJHY4IJeYqkORoS3gQG8NDbA==", - "dependencies": { - "@multiversx/sdk-transaction-decoder": "1.0.2", - "bech32": "1.1.4", - "blake2b": "2.1.3", - "buffer": "6.0.3", - "json-bigint": "1.0.0", - "keccak": "3.0.2" - }, - "peerDependencies": { - "bignumber.js": "^9.0.1", - "protobufjs": "^7.2.6" - } - }, - "node_modules/@multiversx/sdk-nestjs-common/node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", - "peer": true - }, - "node_modules/@multiversx/sdk-nestjs-common/node_modules/protobufjs": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.0.tgz", - "integrity": "sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g==", - "hasInstallScript": true, - "peer": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/@multiversx/sdk-nestjs-common/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -3866,6 +3900,17 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@noble/ed25519": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.3.tgz", + "integrity": "sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, "node_modules/@noble/hashes": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", @@ -13475,10 +13520,11 @@ } }, "node_modules/protobufjs": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", - "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", + "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", "hasInstallScript": true, + "peer": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -13500,7 +13546,8 @@ "node_modules/protobufjs/node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "peer": true }, "node_modules/proxy-addr": { "version": "2.0.7", @@ -18815,18 +18862,16 @@ "integrity": "sha512-c0tIdQUnbBLSt6NYU+OpeGPYdL0+GV547HeHT8Xc0BKQ7Cj0v82QUoA2QRtWrR1G4MNZmLsIacZSsf6DrIS2Bw==" }, "@multiversx/sdk-core": { - "version": "12.8.0", - "resolved": "https://registry.npmjs.org/@multiversx/sdk-core/-/sdk-core-12.8.0.tgz", - "integrity": "sha512-+XtnwQ/dUaXrpu/GCNud7r5AaQtNKRVqeKnjVUoKKHr14ohXbg9FW2Xx7IrJvehEMupjdx+6phR+nAXR60bIbQ==", + "version": "13.6.3", + "resolved": "https://registry.npmjs.org/@multiversx/sdk-core/-/sdk-core-13.6.3.tgz", + "integrity": "sha512-zMnJShVc3v9+Y4qzKjZ3kpBn7IJHTCOisveMhpdfOJ/CaYgjYKo56vKPMNycBRLIGe5jIY9d/cupzclvmiLjQw==", "requires": { "@multiversx/sdk-transaction-decoder": "1.0.2", "bech32": "1.1.4", - "bignumber.js": "9.0.1", "blake2b": "2.1.3", "buffer": "6.0.3", - "json-duplicate-key-handle": "1.0.0", - "keccak": "3.0.2", - "protobufjs": "7.2.4" + "json-bigint": "1.0.0", + "keccak": "3.0.2" } }, "@multiversx/sdk-data-api-client": { @@ -18988,19 +19033,84 @@ } }, "@multiversx/sdk-native-auth-server": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/@multiversx/sdk-native-auth-server/-/sdk-native-auth-server-1.0.15.tgz", - "integrity": "sha512-Ec9Js92TlK2rMBgdIlhTAxMwZ/+47atYYuBoALQL5a2BNKu9QqRyCrY+1kuaNT4wQLTIEYdne7Ax/JzZuJUfqg==", + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/@multiversx/sdk-native-auth-server/-/sdk-native-auth-server-1.0.19.tgz", + "integrity": "sha512-fICB4otonPyhjYNn+KDlfTqPbY8EaP3fOwXDldwAIzmnMrnBrwcTflZ7apTEtdoAj6dhUCJltOit1UdZhbSJyg==", "requires": { - "@multiversx/sdk-wallet": "^2.1.1", - "axios": "^1.6.5", + "@multiversx/sdk-wallet": "^4.5.0", + "axios": "^1.7.4", "bech32": "^2.0.0" }, "dependencies": { + "@multiversx/sdk-wallet": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@multiversx/sdk-wallet/-/sdk-wallet-4.5.1.tgz", + "integrity": "sha512-rvaMUV6OxNj9gchOn7wSCPZcWc6hjs1nQuY6QwnaEcBfPsHtFemNNt+t3uxPZOrDhAwXqUgyy9WdltvOs8somg==", + "requires": { + "@multiversx/sdk-bls-wasm": "0.3.5", + "@noble/ed25519": "1.7.3", + "@noble/hashes": "1.3.0", + "bech32": "1.1.4", + "bip39": "3.0.2", + "blake2b": "2.1.3", + "ed25519-hd-key": "1.1.2", + "ed2curve": "0.3.0", + "keccak": "3.0.1", + "scryptsy": "2.1.0", + "tweetnacl": "1.0.3", + "uuid": "8.3.2" + }, + "dependencies": { + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + } + } + }, + "@noble/hashes": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.0.tgz", + "integrity": "sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==" + }, + "axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "requires": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "bech32": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" } } }, @@ -19040,45 +19150,6 @@ "winston": "^3.7.2" }, "dependencies": { - "@multiversx/sdk-core": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@multiversx/sdk-core/-/sdk-core-13.1.0.tgz", - "integrity": "sha512-Z8lDPX4mKKD0QUtAqRzM0bf8zex3xCWRd5yYRLCxjW1F+jYg+9LjIQjkyvDSWGYJHY4IJeYqkORoS3gQG8NDbA==", - "requires": { - "@multiversx/sdk-transaction-decoder": "1.0.2", - "bech32": "1.1.4", - "blake2b": "2.1.3", - "buffer": "6.0.3", - "json-bigint": "1.0.0", - "keccak": "3.0.2" - } - }, - "long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", - "peer": true - }, - "protobufjs": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.0.tgz", - "integrity": "sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g==", - "peer": true, - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - } - }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -19560,6 +19631,11 @@ "@noble/hashes": "1.3.1" } }, + "@noble/ed25519": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.3.tgz", + "integrity": "sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==" + }, "@noble/hashes": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", @@ -26779,9 +26855,10 @@ } }, "protobufjs": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", - "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", + "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "peer": true, "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -26800,7 +26877,8 @@ "long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "peer": true } } }, diff --git a/package.json b/package.json index 111481e5b..d03efc235 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,10 @@ "@datastructures-js/priority-queue": "^6.1.0", "@elastic/elasticsearch": "7.12.0", "@golevelup/nestjs-rabbitmq": "^4.0.0", - "@multiversx/sdk-core": "^12.8.0", + "@multiversx/sdk-core": "^13.6.3", "@multiversx/sdk-data-api-client": "^0.5.8", "@multiversx/sdk-exchange": "^0.2.20", - "@multiversx/sdk-native-auth-server": "1.0.15", + "@multiversx/sdk-native-auth-server": "1.0.19", "@multiversx/sdk-nestjs-cache": "^3.7.0", "@multiversx/sdk-nestjs-common": "^3.7.0", "@multiversx/sdk-nestjs-elastic": "^3.7.0", From 5d395056bd1c85ec350c15d9d10297769da73930 Mon Sep 17 00:00:00 2001 From: hschiau Date: Mon, 23 Sep 2024 17:50:21 +0300 Subject: [PATCH 2/5] SERVICES-2608: update transaction version in failing unit tests --- .../specs/auto-router.service.spec.ts | 6 +- .../composable.tasks.transaction.spec.ts | 6 +- .../distribution.transactions.service.spec.ts | 2 +- .../specs/escrow.transaction.service.spec.ts | 6 +- .../specs/farm.transactions.service.spec.ts | 36 +++++----- ...fees-collector.transaction.service.spec.ts | 10 +-- ....token.wrapper.transaction.service.spec.ts | 4 +- .../metabonding.transactions.service.spec.ts | 6 +- .../specs/pair.transactions.service.spec.ts | 48 ++++++------- .../position.creator.transaction.spec.ts | 68 +++++++++---------- .../specs/router.transactions.service.spec.ts | 30 ++++---- .../staking.proxy.transaction.service.spec.ts | 6 +- .../staking.transactions.service.spec.ts | 40 +++++------ .../token.unstake.transaction.service.spec.ts | 4 +- .../specs/wrap.transactions.service.spec.ts | 4 +- 15 files changed, 137 insertions(+), 139 deletions(-) diff --git a/src/modules/auto-router/specs/auto-router.service.spec.ts b/src/modules/auto-router/specs/auto-router.service.spec.ts index 5cb3ea5b1..553a81d30 100644 --- a/src/modules/auto-router/specs/auto-router.service.spec.ts +++ b/src/modules/auto-router/specs/auto-router.service.spec.ts @@ -20,8 +20,6 @@ import { RemoteConfigGetterServiceMock } from 'src/modules/remote-config/mocks/r import { PairInfoModel } from 'src/modules/pair/models/pair-info.model'; import { TokenServiceProvider } from 'src/modules/tokens/mocks/token.service.mock'; import { Tokens } from 'src/modules/pair/mocks/pair.constants'; -import { encodeTransactionData } from 'src/helpers/helpers'; -import { gasConfig } from 'src/config'; import { WrapAbiServiceProvider } from 'src/modules/wrapping/mocks/wrap.abi.service.mock'; import { WrapService } from 'src/modules/wrapping/services/wrap.service'; import { PairAbiServiceProvider } from 'src/modules/pair/mocks/pair.abi.service.mock'; @@ -285,7 +283,7 @@ describe('AutoRouterService', () => { gasLimit: 40200000, data: 'Y29tcG9zZVRhc2tzQDAwMDAwMDBiNTU1MzQ0NDMyZDMxMzIzMzM0MzUzNjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNzExNzJhY2UwMjZiMGM0QEBAMDJAMDAwMDAwMTQ3Mzc3NjE3MDU0NmY2YjY1NmU3MzQ2Njk3ODY1NjQ0OTZlNzA3NTc0MDAwMDAwMGI1NTUzNDQ0MzJkMzEzMjMzMzQzNTM2MDAwMDAwMDcxMTcyYWNlMDI2YjBjNA==', chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -340,7 +338,7 @@ describe('AutoRouterService', () => { gasLimit: 75200000, data: 'RVNEVFRyYW5zZmVyQDU1NTM0NDQzMmQzMTMyMzMzNDM1MzZAMDcwY2VmOWY1ZWRmY2YyOEA2MzZmNmQ3MDZmNzM2NTU0NjE3MzZiNzNAMDAwMDAwMDQ0NTQ3NGM0NDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwODA2ZjA1YjU5ZDNiMjAwMDBAMDNAMDAwMDAwMjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEzMDAwMDAwMTU3Mzc3NjE3MDU0NmY2YjY1NmU3MzQ2Njk3ODY1NjQ0Zjc1NzQ3MDc1NzQwMDAwMDAwYzU3NDU0NzRjNDQyZDMxMzIzMzM0MzUzNjAwMDAwMDA1OTJhZmQ4YjAyZjAwMDAwMDIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMjAwMDAwMDE1NzM3NzYxNzA1NDZmNmI2NTZlNzM0NjY5Nzg2NTY0NGY3NTc0NzA3NTc0MDAwMDAwMGE0ZDQ1NTgyZDMxMzIzMzM0MzUzNjAwMDAwMDA4MDZmMDViNTlkM2IyMDAwMEAwMUA=', chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, diff --git a/src/modules/composable-tasks/specs/composable.tasks.transaction.spec.ts b/src/modules/composable-tasks/specs/composable.tasks.transaction.spec.ts index a277d9e3b..4253b1813 100644 --- a/src/modules/composable-tasks/specs/composable.tasks.transaction.spec.ts +++ b/src/modules/composable-tasks/specs/composable.tasks.transaction.spec.ts @@ -82,7 +82,7 @@ describe('Composable Tasks Transaction', () => { senderUsername: undefined, signature: undefined, value: '1000000000000000000', - version: 1, + version: 2, }); }); @@ -114,7 +114,7 @@ describe('Composable Tasks Transaction', () => { senderUsername: undefined, signature: undefined, value: '1000000000000000000', - version: 1, + version: 2, }); }); @@ -148,7 +148,7 @@ describe('Composable Tasks Transaction', () => { senderUsername: undefined, signature: undefined, value: '0', - version: 1, + version: 2, }); }); }); diff --git a/src/modules/distribution/specs/distribution.transactions.service.spec.ts b/src/modules/distribution/specs/distribution.transactions.service.spec.ts index e5039f6c5..98bea1acd 100644 --- a/src/modules/distribution/specs/distribution.transactions.service.spec.ts +++ b/src/modules/distribution/specs/distribution.transactions.service.spec.ts @@ -59,7 +59,7 @@ describe('DistributionTransactionsService', () => { senderUsername: undefined, signature: undefined, value: '0', - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), diff --git a/src/modules/escrow/specs/escrow.transaction.service.spec.ts b/src/modules/escrow/specs/escrow.transaction.service.spec.ts index beab92d94..2bce59c00 100644 --- a/src/modules/escrow/specs/escrow.transaction.service.spec.ts +++ b/src/modules/escrow/specs/escrow.transaction.service.spec.ts @@ -99,7 +99,7 @@ describe('EscrowTransactionService', () => { sender: senderAddress, options: undefined, signature: undefined, - version: 1, + version: 2, }), ); }); @@ -132,7 +132,7 @@ describe('EscrowTransactionService', () => { senderUsername: undefined, options: undefined, signature: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), @@ -168,7 +168,7 @@ describe('EscrowTransactionService', () => { senderUsername: undefined, options: undefined, signature: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), diff --git a/src/modules/farm/specs/farm.transactions.service.spec.ts b/src/modules/farm/specs/farm.transactions.service.spec.ts index cb0d72750..1b436908d 100644 --- a/src/modules/farm/specs/farm.transactions.service.spec.ts +++ b/src/modules/farm/specs/farm.transactions.service.spec.ts @@ -97,7 +97,7 @@ describe('FarmService', () => { 'MultiESDTNFTTransfer@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqssfuwnk5@01@EGLDMEXLP-abcdef@@1000000000000@enterFarmAndLockRewards', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -134,7 +134,7 @@ describe('FarmService', () => { 'ESDTNFTTransfer@EGLDMEXFL-abcdef@01@1000000000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqssfuwnk5@07311709943153914477', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -170,7 +170,7 @@ describe('FarmService', () => { 'ESDTNFTTransfer@EGLDTOK4FL-abcdef@01@1000000000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqes9lzxht@claimRewards', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -226,7 +226,7 @@ describe('FarmService', () => { 'ESDTNFTTransfer@EGLDMEXFL-abcdef@01@1000000000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqssfuwnk5@migrateToNewFarm@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -258,7 +258,7 @@ describe('FarmService', () => { 'setFarmMigrationConfig@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqssfuwnk5@EGLDMEXFL-abcdef@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -286,7 +286,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms['v1.2'].stopRewards, data: encodeTransactionData('stopRewardsAndMigrateRps'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -324,7 +324,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms.admin.end_produce_rewards, data: encodeTransactionData('end_produce_rewards'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -362,7 +362,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms.admin.start_produce_rewards, data: encodeTransactionData('start_produce_rewards'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -404,7 +404,7 @@ describe('FarmService', () => { 'setPerBlockRewardAmount@1000000000000', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -444,7 +444,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms.admin.set_penalty_percent, data: encodeTransactionData('set_penalty_percent@05'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -484,7 +484,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms.admin.set_minimum_farming_epochs, data: encodeTransactionData('set_minimum_farming_epochs@10'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -526,7 +526,7 @@ describe('FarmService', () => { 'set_transfer_exec_gas_limit@0100000000', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -566,7 +566,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms.admin.set_burn_gas_limit, data: encodeTransactionData('set_burn_gas_limit@0100000000'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -604,7 +604,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms.admin.pause, data: encodeTransactionData('pause'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -642,7 +642,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms.admin.resume, data: encodeTransactionData('resume'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -688,7 +688,7 @@ describe('FarmService', () => { 'registerFarmToken@FarmingToken12@T1T2-1234@18', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -726,7 +726,7 @@ describe('FarmService', () => { gasLimit: gasConfig.farms.admin.setLocalRolesFarmToken, data: encodeTransactionData('setLocalRolesFarmToken'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -790,7 +790,7 @@ describe('FarmService', () => { 'MultiESDTNFTTransfer@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqssfuwnk5@02@EGLDMEXFL-abcdef@@01000000000000@EGLDMEXFL-abcdef@@01000000000000@mergeFarmTokens', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); diff --git a/src/modules/fees-collector/specs/fees-collector.transaction.service.spec.ts b/src/modules/fees-collector/specs/fees-collector.transaction.service.spec.ts index 9923e62e7..ff679a807 100644 --- a/src/modules/fees-collector/specs/fees-collector.transaction.service.spec.ts +++ b/src/modules/fees-collector/specs/fees-collector.transaction.service.spec.ts @@ -64,7 +64,7 @@ describe('FeesCollectorTransactionService', () => { data: encodeTransactionData('claimRewards'), options: undefined, signature: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), @@ -94,7 +94,7 @@ describe('FeesCollectorTransactionService', () => { data: encodeTransactionData('claimRewards'), options: undefined, signature: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }, @@ -135,7 +135,7 @@ describe('FeesCollectorTransactionService', () => { data: encodeTransactionData('claimRewards'), options: undefined, signature: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }, @@ -180,7 +180,7 @@ describe('FeesCollectorTransactionService', () => { ), options: undefined, signature: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), @@ -212,7 +212,7 @@ describe('FeesCollectorTransactionService', () => { ), options: undefined, signature: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), diff --git a/src/modules/locked-token-wrapper/specs/locked.token.wrapper.transaction.service.spec.ts b/src/modules/locked-token-wrapper/specs/locked.token.wrapper.transaction.service.spec.ts index 52d340261..83c18d0cc 100644 --- a/src/modules/locked-token-wrapper/specs/locked.token.wrapper.transaction.service.spec.ts +++ b/src/modules/locked-token-wrapper/specs/locked.token.wrapper.transaction.service.spec.ts @@ -110,7 +110,7 @@ describe('LockedTokenWrapperTransactionService', () => { ), options: undefined, signature: undefined, - version: 1, + version: 2, }), ); }); @@ -141,7 +141,7 @@ describe('LockedTokenWrapperTransactionService', () => { ), options: undefined, signature: undefined, - version: 1, + version: 2, }), ); }); diff --git a/src/modules/metabonding/specs/metabonding.transactions.service.spec.ts b/src/modules/metabonding/specs/metabonding.transactions.service.spec.ts index d3ff60e5a..253c28981 100644 --- a/src/modules/metabonding/specs/metabonding.transactions.service.spec.ts +++ b/src/modules/metabonding/specs/metabonding.transactions.service.spec.ts @@ -76,7 +76,7 @@ describe('MetabondingTransactionsService', () => { sender, signature: undefined, value: '0', - version: 1, + version: 2, }), ); }); @@ -101,7 +101,7 @@ describe('MetabondingTransactionsService', () => { senderUsername: undefined, signature: undefined, value: '0', - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), @@ -128,7 +128,7 @@ describe('MetabondingTransactionsService', () => { senderUsername: undefined, signature: undefined, value: '0', - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), diff --git a/src/modules/pair/specs/pair.transactions.service.spec.ts b/src/modules/pair/specs/pair.transactions.service.spec.ts index 05d17c32e..8a82f1e06 100644 --- a/src/modules/pair/specs/pair.transactions.service.spec.ts +++ b/src/modules/pair/specs/pair.transactions.service.spec.ts @@ -105,7 +105,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.wrapeGLD, data: encodeTransactionData('wrapEgld'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -125,7 +125,7 @@ describe('TransactionPairService', () => { ).bech32()}@2@WEGLD-123456@@9000000000000000000@MEX-123456@@10000000000000000000@addInitialLiquidity`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -174,7 +174,7 @@ describe('TransactionPairService', () => { ).bech32()}@02@WEGLD-123456@@10000000000000000000@MEX-123456@@9000000000000000000@addInitialLiquidity`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -224,7 +224,7 @@ describe('TransactionPairService', () => { ).bech32()}@2@WEGLD-123456@@9@MEX-123456@@10@addLiquidity@8@9`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -273,7 +273,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.wrapeGLD, data: encodeTransactionData('wrapEgld'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -295,7 +295,7 @@ describe('TransactionPairService', () => { ).bech32()}@02@WEGLD-123456@@10@MEX-123456@@09@addLiquidity@09@08`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -347,7 +347,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.wrapeGLD, data: encodeTransactionData('wrapEgld'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -369,7 +369,7 @@ describe('TransactionPairService', () => { ).bech32()}@02@WEGLD-123456@@09@MEX-123456@@10@addLiquidity@08@09`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -410,7 +410,7 @@ describe('TransactionPairService', () => { 'ESDTTransfer@1162300484@10@removeLiquidity@09@9900', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -430,7 +430,7 @@ describe('TransactionPairService', () => { 'ESDTTransfer@WEGLD-123456@09@unwrapEgld', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -473,7 +473,7 @@ describe('TransactionPairService', () => { senderUsername: undefined, signature: undefined, value: '5', - version: 1, + version: 2, }); }); @@ -506,7 +506,7 @@ describe('TransactionPairService', () => { gasLimit: 40200000, data: 'RVNEVFRyYW5zZmVyQDRkNDU1ODJkMzEzMjMzMzQzNTM2QDA1QDYzNmY2ZDcwNmY3MzY1NTQ2MTczNmI3M0AwMDAwMDAwNDQ1NDc0YzQ0MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDVAMDJAMDAwMDAwMTU3Mzc3NjE3MDU0NmY2YjY1NmU3MzQ2Njk3ODY1NjQ0Zjc1NzQ3MDc1NzQwMDAwMDAwYzU3NDU0NzRjNDQyZDMxMzIzMzM0MzUzNjAwMDAwMDAxMDVAMDFA', chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -594,7 +594,7 @@ describe('TransactionPairService', () => { 'whitelist@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -629,7 +629,7 @@ describe('TransactionPairService', () => { 'removeWhitelist@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -666,7 +666,7 @@ describe('TransactionPairService', () => { 'addTrustedSwapPair@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@WEGLD-123456@MEX-123456', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -702,7 +702,7 @@ describe('TransactionPairService', () => { 'removeTrustedSwapPair@WEGLD-123456@MEX-123456', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -734,7 +734,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.pairs.admin.pause, data: encodeTransactionData('pause'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -766,7 +766,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.pairs.admin.resume, data: encodeTransactionData('resume'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -798,7 +798,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.pairs.admin.setStateActiveNoSwaps, data: encodeTransactionData('setStateActiveNoSwaps'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -832,7 +832,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.pairs.admin.setFeePercents, data: encodeTransactionData('setFeePercents@03@05'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -865,7 +865,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.pairs.admin.setLockingDeadlineEpoch, data: encodeTransactionData('setLockingDeadlineEpoch@1000'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -898,7 +898,7 @@ describe('TransactionPairService', () => { gasLimit: gasConfig.pairs.admin.setUnlockEpoch, data: encodeTransactionData('setUnlockEpoch@1005'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -933,7 +933,7 @@ describe('TransactionPairService', () => { 'setLockingScAddress@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -967,7 +967,7 @@ describe('TransactionPairService', () => { `setupFeesCollector@erd1qqqqqqqqqqqqqpgqagq2v9exkrn3wnauq3lw4xcetwsmgmwjd8ssjt4k7s@50000`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, diff --git a/src/modules/position-creator/specs/position.creator.transaction.spec.ts b/src/modules/position-creator/specs/position.creator.transaction.spec.ts index 2ce27d1fc..123f893d2 100644 --- a/src/modules/position-creator/specs/position.creator.transaction.spec.ts +++ b/src/modules/position-creator/specs/position.creator.transaction.spec.ts @@ -165,7 +165,7 @@ describe('PositionCreatorTransaction', () => { `ESDTTransfer@USDC-123456@100000000000000000000@createLpPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000012@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -233,7 +233,7 @@ describe('PositionCreatorTransaction', () => { `ESDTTransfer@USDC-123456@100000000000000000000@createPairPosFromSingleToken@1440@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -299,7 +299,7 @@ describe('PositionCreatorTransaction', () => { `createPairPosFromSingleToken@1440@47008144020574367766@47008144020574367766823`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -419,7 +419,7 @@ describe('PositionCreatorTransaction', () => { `createFarmPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000021@47008144020574367766@47008144020574367766823`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -485,7 +485,7 @@ describe('PositionCreatorTransaction', () => { `MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@01@USDC-123456@@100000000000000000000@createFarmPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000021@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -555,7 +555,7 @@ describe('PositionCreatorTransaction', () => { gasLimit: 4200000, data: encodeTransactionData('wrapEgld'), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -574,7 +574,7 @@ describe('PositionCreatorTransaction', () => { `MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@WEGLD-123456@@100000000000000000000@EGLDMEXFL-abcdef@01@100000000000000000000@createFarmPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000021@47008144020574367766@47008144020574367766823`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -645,7 +645,7 @@ describe('PositionCreatorTransaction', () => { `MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@USDC-123456@@100000000000000000000@EGLDMEXFL-abcdef@01@100000000000000000000@createFarmPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000021@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -714,7 +714,7 @@ describe('PositionCreatorTransaction', () => { `MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@01@USDC-123456@@100000000000000000000@createFarmPosFromSingleToken@1440@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -782,7 +782,7 @@ describe('PositionCreatorTransaction', () => { `createFarmPosFromSingleToken@1440@47008144020574367766@47008144020574367766823`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -904,7 +904,7 @@ describe('PositionCreatorTransaction', () => { 'createMetastakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@47008144020574367766@47008144020574367766823', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -978,7 +978,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@01@USDC-123456@@100000000000000000000@createMetastakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1056,7 +1056,7 @@ describe('PositionCreatorTransaction', () => { gasLimit: 4200000, data: encodeTransactionData('wrapEgld'), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1075,7 +1075,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@WEGLD-123456@@100000000000000000000@METASTAKE-123456@01@100000000000000000000@createMetastakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@47008144020574367766@47008144020574367766823', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1154,7 +1154,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@USDC-123456@@100000000000000000000@METASTAKE-123456@01@100000000000000000000@createMetastakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1214,7 +1214,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@EGLDMEXLP-abcdef@@100000000000000000000@METASTAKE-123456@01@100000000000000000000@createMetastakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@@', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1327,7 +1327,7 @@ describe('PositionCreatorTransaction', () => { 'createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@90661089388014913158134@0000000000000000000000000000000000000000000000000000000000000012@swapTokensFixedInput@MEX-123456@89754478494134764026552', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1387,7 +1387,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@01@USDC-123456@@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@999999999899699097301@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1457,7 +1457,7 @@ describe('PositionCreatorTransaction', () => { gasLimit: 4200000, data: encodeTransactionData('wrapEgld'), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1476,7 +1476,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@WEGLD-123456@@100000000000000000000@STAKETOK-1111@01@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@90661089388014913158134@0000000000000000000000000000000000000000000000000000000000000012@swapTokensFixedInput@MEX-123456@89754478494134764026552', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1542,7 +1542,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@USDC-123456@@100000000000000000000@STAKETOK-1111@01@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@999999999899699097301@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1650,7 +1650,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@WEGLD-123456@@100000000000000000000@MEX-123456@@100000000000000000000@createFarmPosFromTwoTokens@0000000000000000000000000000000000000000000000000000000000000021@99000000000000000000@99000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1702,7 +1702,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@03@WEGLD-123456@@100000000000000000000@MEX-123456@@100000000000000000000@EGLDMEXFL-abcdef@01@100000000000000000000@createFarmPosFromTwoTokens@0000000000000000000000000000000000000000000000000000000000000021@99000000000000000000@99000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1753,7 +1753,7 @@ describe('PositionCreatorTransaction', () => { gasLimit: 4200000, data: encodeTransactionData('wrapEgld'), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1772,7 +1772,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@03@WEGLD-123456@@100000000000000000000@MEX-123456@@100000000000000000000@EGLDMEXFL-abcdef@01@100000000000000000000@createFarmPosFromTwoTokens@0000000000000000000000000000000000000000000000000000000000000021@99000000000000000000@99000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1927,7 +1927,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@WEGLD-123456@@100000000000000000000@ELKMEX-123456@01@100000000000000000000@createFarmPosFromTwoTokens@99000000000000000000@99000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -1980,7 +1980,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@03@WEGLD-123456@@100000000000000000000@ELKMEX-123456@01@100000000000000000000@LKFARM-123456@01@100000000000000000000@createFarmPosFromTwoTokens@99000000000000000000@99000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -2110,7 +2110,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@WEGLD-123456@@100000000000000000000@MEX-123456@@100000000000000000000@createMetastakingPosFromTwoTokens@0000000000000000000000000000000000000000000000000000000000000000@99000000000000000000@99000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -2168,7 +2168,7 @@ describe('PositionCreatorTransaction', () => { gasLimit: 4200000, data: encodeTransactionData('wrapEgld'), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -2188,7 +2188,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@03@WEGLD-123456@@100000000000000000000@MEX-123456@@100000000000000000000@METASTAKE-123456@01@100000000000000000000@createMetastakingPosFromTwoTokens@0000000000000000000000000000000000000000000000000000000000000000@99000000000000000000@99000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -2248,7 +2248,7 @@ describe('PositionCreatorTransaction', () => { 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@03@WEGLD-123456@@100000000000000000000@MEX-123456@@100000000000000000000@METASTAKE-123456@01@100000000000000000000@createMetastakingPosFromTwoTokens@0000000000000000000000000000000000000000000000000000000000000000@99000000000000000000@99000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -2309,7 +2309,7 @@ describe('PositionCreatorTransaction', () => { 'ESDTNFTTransfer@EGLDMEXFL-abcdef@01@100000000000000000000@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@exitFarmPos@0000000000000000000000000000000000000000000000000000000000000021@99000000000000000000@99000000000000000000000', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -2386,7 +2386,7 @@ describe('PositionCreatorTransaction', () => { senderUsername: undefined, signature: undefined, value: '0', - version: 1, + version: 2, }, ]); }); @@ -2438,7 +2438,7 @@ describe('PositionCreatorTransaction', () => { senderUsername: undefined, signature: undefined, value: '1000000000000000000', - version: 1, + version: 2, }, ]); }); diff --git a/src/modules/router/specs/router.transactions.service.spec.ts b/src/modules/router/specs/router.transactions.service.spec.ts index 8320cf269..761371a00 100644 --- a/src/modules/router/specs/router.transactions.service.spec.ts +++ b/src/modules/router/specs/router.transactions.service.spec.ts @@ -95,7 +95,7 @@ describe('RouterService', () => { 'createPair@TOK3-3333@TOK4-123456@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -128,7 +128,7 @@ describe('RouterService', () => { 'issueLpToken@erd1sea63y47u569ns3x5mqjf4vnygn9whkk7p6ry4rfpqyd6rd5addqyd9lf2@LiquidityPoolToken3@LPT-3333', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -181,7 +181,7 @@ describe('RouterService', () => { ).bech32()}`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -213,7 +213,7 @@ describe('RouterService', () => { 'pause@erd1qqqqqqqqqqqqqpgqe8m9w7cv2ekdc28q5ahku9x3hcregqpn0n4sum0e3u', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -249,7 +249,7 @@ describe('RouterService', () => { ).bech32()}`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -287,7 +287,7 @@ describe('RouterService', () => { ).bech32()}@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@WEGLD-123456`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -325,7 +325,7 @@ describe('RouterService', () => { ).bech32()}@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@WEGLD-123456`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -358,7 +358,7 @@ describe('RouterService', () => { 'setLocalRolesOwner@WEGLD-123456@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@01', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -388,7 +388,7 @@ describe('RouterService', () => { gasLimit: gasConfig.router.admin.removePair, data: encodeTransactionData('removePair@WEGLD-123456@USDC-123456'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -415,7 +415,7 @@ describe('RouterService', () => { gasLimit: gasConfig.router.admin.setPairCreationEnabled, data: encodeTransactionData('setPairCreationEnabled@01'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -442,7 +442,7 @@ describe('RouterService', () => { gasLimit: gasConfig.router.admin.setPairCreationEnabled, data: encodeTransactionData('setPairCreationEnabled@'), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -469,7 +469,7 @@ describe('RouterService', () => { gasLimit: gasConfig.router.admin.clearPairTemporaryOwnerStorage, data: 'Y2xlYXJQYWlyVGVtcG9yYXJ5T3duZXJTdG9yYWdl', chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -500,7 +500,7 @@ describe('RouterService', () => { 'setTemporaryOwnerPeriod@1000000000000000000000000000000000', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -531,7 +531,7 @@ describe('RouterService', () => { 'setPairTemplateAddress@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -570,7 +570,7 @@ describe('RouterService', () => { ).bech32()}`, ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); diff --git a/src/modules/staking-proxy/specs/staking.proxy.transaction.service.spec.ts b/src/modules/staking-proxy/specs/staking.proxy.transaction.service.spec.ts index 44d1d9ad4..1ea059e59 100644 --- a/src/modules/staking-proxy/specs/staking.proxy.transaction.service.spec.ts +++ b/src/modules/staking-proxy/specs/staking.proxy.transaction.service.spec.ts @@ -142,7 +142,7 @@ describe('StakingProxyTransactionService', () => { ), options: undefined, signature: undefined, - version: 1, + version: 2, }), ); }); @@ -185,7 +185,7 @@ describe('StakingProxyTransactionService', () => { ), options: undefined, signature: undefined, - version: 1, + version: 2, }), ); }); @@ -257,7 +257,7 @@ describe('StakingProxyTransactionService', () => { `MultiESDTNFTTransfer@0000000000000000000000000000000000000000000000000000000000000000@01@METASTAKE-123456@01@1000000000000000000@claimDualYield`, ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, diff --git a/src/modules/staking/specs/staking.transactions.service.spec.ts b/src/modules/staking/specs/staking.transactions.service.spec.ts index 7fe8e4926..4ccb13259 100644 --- a/src/modules/staking/specs/staking.transactions.service.spec.ts +++ b/src/modules/staking/specs/staking.transactions.service.spec.ts @@ -77,7 +77,7 @@ describe('StakingTransactionService', () => { 'MultiESDTNFTTransfer@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@01@WEGLD-123456@@1000@stakeFarm', ), chainID: mxConfig.chainID, - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -109,7 +109,7 @@ describe('StakingTransactionService', () => { 'ESDTNFTTransfer@WEGLD-123456@@1000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@unstakeFarm', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -141,7 +141,7 @@ describe('StakingTransactionService', () => { 'ESDTNFTTransfer@WEGLD-123456@@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@unbondFarm', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -173,7 +173,7 @@ describe('StakingTransactionService', () => { 'ESDTNFTTransfer@WEGLD-123456@@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@claimRewards', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -205,7 +205,7 @@ describe('StakingTransactionService', () => { 'ESDTNFTTransfer@WEGLD-123456@@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@compoundRewards', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -230,7 +230,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.claimBoostedRewards, data: encodeTransactionData('claimBoostedRewards'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -279,7 +279,7 @@ describe('StakingTransactionService', () => { 'ESDTNFTTransfer@STAKETOK-1111@01@1000000000000000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@claimRewards', ), chainID: 'T', - version: 1, + version: 2, options: undefined, guardian: undefined, signature: undefined, @@ -315,7 +315,7 @@ describe('StakingTransactionService', () => { 'ESDTTransfer@WEGLD-123456@01000000@topUpRewards', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -356,7 +356,7 @@ describe('StakingTransactionService', () => { 'MultiESDTNFTTransfer@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@02@EGLDMEXFL-abcdef@@01000000@EGLDMEXFL-abcdef@@01000000@mergeFarmTokens', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, }); @@ -386,7 +386,7 @@ describe('StakingTransactionService', () => { 'addSCAddressToWhitelist@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -418,7 +418,7 @@ describe('StakingTransactionService', () => { 'removeSCAddressFromWhitelist@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -447,7 +447,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.admin.setState, data: encodeTransactionData('pause'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -476,7 +476,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.admin.setState, data: encodeTransactionData('resume'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -509,7 +509,7 @@ describe('StakingTransactionService', () => { 'registerFarmToken@TokenToRegisterName@TokenToRegisterID@18', ), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -537,7 +537,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.admin.setLocalRolesFarmToken, data: encodeTransactionData('setBurnRoleForAddress'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -566,7 +566,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.admin.setPerBlockRewardAmount, data: encodeTransactionData('setPerBlockRewardAmount@0100'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -595,7 +595,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.admin.setMaxApr, data: encodeTransactionData('setMaxApr@0100'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -624,7 +624,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.admin.setMinUnbondEpochs, data: encodeTransactionData('setMinUnbondEpochs@0100'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -653,7 +653,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.admin.setRewardsState, data: encodeTransactionData('startProduceRewards'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, @@ -682,7 +682,7 @@ describe('StakingTransactionService', () => { gasLimit: gasConfig.stake.admin.setRewardsState, data: encodeTransactionData('endProduceRewards'), chainID: 'T', - version: 1, + version: 2, options: undefined, signature: undefined, guardian: undefined, diff --git a/src/modules/token-unstake/specs/token.unstake.transaction.service.spec.ts b/src/modules/token-unstake/specs/token.unstake.transaction.service.spec.ts index 92e4009f0..d92413ab5 100644 --- a/src/modules/token-unstake/specs/token.unstake.transaction.service.spec.ts +++ b/src/modules/token-unstake/specs/token.unstake.transaction.service.spec.ts @@ -61,7 +61,7 @@ describe('TokenUnstakeTransactionService', () => { value: '0', signature: undefined, options: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), @@ -89,7 +89,7 @@ describe('TokenUnstakeTransactionService', () => { value: '0', signature: undefined, options: undefined, - version: 1, + version: 2, guardian: undefined, guardianSignature: undefined, }), diff --git a/src/modules/wrapping/specs/wrap.transactions.service.spec.ts b/src/modules/wrapping/specs/wrap.transactions.service.spec.ts index 5beddc663..00abc13c2 100644 --- a/src/modules/wrapping/specs/wrap.transactions.service.spec.ts +++ b/src/modules/wrapping/specs/wrap.transactions.service.spec.ts @@ -64,7 +64,7 @@ describe('WrapTransactionsService', () => { senderUsername: undefined, gasPrice: 1000000000, options: undefined, - version: 1, + version: 2, signature: undefined, guardian: undefined, guardianSignature: undefined, @@ -97,7 +97,7 @@ describe('WrapTransactionsService', () => { senderUsername: undefined, gasPrice: 1000000000, options: undefined, - version: 1, + version: 2, signature: undefined, guardian: undefined, guardianSignature: undefined, From 17c3dbb077e212e343a6faecc2a914588e10ca30 Mon Sep 17 00:00:00 2001 From: hschiau Date: Mon, 23 Sep 2024 17:57:09 +0300 Subject: [PATCH 3/5] SERVICES-2608: fix transaction data field in failing unit tests - MultiESDTNFTTransfer/ESDTNFTTransfer for a single fungible becomes ESDTTransfer - MultiESDTNFTTransfer for a single MetaESDT becomes ESDTNFTTransfer - the length of the random part of a collection identifier needs to be exactly 6 characters (enforced in v13) --- src/config/default.json | 3 +- .../specs/escrow.transaction.service.spec.ts | 2 +- .../specs/farm.transactions.service.spec.ts | 4 +-- .../position.creator.transaction.spec.ts | 28 +++++++++++-------- .../router/mocks/router.abi.service.mock.ts | 2 +- .../specs/router.transactions.service.spec.ts | 10 +++---- .../staking.proxy.transaction.service.spec.ts | 4 +-- .../staking/mocks/staking.abi.service.mock.ts | 2 +- .../staking.transactions.service.spec.ts | 16 +++++------ 9 files changed, 38 insertions(+), 33 deletions(-) diff --git a/src/config/default.json b/src/config/default.json index 3253b603c..0a2785332 100644 --- a/src/config/default.json +++ b/src/config/default.json @@ -255,7 +255,8 @@ "resume": 200000000, "registerFarmToken": 200000000, "setLocalRolesFarmToken": 20000000, - "setFarmMigrationConfig": 7300000 + "setFarmMigrationConfig": 7300000, + "mergeFarmTokensMultiplier": 200000000 } }, "proxy": { diff --git a/src/modules/escrow/specs/escrow.transaction.service.spec.ts b/src/modules/escrow/specs/escrow.transaction.service.spec.ts index 2bce59c00..2879c59e1 100644 --- a/src/modules/escrow/specs/escrow.transaction.service.spec.ts +++ b/src/modules/escrow/specs/escrow.transaction.service.spec.ts @@ -90,7 +90,7 @@ describe('EscrowTransactionService', () => { chainID: mxConfig.chainID, nonce: 0, data: encodeTransactionData( - `MultiESDTNFTTransfer@${scAddress.escrow}@01@XMEX-123456@01@1000000000000000000@lockFunds@${receiverAddress}`, + `ESDTNFTTransfer@XMEX-123456@01@1000000000000000000@${scAddress.escrow}@lockFunds@${receiverAddress}`, ), gasPrice: 1000000000, gasLimit: gasConfig.escrow.lockFunds, diff --git a/src/modules/farm/specs/farm.transactions.service.spec.ts b/src/modules/farm/specs/farm.transactions.service.spec.ts index 1b436908d..b37c34a0e 100644 --- a/src/modules/farm/specs/farm.transactions.service.spec.ts +++ b/src/modules/farm/specs/farm.transactions.service.spec.ts @@ -89,12 +89,12 @@ describe('FarmService', () => { nonce: 0, value: '0', receiver: - 'erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', + 'erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqssfuwnk5', sender: 'erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', gasPrice: 1000000000, gasLimit: gasConfig.farms['v1.2'].enterFarm.default, data: encodeTransactionData( - 'MultiESDTNFTTransfer@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqssfuwnk5@01@EGLDMEXLP-abcdef@@1000000000000@enterFarmAndLockRewards', + 'ESDTTransfer@EGLDMEXLP-abcdef@1000000000000@enterFarmAndLockRewards', ), chainID: mxConfig.chainID, version: 2, diff --git a/src/modules/position-creator/specs/position.creator.transaction.spec.ts b/src/modules/position-creator/specs/position.creator.transaction.spec.ts index 123f893d2..a75a7412b 100644 --- a/src/modules/position-creator/specs/position.creator.transaction.spec.ts +++ b/src/modules/position-creator/specs/position.creator.transaction.spec.ts @@ -475,14 +475,15 @@ describe('PositionCreatorTransaction', () => { { nonce: 0, value: '0', - receiver: Address.Zero().bech32(), + receiver: + 'erd1qqqqqqqqqqqqqpgqh3zcutxk3wmfvevpyymaehvc3k0knyq70n4sg6qcj6', sender: Address.Zero().bech32(), senderUsername: undefined, receiverUsername: undefined, gasPrice: 1000000000, gasLimit: gasLimit, data: encodeTransactionData( - `MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@01@USDC-123456@@100000000000000000000@createFarmPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000021@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, + `ESDTTransfer@USDC-123456@100000000000000000000@createFarmPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000021@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, ), chainID: 'T', version: 2, @@ -704,14 +705,15 @@ describe('PositionCreatorTransaction', () => { { nonce: 0, value: '0', - receiver: Address.Zero().bech32(), + receiver: + 'erd1qqqqqqqqqqqqqpgqh3zcutxk3wmfvevpyymaehvc3k0knyq70n4sg6qcj6', sender: Address.Zero().bech32(), senderUsername: undefined, receiverUsername: undefined, gasPrice: 1000000000, gasLimit: gasLimit, data: encodeTransactionData( - `MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@01@USDC-123456@@100000000000000000000@createFarmPosFromSingleToken@1440@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, + `ESDTTransfer@USDC-123456@100000000000000000000@createFarmPosFromSingleToken@1440@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327`, ), chainID: 'T', version: 2, @@ -968,14 +970,15 @@ describe('PositionCreatorTransaction', () => { { nonce: 0, value: '0', - receiver: Address.Zero().bech32(), + receiver: + 'erd1qqqqqqqqqqqqqpgqh3zcutxk3wmfvevpyymaehvc3k0knyq70n4sg6qcj6', sender: Address.Zero().bech32(), senderUsername: undefined, receiverUsername: undefined, gasPrice: 1000000000, gasLimit: gasLimit, data: encodeTransactionData( - 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@01@USDC-123456@@100000000000000000000@createMetastakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', + 'ESDTTransfer@USDC-123456@100000000000000000000@createMetastakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@329339339317295273252@329339339317295273252718@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', ), chainID: 'T', version: 2, @@ -1377,14 +1380,15 @@ describe('PositionCreatorTransaction', () => { { nonce: 0, value: '0', - receiver: Address.Zero().bech32(), + receiver: + 'erd1qqqqqqqqqqqqqpgqh3zcutxk3wmfvevpyymaehvc3k0knyq70n4sg6qcj6', sender: Address.Zero().bech32(), senderUsername: undefined, receiverUsername: undefined, gasPrice: 1000000000, gasLimit: gasLimit, data: encodeTransactionData( - 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@01@USDC-123456@@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@999999999899699097301@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', + 'ESDTTransfer@USDC-123456@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@999999999899699097301@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', ), chainID: 'T', version: 2, @@ -1431,7 +1435,7 @@ describe('PositionCreatorTransaction', () => { amount: '100000000000000000000', }), new EsdtTokenPayment({ - tokenIdentifier: 'STAKETOK-1111', + tokenIdentifier: 'STAKETOK-111111', tokenNonce: 1, amount: '100000000000000000000', }), @@ -1473,7 +1477,7 @@ describe('PositionCreatorTransaction', () => { gasPrice: 1000000000, gasLimit: gasLimit, data: encodeTransactionData( - 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@WEGLD-123456@@100000000000000000000@STAKETOK-1111@01@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@90661089388014913158134@0000000000000000000000000000000000000000000000000000000000000012@swapTokensFixedInput@MEX-123456@89754478494134764026552', + 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@WEGLD-123456@@100000000000000000000@STAKETOK-111111@01@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@90661089388014913158134@0000000000000000000000000000000000000000000000000000000000000012@swapTokensFixedInput@MEX-123456@89754478494134764026552', ), chainID: 'T', version: 2, @@ -1515,7 +1519,7 @@ describe('PositionCreatorTransaction', () => { amount: '100000000000000000000', }), new EsdtTokenPayment({ - tokenIdentifier: 'STAKETOK-1111', + tokenIdentifier: 'STAKETOK-111111', tokenNonce: 1, amount: '100000000000000000000', }), @@ -1539,7 +1543,7 @@ describe('PositionCreatorTransaction', () => { gasPrice: 1000000000, gasLimit: gasLimit, data: encodeTransactionData( - 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@USDC-123456@@100000000000000000000@STAKETOK-1111@01@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@999999999899699097301@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', + 'MultiESDTNFTTransfer@00000000000000000500bc458e2cd68bb69665812137dcdd988d9f69901e7ceb@02@USDC-123456@@100000000000000000000@STAKETOK-111111@01@100000000000000000000@createFarmStakingPosFromSingleToken@0000000000000000000000000000000000000000000000000000000000000000@999999999899699097301@0000000000000000000000000000000000000000000000000000000000000013@swapTokensFixedInput@WEGLD-123456@989999999900702106327', ), chainID: 'T', version: 2, diff --git a/src/modules/router/mocks/router.abi.service.mock.ts b/src/modules/router/mocks/router.abi.service.mock.ts index d3b9afcb7..45aa9f9f2 100644 --- a/src/modules/router/mocks/router.abi.service.mock.ts +++ b/src/modules/router/mocks/router.abi.service.mock.ts @@ -46,7 +46,7 @@ export class RouterAbiServiceMock implements IRouterAbiService { address: Address.Zero().bech32(), }), commonTokenID: 'USDC-123456', - lockedTokenID: 'LKESDT-1234', + lockedTokenID: 'LKESDT-123456', minLockedTokenValue: '8000000000', minLockPeriodEpochs: 1, }); diff --git a/src/modules/router/specs/router.transactions.service.spec.ts b/src/modules/router/specs/router.transactions.service.spec.ts index 761371a00..a256a21db 100644 --- a/src/modules/router/specs/router.transactions.service.spec.ts +++ b/src/modules/router/specs/router.transactions.service.spec.ts @@ -547,7 +547,7 @@ describe('RouterService', () => { const transaction = await service.setSwapEnabledByUser( Address.Zero().bech32(), new InputTokenModel({ - tokenID: 'LKESDT-1234', + tokenID: 'LKESDT-123456', nonce: 1, amount: '10000000000', attributes: @@ -563,7 +563,7 @@ describe('RouterService', () => { gasPrice: 1000000000, gasLimit: gasConfig.router.swapEnableByUser, data: encodeTransactionData( - `ESDTNFTTransfer@LKESDT-1234@01@10000000000@${Address.fromHex( + `ESDTNFTTransfer@LKESDT-123456@01@10000000000@${Address.fromHex( '0000000000000000000000000000000000000000000000000000000000000011', ).bech32()}@setSwapEnabledByUser@${Address.fromHex( '0000000000000000000000000000000000000000000000000000000000000013', @@ -587,7 +587,7 @@ describe('RouterService', () => { service.setSwapEnabledByUser( Address.Zero().bech32(), new InputTokenModel({ - tokenID: 'LKESDT-1234', + tokenID: 'LKESDT-123456', nonce: 1, amount: '1000000000000000000', attributes: @@ -655,7 +655,7 @@ describe('RouterService', () => { service.setSwapEnabledByUser( Address.Zero().bech32(), new InputTokenModel({ - tokenID: 'LKESDT-1234', + tokenID: 'LKESDT-123456', nonce: 1, amount: '1000000000000000000', attributes: @@ -678,7 +678,7 @@ describe('RouterService', () => { service.setSwapEnabledByUser( Address.Zero().bech32(), new InputTokenModel({ - tokenID: 'LKESDT-1234', + tokenID: 'LKESDT-123456', nonce: 1, amount: '1000', attributes: diff --git a/src/modules/staking-proxy/specs/staking.proxy.transaction.service.spec.ts b/src/modules/staking-proxy/specs/staking.proxy.transaction.service.spec.ts index 1ea059e59..313bcedf4 100644 --- a/src/modules/staking-proxy/specs/staking.proxy.transaction.service.spec.ts +++ b/src/modules/staking-proxy/specs/staking.proxy.transaction.service.spec.ts @@ -138,7 +138,7 @@ describe('StakingProxyTransactionService', () => { sender: Address.Zero().bech32(), receiver: Address.Zero().bech32(), data: encodeTransactionData( - `MultiESDTNFTTransfer@${Address.Zero().bech32()}@01@EGLDTOK4FL-abcdef@01@1@stakeFarmTokens`, + `ESDTNFTTransfer@EGLDTOK4FL-abcdef@01@1@${Address.Zero().bech32()}@stakeFarmTokens`, ), options: undefined, signature: undefined, @@ -254,7 +254,7 @@ describe('StakingProxyTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stakeProxy.claimDualYield, data: encodeTransactionData( - `MultiESDTNFTTransfer@0000000000000000000000000000000000000000000000000000000000000000@01@METASTAKE-123456@01@1000000000000000000@claimDualYield`, + `ESDTNFTTransfer@METASTAKE-123456@01@1000000000000000000@0000000000000000000000000000000000000000000000000000000000000000@claimDualYield`, ), chainID: 'T', version: 2, diff --git a/src/modules/staking/mocks/staking.abi.service.mock.ts b/src/modules/staking/mocks/staking.abi.service.mock.ts index be9114c77..bb2ec47af 100644 --- a/src/modules/staking/mocks/staking.abi.service.mock.ts +++ b/src/modules/staking/mocks/staking.abi.service.mock.ts @@ -5,7 +5,7 @@ import { BoostedYieldsFactors } from 'src/modules/farm/models/farm.v2.model'; export class StakingAbiServiceMock implements IStakingAbiService { async farmTokenID(stakeAddress: string): Promise { - return 'STAKETOK-1111'; + return 'STAKETOK-111111'; } async farmingTokenID(stakeAddress: string): Promise { return 'WEGLD-123456'; diff --git a/src/modules/staking/specs/staking.transactions.service.spec.ts b/src/modules/staking/specs/staking.transactions.service.spec.ts index 4ccb13259..a92f6687f 100644 --- a/src/modules/staking/specs/staking.transactions.service.spec.ts +++ b/src/modules/staking/specs/staking.transactions.service.spec.ts @@ -74,7 +74,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.stakeFarm.default, data: encodeTransactionData( - 'MultiESDTNFTTransfer@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@01@WEGLD-123456@@1000@stakeFarm', + 'ESDTTransfer@WEGLD-123456@1000@stakeFarm', ), chainID: mxConfig.chainID, version: 2, @@ -106,7 +106,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.unstakeFarm, data: encodeTransactionData( - 'ESDTNFTTransfer@WEGLD-123456@@1000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@unstakeFarm', + 'ESDTTransfer@WEGLD-123456@1000@unstakeFarm', ), chainID: 'T', version: 2, @@ -138,7 +138,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.unbondFarm, data: encodeTransactionData( - 'ESDTNFTTransfer@WEGLD-123456@@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@unbondFarm', + 'ESDTTransfer@WEGLD-123456@01000000@unbondFarm', ), chainID: 'T', version: 2, @@ -170,7 +170,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.claimRewards, data: encodeTransactionData( - 'ESDTNFTTransfer@WEGLD-123456@@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@claimRewards', + 'ESDTTransfer@WEGLD-123456@01000000@claimRewards', ), chainID: 'T', version: 2, @@ -202,7 +202,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.compoundRewards, data: encodeTransactionData( - 'ESDTNFTTransfer@WEGLD-123456@@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@compoundRewards', + 'ESDTTransfer@WEGLD-123456@01000000@compoundRewards', ), chainID: 'T', version: 2, @@ -245,8 +245,8 @@ describe('StakingTransactionService', () => { const mxApi = module.get(MXApiService); jest.spyOn(mxApi, 'getNftsForUser').mockResolvedValue([ { - identifier: 'STAKETOK-1111-01', - collection: 'STAKETOK-1111', + identifier: 'STAKETOK-111111-01', + collection: 'STAKETOK-111111', attributes: 'AAAABHA3g/MAAAAAAAAACA3gtrOnZAAAYLtgEaeB64tT1h15BHRQrapGl34gI5MSlRJiwQV9EJA=', nonce: 1, @@ -276,7 +276,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.claimRewards, data: encodeTransactionData( - 'ESDTNFTTransfer@STAKETOK-1111@01@1000000000000000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@claimRewards', + 'ESDTNFTTransfer@STAKETOK-111111@01@1000000000000000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@claimRewards', ), chainID: 'T', version: 2, From 38d5e43ae9031a32371180c3640561aa8dc8a281 Mon Sep 17 00:00:00 2001 From: hschiau Date: Tue, 24 Sep 2024 11:26:43 +0300 Subject: [PATCH 4/5] SERVICES-2608: use mergeFarmTokensMultiplier gas limit from farms v1.3 --- src/config/default.json | 3 +-- .../farm/base-module/services/farm.transaction.service.ts | 2 +- src/modules/farm/specs/farm.transactions.service.spec.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/config/default.json b/src/config/default.json index 0a2785332..3253b603c 100644 --- a/src/config/default.json +++ b/src/config/default.json @@ -255,8 +255,7 @@ "resume": 200000000, "registerFarmToken": 200000000, "setLocalRolesFarmToken": 20000000, - "setFarmMigrationConfig": 7300000, - "mergeFarmTokensMultiplier": 200000000 + "setFarmMigrationConfig": 7300000 } }, "proxy": { diff --git a/src/modules/farm/base-module/services/farm.transaction.service.ts b/src/modules/farm/base-module/services/farm.transaction.service.ts index 0cc5d1914..fee4d3bc9 100644 --- a/src/modules/farm/base-module/services/farm.transaction.service.ts +++ b/src/modules/farm/base-module/services/farm.transaction.service.ts @@ -273,7 +273,7 @@ export abstract class TransactionsFarmService { .withMultiESDTNFTTransfer(mappedPayments) .withSender(Address.fromString(sender)) .withGasLimit( - gasConfig.farms.admin.mergeFarmTokensMultiplier * + gasConfig.farms['v1.3'].mergeFarmTokensMultiplier * payments.length, ) .withChainID(mxConfig.chainID) diff --git a/src/modules/farm/specs/farm.transactions.service.spec.ts b/src/modules/farm/specs/farm.transactions.service.spec.ts index b37c34a0e..1e938dd26 100644 --- a/src/modules/farm/specs/farm.transactions.service.spec.ts +++ b/src/modules/farm/specs/farm.transactions.service.spec.ts @@ -785,7 +785,7 @@ describe('FarmService', () => { 'erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', sender: 'erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu', gasPrice: 1000000000, - gasLimit: gasConfig.farms.admin.mergeFarmTokensMultiplier * 2, + gasLimit: gasConfig.farms['v1.3'].mergeFarmTokensMultiplier * 2, data: encodeTransactionData( 'MultiESDTNFTTransfer@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqssfuwnk5@02@EGLDMEXFL-abcdef@@01000000000000@EGLDMEXFL-abcdef@@01000000000000@mergeFarmTokens', ), From d13f8b4aa14e107d46f836d32bb9b481041a0db4 Mon Sep 17 00:00:00 2001 From: hschiau Date: Tue, 24 Sep 2024 16:23:59 +0300 Subject: [PATCH 5/5] SERVICES-2608: fixed staking transaction unit tests --- .../staking.transactions.service.spec.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/modules/staking/specs/staking.transactions.service.spec.ts b/src/modules/staking/specs/staking.transactions.service.spec.ts index a92f6687f..70fa7ac6a 100644 --- a/src/modules/staking/specs/staking.transactions.service.spec.ts +++ b/src/modules/staking/specs/staking.transactions.service.spec.ts @@ -92,8 +92,8 @@ describe('StakingTransactionService', () => { Address.Zero().bech32(), Address.Zero().bech32(), new InputTokenModel({ - tokenID: 'WEGLD-123456', - nonce: 0, + tokenID: 'STAKETOK-111111', + nonce: 1, amount: '1000', }), ); @@ -106,7 +106,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.unstakeFarm, data: encodeTransactionData( - 'ESDTTransfer@WEGLD-123456@1000@unstakeFarm', + 'ESDTNFTTransfer@STAKETOK-111111@01@1000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@unstakeFarm', ), chainID: 'T', version: 2, @@ -124,8 +124,8 @@ describe('StakingTransactionService', () => { Address.Zero().bech32(), Address.Zero().bech32(), new InputTokenModel({ - tokenID: 'WEGLD-123456', - nonce: 0, + tokenID: 'STAKETOK-111111', + nonce: 1, amount: '1000000', }), ); @@ -138,7 +138,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.unbondFarm, data: encodeTransactionData( - 'ESDTTransfer@WEGLD-123456@01000000@unbondFarm', + 'ESDTNFTTransfer@STAKETOK-111111@01@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@unbondFarm', ), chainID: 'T', version: 2, @@ -156,8 +156,8 @@ describe('StakingTransactionService', () => { Address.Zero().bech32(), Address.Zero().bech32(), new InputTokenModel({ - tokenID: 'WEGLD-123456', - nonce: 0, + tokenID: 'STAKETOK-111111', + nonce: 1, amount: '1000000', }), ); @@ -170,7 +170,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.claimRewards, data: encodeTransactionData( - 'ESDTTransfer@WEGLD-123456@01000000@claimRewards', + 'ESDTNFTTransfer@STAKETOK-111111@01@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@claimRewards', ), chainID: 'T', version: 2, @@ -188,8 +188,8 @@ describe('StakingTransactionService', () => { Address.Zero().bech32(), Address.Zero().bech32(), new InputTokenModel({ - tokenID: 'WEGLD-123456', - nonce: 0, + tokenID: 'STAKETOK-111111', + nonce: 1, amount: '1000000', }), ); @@ -202,7 +202,7 @@ describe('StakingTransactionService', () => { gasPrice: 1000000000, gasLimit: gasConfig.stake.compoundRewards, data: encodeTransactionData( - 'ESDTTransfer@WEGLD-123456@01000000@compoundRewards', + 'ESDTNFTTransfer@STAKETOK-111111@01@01000000@erd1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq6gq4hu@compoundRewards', ), chainID: 'T', version: 2,