diff --git a/api/.eslintrc b/api/.eslintrc
deleted file mode 100644
index e8ad599849..0000000000
--- a/api/.eslintrc
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "root": true,
- "env": {
- "browser": true,
- "es2021": true,
- "node": true
- },
- "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "ecmaVersion": "latest",
- "sourceType": "module"
- },
- "plugins": ["@typescript-eslint"],
- "rules": {
- "semi": ["error", "always"],
- "object-curly-spacing": ["error", "always"],
- "indent": [
- "warn",
- 2,
- {
- "SwitchCase": 1,
- "flatTernaryExpressions": false,
- "offsetTernaryExpressions": true
- }
- ],
- "linebreak-style": ["error", "unix"],
- "quotes": ["warn", "single", { "avoidEscape": true }],
- "@typescript-eslint/no-empty-function": 0,
- "@typescript-eslint/no-explicit-any": "off",
- "no-case-declarations": 0,
- "eol-last": "error",
- "max-len": ["error", { "code": 120, "tabWidth": 2, "ignoreStrings": true, "ignoreComments": true }],
- "sort-imports": [
- "error",
- {
- "ignoreCase": false,
- "ignoreDeclarationSort": false,
- "ignoreMemberSort": false,
- "memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
- "allowSeparatedGroups": true
- }
- ]
- }
-}
diff --git a/api/CHANGELOG.md b/api/CHANGELOG.md
index 1cf8177fce..35f37d2377 100644
--- a/api/CHANGELOG.md
+++ b/api/CHANGELOG.md
@@ -1,3 +1,13 @@
+## 0.38.2
+_08/01/2024_
+
+_Compatible with [1.4.2](https://github.com/gear-tech/gear/releases/tag/v1.4.2) release_
+
+### Changes
+https://github.com/gear-tech/gear-js/pull/1584
+- Remove supporting old runtime versions
+- Bump dependencies
+
## 0.38.1
_05/22/2024_
diff --git a/api/eslint.config.js b/api/eslint.config.js
new file mode 100644
index 0000000000..188434e46f
--- /dev/null
+++ b/api/eslint.config.js
@@ -0,0 +1,63 @@
+import globals from 'globals';
+import tsParser from '@typescript-eslint/parser';
+import typescriptEslint from '@typescript-eslint/eslint-plugin';
+
+export default {
+ extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
+ plugins: {
+ '@typescript-eslint': typescriptEslint,
+ },
+ languageOptions: {
+ globals: {
+ ...globals.browser,
+ ...globals.node,
+ },
+ parser: tsParser,
+ ecmaVersion: 'latest',
+ sourceType: 'module',
+ },
+ rules: {
+ semi: ['error', 'always'],
+ 'object-curly-spacing': ['error', 'always'],
+ indent: [
+ 'warn',
+ 2,
+ {
+ SwitchCase: 1,
+ flatTernaryExpressions: false,
+ offsetTernaryExpressions: true,
+ },
+ ],
+ 'linebreak-style': ['error', 'unix'],
+ quotes: [
+ 'warn',
+ 'single',
+ {
+ avoidEscape: true,
+ },
+ ],
+ '@typescript-eslint/no-empty-function': 0,
+ '@typescript-eslint/no-explicit-any': 'off',
+ 'no-case-declarations': 0,
+ 'eol-last': 'error',
+ 'max-len': [
+ 'error',
+ {
+ code: 120,
+ tabWidth: 2,
+ ignoreStrings: true,
+ ignoreComments: true,
+ },
+ ],
+ 'sort-imports': [
+ 'error',
+ {
+ ignoreCase: false,
+ ignoreDeclarationSort: false,
+ ignoreMemberSort: false,
+ memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
+ allowSeparatedGroups: true,
+ },
+ ],
+ },
+};
diff --git a/api/package.json b/api/package.json
index fdee45a175..3bf41312f7 100644
--- a/api/package.json
+++ b/api/package.json
@@ -1,6 +1,6 @@
{
"name": "@gear-js/api",
- "version": "0.38.1",
+ "version": "0.38.2",
"description": "A JavaScript library that provides functionality to connect GEAR Component APIs.",
"main": "cjs/index.js",
"module": "index.js",
@@ -48,38 +48,38 @@
},
"license": "GPL-3.0",
"peerDependencies": {
- "@polkadot/api": "11.2.1",
+ "@polkadot/api": "12.0.1",
"@polkadot/wasm-crypto": "7.3.2",
"rxjs": "7.8.1"
},
"devDependencies": {
- "@babel/plugin-transform-typescript": "7.24.7",
- "@babel/preset-env": "7.24.7",
+ "@babel/plugin-transform-typescript": "7.25.2",
+ "@babel/preset-env": "7.25.3",
"@babel/preset-typescript": "7.24.7",
- "@polkadot/api": "10.13.1",
- "@polkadot/typegen": "10.13.1",
- "@polkadot/types": "10.13.1",
- "@polkadot/types-codec": "10.13.1",
+ "@polkadot/api": "12.2.3",
+ "@polkadot/typegen": "12.2.3",
+ "@polkadot/types": "12.2.3",
+ "@polkadot/types-codec": "12.2.3",
"@polkadot/wasm-crypto": "7.3.2",
- "@rollup/plugin-commonjs": "25.0.8",
+ "@rollup/plugin-commonjs": "26.0.1",
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-typescript": "11.1.6",
"@types/jest": "29.5.12",
"@types/rollup-plugin-peer-deps-external": "2.2.5",
- "@typescript-eslint/parser": "5.62.0",
+ "@typescript-eslint/parser": "8.0.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-jest": "29.7.0",
- "eslint": "8.57.0",
+ "eslint": "9.8.0",
"jest": "29.7.0",
- "rollup": "3.29.4",
+ "rollup": "4.19.2",
"rollup-plugin-peer-deps-external": "2.2.4",
"rollup-plugin-typescript2": "0.36.0",
"rxjs": "7.8.1",
- "ts-jest": "29.1.4",
+ "ts-jest": "29.2.4",
"ts-node": "10.9.2",
- "typescript": "5.4.5"
+ "typescript": "5.5.4"
},
"lint-staged": {
"*.ts": [
diff --git a/api/src/Code.ts b/api/src/Code.ts
index d1fe358575..f77c1d93b0 100644
--- a/api/src/Code.ts
+++ b/api/src/Code.ts
@@ -2,7 +2,7 @@ import { Bytes, Option } from '@polkadot/types';
import { HexString } from '@polkadot/util/types';
import { u8aToHex } from '@polkadot/util';
-import { CodeUploadResult, GearCommonCodeMetadata, GearCoreCodeInstrumentedCode } from './types';
+import { CodeUploadResult, GearCommonCodeMetadata, GearCoreCodeInstrumentedInstrumentedCode } from './types';
import { generateCodeHash, getIdsFromKeys, validateCodeId } from './utils';
import { CodeDoesNotExistError } from './errors';
import { GearTransaction } from './Transaction';
@@ -36,7 +36,7 @@ export class GearCode extends GearTransaction {
* ### Get code storage
* @param codeId
*/
- async storage(codeId: HexString): Promise