diff --git a/.changeset/violet-pots-provide.md b/.changeset/violet-pots-provide.md new file mode 100644 index 00000000..94512a6e --- /dev/null +++ b/.changeset/violet-pots-provide.md @@ -0,0 +1,5 @@ +--- +'@rosen-chains/evm-rpc': patch +--- + +update evm-address-tx-extractor diff --git a/package-lock.json b/package-lock.json index e33d2340..0fa7f37e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5363,12 +5363,12 @@ ] }, "node_modules/@rosen-bridge/abstract-extractor": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-extractor/-/abstract-extractor-0.1.5.tgz", - "integrity": "sha512-+TIL0H88voDrZZg0ZdgdHPnIlrUq+m1n8IbMpCEGCs0EdTAcNXKhdK43vuuaMF7rDrunv8SdGEmzTB4GQnkloQ==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-extractor/-/abstract-extractor-0.2.0.tgz", + "integrity": "sha512-F5G6iZrK/ELXnDqSvjFvAHzfLxUEE8TWCTioccrAZF7ETv2/ix0ScSnmuf0tQ3nma0Fr01STSC/8mg+4cPA3DA==", "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", - "@rosen-clients/ergo-explorer": "^1.1.1", + "@rosen-clients/ergo-explorer": "^1.1.2", "@rosen-clients/ergo-node": "^1.1.1", "lodash-es": "^4.17.21" }, @@ -5410,14 +5410,18 @@ "node": ">=20.11.0" } }, + "node_modules/@rosen-bridge/ethereum": { + "resolved": "packages/chains/ethereum", + "link": true + }, "node_modules/@rosen-bridge/evm-address-tx-extractor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rosen-bridge/evm-address-tx-extractor/-/evm-address-tx-extractor-1.0.0.tgz", - "integrity": "sha512-N2AC2Ei0Ip0amyj+cdnsE88hKvEmN7lpiV41HKTNCjJbiR8erdCqL61c/uId2Lso36E5ifYLZF+E9eKMDpX86g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rosen-bridge/evm-address-tx-extractor/-/evm-address-tx-extractor-1.0.2.tgz", + "integrity": "sha512-g0+uOBbsg8oeldgoayYFWQJ4U1Gv77toA+MYgVksGJYnchaAGZrzmgDNpc5MEgIMcq8h01lkNSwYCgC3d7MnrQ==", "dependencies": { - "@rosen-bridge/abstract-extractor": "^0.1.5", + "@rosen-bridge/abstract-extractor": "^0.2.0", "@rosen-bridge/abstract-logger": "^1.0.0", - "@rosen-bridge/scanner": "^4.0.5", + "@rosen-bridge/scanner": "^4.1.1", "ethers": "^6.11.0", "typeorm": "^0.3.20" }, @@ -5469,15 +5473,15 @@ } }, "node_modules/@rosen-bridge/scanner": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@rosen-bridge/scanner/-/scanner-4.0.5.tgz", - "integrity": "sha512-TPX12mwpCz9elIkwzZgHoXa4M8Ho41rFomJ8hMvB9KgBCVJfq0UVUBUI6WWeAiFaKub66M8vzWBMoKl8kS6acA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/scanner/-/scanner-4.1.1.tgz", + "integrity": "sha512-v59BdX2vZvvP33yHOPx8fAEiRHaI6oBqH0nBp73yLankDXpGF35awQYwiuphBeA0vKTdEJGglis0rZZ8GA2Y2A==", "dependencies": { "@apollo/client": "^3.8.7", "@blockfrost/blockfrost-js": "^5.4.0", "@cardano-ogmios/client": "^6.3.0", "@cardano-ogmios/schema": "^6.3.0", - "@rosen-bridge/abstract-extractor": "^0.1.5", + "@rosen-bridge/abstract-extractor": "^0.2.0", "@rosen-bridge/abstract-logger": "^1.0.0", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-clients/ergo-explorer": "^1.1.1", @@ -5571,8 +5575,9 @@ } }, "node_modules/@rosen-clients/ergo-explorer": { - "version": "1.1.1", - "license": "GPL-3.0", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rosen-clients/ergo-explorer/-/ergo-explorer-1.1.2.tgz", + "integrity": "sha512-GHTBgGZlPbiHfpJs0X/2v+9Ern5hlDaNIHNAgse2iDDvOu1jdpDpY+bpnHtWiLcUKJWUfV2RjBnBxpHMyHAUKQ==", "dependencies": { "@rosen-clients/axios": "^0.1.0" } @@ -18347,6 +18352,305 @@ "@rosen-chains/abstract-chain": "^8.0.0" } }, + "packages/chains/ethereum": { + "name": "@rosen-bridge/ethereum", + "version": "0.1.0", + "license": "GPL-3.0", + "dependencies": { + "@rosen-bridge/tokens": "^1.2.1" + }, + "devDependencies": { + "@types/node": "^20.11.9", + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "prettier": "^3.2.4", + "typescript": "^5.3.3" + }, + "engines": { + "node": ">=20.11.0" + }, + "peerDependencies": { + "@rosen-chains/abstract-chain": "^8.0.0", + "@rosen-chains/evm": "^1.0.0" + } + }, + "packages/chains/ethereum/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "packages/chains/ethereum/node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "packages/chains/ethereum/node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "packages/chains/ethereum/node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "packages/chains/ethereum/node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "packages/chains/ethereum/node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "packages/chains/ethereum/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "packages/chains/ethereum/node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "packages/chains/ethereum/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "packages/chains/ethereum/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "packages/chains/ethereum/node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "packages/chains/ethereum/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "packages/chains/ethereum/node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "packages/chains/ethereum/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "packages/chains/ethereum/node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "packages/chains/evm": { "name": "@rosen-chains/evm", "version": "1.0.0", @@ -20995,7 +21299,7 @@ "license": "GPL-3.0", "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", - "@rosen-bridge/evm-address-tx-extractor": "^1.0.0", + "@rosen-bridge/evm-address-tx-extractor": "^1.0.2", "typeorm": "^0.3.20" }, "devDependencies": { diff --git a/packages/chains/ethereum/.eslintignore b/packages/chains/ethereum/.eslintignore new file mode 100644 index 00000000..1521c8b7 --- /dev/null +++ b/packages/chains/ethereum/.eslintignore @@ -0,0 +1 @@ +dist diff --git a/packages/chains/ethereum/README.md b/packages/chains/ethereum/README.md new file mode 100644 index 00000000..e50c1647 --- /dev/null +++ b/packages/chains/ethereum/README.md @@ -0,0 +1,24 @@ +# @rosen-bridge/ethereum + +## Table of contents + +- [Introduction](#introduction) +- [Installation](#installation) + +## Introduction + +this project contains ethereum chain for Rosen-bridge + +## Installation + +npm: + +```sh +npm i @rosen-bridge/ethereum +``` + +yarn: + +```sh +yarn add @rosen-bridge/ethereum +``` diff --git a/packages/chains/ethereum/lib/EthereumChain.ts b/packages/chains/ethereum/lib/EthereumChain.ts new file mode 100644 index 00000000..ff277dc5 --- /dev/null +++ b/packages/chains/ethereum/lib/EthereumChain.ts @@ -0,0 +1,15 @@ +import { RosenTokens } from '@rosen-bridge/tokens'; +import { + AbstractEvmNetwork, + EvmChain, + EvmConfigs, + TssSignFunction, +} from '@rosen-chains/evm'; + +class EthereumChain extends EvmChain { + CHAIN = 'ethereum'; + NATIVE_TOKEN_ID = 'eth'; + CHAIN_ID = 1n; +} + +export default EthereumChain; diff --git a/packages/chains/ethereum/lib/index.ts b/packages/chains/ethereum/lib/index.ts new file mode 100644 index 00000000..530c2f04 --- /dev/null +++ b/packages/chains/ethereum/lib/index.ts @@ -0,0 +1 @@ +export * from './EthereumChain'; diff --git a/packages/chains/ethereum/package.json b/packages/chains/ethereum/package.json new file mode 100644 index 00000000..70a8e900 --- /dev/null +++ b/packages/chains/ethereum/package.json @@ -0,0 +1,37 @@ +{ + "name": "@rosen-bridge/ethereum", + "version": "0.1.0", + "description": "this project contains ethereum chain for Rosen-bridge", + "repository": "https://github.com/rosen-bridge/rosen-chains", + "license": "GPL-3.0", + "author": "Rosen Team", + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc --build tsconfig.build.json", + "lint": "eslint --fix . && npm run prettify", + "prettify": "prettier --write . --ignore-path ./.gitignore", + "release": "npm run build && npm publish --access public", + "type-check": "tsc --noEmit" + }, + "devDependencies": { + "@types/node": "^20.11.9", + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "prettier": "^3.2.4", + "typescript": "^5.3.3" + }, + "engines": { + "node": ">=20.11.0" + }, + "peerDependencies": { + "@rosen-chains/abstract-chain": "^8.0.0", + "@rosen-chains/evm": "^1.0.0" + }, + "dependencies": { + "@rosen-bridge/tokens": "^1.2.1" + } +} diff --git a/packages/chains/ethereum/tsconfig.build.json b/packages/chains/ethereum/tsconfig.build.json new file mode 100644 index 00000000..a62f9727 --- /dev/null +++ b/packages/chains/ethereum/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./lib" + }, + "exclude": ["tests"], + "references": [ + { "path": "../../abstract-chain/tsconfig.build.json" }, + { "path": "../evm/tsconfig.build.json" } + ] +} diff --git a/packages/chains/ethereum/tsconfig.json b/packages/chains/ethereum/tsconfig.json new file mode 100644 index 00000000..76a96ebb --- /dev/null +++ b/packages/chains/ethereum/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": ["tests", "lib"], + "references": [{ "path": "../../abstract-chain" }, { "path": "../evm" }] +} diff --git a/packages/networks/evm-rpc/package.json b/packages/networks/evm-rpc/package.json index abc65aa6..11112cd4 100644 --- a/packages/networks/evm-rpc/package.json +++ b/packages/networks/evm-rpc/package.json @@ -34,7 +34,7 @@ }, "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", - "@rosen-bridge/evm-address-tx-extractor": "^1.0.0", + "@rosen-bridge/evm-address-tx-extractor": "^1.0.2", "typeorm": "^0.3.20" }, "peerDependencies": {