From 12c736c0f93d3884d204017e244750e854787c62 Mon Sep 17 00:00:00 2001 From: HFazelinia Date: Mon, 14 Oct 2024 12:15:05 +0100 Subject: [PATCH 1/7] add @rosen-chains/binance --- .changeset/nine-poems-argue.md | 2 + package-lock.json | 307 ++++++++++++++++++++ packages/chains/binance/.eslintignore | 1 + packages/chains/binance/README.md | 24 ++ packages/chains/binance/lib/BinanceChain.ts | 37 +++ packages/chains/binance/lib/constants.ts | 2 + packages/chains/binance/lib/index.ts | 2 + packages/chains/binance/package.json | 36 +++ packages/chains/binance/tsconfig.build.json | 11 + packages/chains/binance/tsconfig.json | 8 + 10 files changed, 430 insertions(+) create mode 100644 .changeset/nine-poems-argue.md create mode 100644 packages/chains/binance/.eslintignore create mode 100644 packages/chains/binance/README.md create mode 100644 packages/chains/binance/lib/BinanceChain.ts create mode 100644 packages/chains/binance/lib/constants.ts create mode 100644 packages/chains/binance/lib/index.ts create mode 100644 packages/chains/binance/package.json create mode 100644 packages/chains/binance/tsconfig.build.json create mode 100644 packages/chains/binance/tsconfig.json diff --git a/.changeset/nine-poems-argue.md b/.changeset/nine-poems-argue.md new file mode 100644 index 00000000..a845151c --- /dev/null +++ b/.changeset/nine-poems-argue.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/package-lock.json b/package-lock.json index 6da26eee..d72fe53c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5523,6 +5523,10 @@ "resolved": "packages/abstract-chain", "link": true }, + "node_modules/@rosen-chains/binance": { + "resolved": "packages/chains/binance", + "link": true + }, "node_modules/@rosen-chains/bitcoin": { "resolved": "packages/chains/bitcoin", "link": true @@ -17118,6 +17122,309 @@ "typescript": "^4.9.5" } }, + "packages/chains/binance": { + "version": "0.1.0", + "license": "GPL-3.0", + "dependencies": { + "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/tokens": "^1.2.1", + "@rosen-chains/abstract-chain": "^9.0.2", + "@rosen-chains/evm": "^4.1.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" + } + }, + "packages/chains/binance/node_modules/@types/node": { + "version": "20.16.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.11.tgz", + "integrity": "sha512-y+cTCACu92FyA5fgQSAI8A1H429g7aSK2HsO7K4XYUWc4dY5IUz55JSDIYT6/VsOLfGy8vmvQYC2hfb0iF16Uw==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "packages/chains/binance/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/binance/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/binance/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/binance/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/binance/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/binance/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/binance/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/binance/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/binance/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/binance/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/binance/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/binance/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/binance/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/binance/node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "packages/chains/binance/node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, "packages/chains/bitcoin": { "name": "@rosen-chains/bitcoin", "version": "5.1.0", diff --git a/packages/chains/binance/.eslintignore b/packages/chains/binance/.eslintignore new file mode 100644 index 00000000..1521c8b7 --- /dev/null +++ b/packages/chains/binance/.eslintignore @@ -0,0 +1 @@ +dist diff --git a/packages/chains/binance/README.md b/packages/chains/binance/README.md new file mode 100644 index 00000000..4679b023 --- /dev/null +++ b/packages/chains/binance/README.md @@ -0,0 +1,24 @@ +# @rosen-chains/binance + +## Table of contents + +- [Introduction](#introduction) +- [Installation](#installation) + +## Introduction + +this project contains binance chain for Rosen-bridge + +## Installation + +npm: + +```sh +npm i @rosen-chains/binance +``` + +yarn: + +```sh +yarn add @rosen-chains/binance +``` diff --git a/packages/chains/binance/lib/BinanceChain.ts b/packages/chains/binance/lib/BinanceChain.ts new file mode 100644 index 00000000..82a85341 --- /dev/null +++ b/packages/chains/binance/lib/BinanceChain.ts @@ -0,0 +1,37 @@ +import { + AbstractEvmNetwork, + EvmChain, + EvmConfigs, + TssSignFunction, +} from '@rosen-chains/evm'; +import { RosenTokens } from '@rosen-bridge/tokens'; +import { AbstractLogger } from '@rosen-bridge/abstract-logger'; +import { BNB, BINANCE_CHAIN } from './constants'; + +class BinanceChain extends EvmChain { + CHAIN = BINANCE_CHAIN; + NATIVE_TOKEN_ID = BNB; + CHAIN_ID = 56n; + + constructor( + network: AbstractEvmNetwork, + configs: EvmConfigs, + tokens: RosenTokens, + supportedTokens: Array, + signFunction: TssSignFunction, + logger?: AbstractLogger + ) { + super( + network, + configs, + tokens, + supportedTokens, + signFunction, + BINANCE_CHAIN, + BNB, + logger + ); + } +} + +export default BinanceChain; diff --git a/packages/chains/binance/lib/constants.ts b/packages/chains/binance/lib/constants.ts new file mode 100644 index 00000000..5b28073f --- /dev/null +++ b/packages/chains/binance/lib/constants.ts @@ -0,0 +1,2 @@ +export const BINANCE_CHAIN = 'binance'; +export const BNB = 'bnb'; diff --git a/packages/chains/binance/lib/index.ts b/packages/chains/binance/lib/index.ts new file mode 100644 index 00000000..a330bab3 --- /dev/null +++ b/packages/chains/binance/lib/index.ts @@ -0,0 +1,2 @@ +export * from './BinanceChain'; +export * from './constants'; diff --git a/packages/chains/binance/package.json b/packages/chains/binance/package.json new file mode 100644 index 00000000..4db5a0ec --- /dev/null +++ b/packages/chains/binance/package.json @@ -0,0 +1,36 @@ +{ + "name": "@rosen-chains/binance", + "version": "0.1.0", + "description": "this project contains binance 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" + }, + "dependencies": { + "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/tokens": "^1.2.1", + "@rosen-chains/abstract-chain": "^9.0.2", + "@rosen-chains/evm": "^4.1.1" + } +} diff --git a/packages/chains/binance/tsconfig.build.json b/packages/chains/binance/tsconfig.build.json new file mode 100644 index 00000000..a62f9727 --- /dev/null +++ b/packages/chains/binance/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/binance/tsconfig.json b/packages/chains/binance/tsconfig.json new file mode 100644 index 00000000..76a96ebb --- /dev/null +++ b/packages/chains/binance/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": ["tests", "lib"], + "references": [{ "path": "../../abstract-chain" }, { "path": "../evm" }] +} From 914b1cceaf3d1e1c748449f8a0baca851e4adc89 Mon Sep 17 00:00:00 2001 From: HFazelinia Date: Mon, 14 Oct 2024 12:30:13 +0100 Subject: [PATCH 2/7] fix UInt8Array type error --- .changeset/dry-snails-cross.md | 5 +++ packages/chains/evm/lib/EvmChain.ts | 50 +++++++++++++++------------ packages/chains/evm/lib/Serializer.ts | 6 ++-- 3 files changed, 36 insertions(+), 25 deletions(-) create mode 100644 .changeset/dry-snails-cross.md diff --git a/.changeset/dry-snails-cross.md b/.changeset/dry-snails-cross.md new file mode 100644 index 00000000..f0593f35 --- /dev/null +++ b/.changeset/dry-snails-cross.md @@ -0,0 +1,5 @@ +--- +'@rosen-chains/evm': patch +--- + +fix UInt8Array type error diff --git a/packages/chains/evm/lib/EvmChain.ts b/packages/chains/evm/lib/EvmChain.ts index 58c605ed..5d9555cb 100644 --- a/packages/chains/evm/lib/EvmChain.ts +++ b/packages/chains/evm/lib/EvmChain.ts @@ -116,7 +116,9 @@ abstract class EvmChain extends AbstractChain { : nonceCount.set(nonce, 1); }); serializedSignedTransactions.map((tx) => { - const nonce = Serializer.deserialize(Buffer.from(tx, 'hex')).nonce; + const nonce = Serializer.deserialize( + Uint8Array.from(Buffer.from(tx, 'hex')) + ).nonce; const count = nonceCount.get(nonce); count !== undefined ? nonceCount.set(nonce, count + 1) @@ -545,28 +547,30 @@ abstract class EvmChain extends AbstractChain { tx.unsignedHash.slice(0, 2) === '0x' ? tx.unsignedHash.slice(2) : tx.unsignedHash; - return this.signFunction(Buffer.from(hash, 'hex')).then((res) => { - const r = '0x' + res.signature.slice(0, 64); - const s = '0x' + res.signature.slice(64, 128); - const yParity = Number(res.signatureRecovery); - if (yParity !== 0 && yParity !== 1) - throw new ImpossibleBehavior( - `non-binary signature recovery: ${res.signatureRecovery}` + return this.signFunction(Uint8Array.from(Buffer.from(hash, 'hex'))).then( + (res) => { + const r = '0x' + res.signature.slice(0, 64); + const s = '0x' + res.signature.slice(64, 128); + const yParity = Number(res.signatureRecovery); + if (yParity !== 0 && yParity !== 1) + throw new ImpossibleBehavior( + `non-binary signature recovery: ${res.signatureRecovery}` + ); + const signature = Signature.from({ + r, + s, + yParity: yParity, + }); + tx.signature = signature; + return new PaymentTransaction( + transaction.network, + transaction.txId, + transaction.eventId, + Serializer.signedSerialize(tx), + transaction.txType ); - const signature = Signature.from({ - r, - s, - yParity: yParity, - }); - tx.signature = signature; - return new PaymentTransaction( - transaction.network, - transaction.txId, - transaction.eventId, - Serializer.signedSerialize(tx), - transaction.txType - ); - }); + } + ); }; /** @@ -674,7 +678,7 @@ abstract class EvmChain extends AbstractChain { this.CHAIN, obj.txId, obj.eventId, - Buffer.from(obj.txBytes, 'hex'), + Uint8Array.from(Buffer.from(obj.txBytes, 'hex')), obj.txType as TransactionType ); }; diff --git a/packages/chains/evm/lib/Serializer.ts b/packages/chains/evm/lib/Serializer.ts index c091d32c..0645dd7d 100644 --- a/packages/chains/evm/lib/Serializer.ts +++ b/packages/chains/evm/lib/Serializer.ts @@ -9,7 +9,9 @@ class Serializer { */ static serialize = (tx: Transaction): Uint8Array => { try { - return Buffer.from(tx.unsignedSerialized.substring(2), 'hex'); + return Uint8Array.from( + Buffer.from(tx.unsignedSerialized.substring(2), 'hex') + ); } catch (error) { throw new SerializationError(`${error}`); } @@ -35,7 +37,7 @@ class Serializer { */ static signedSerialize = (tx: Transaction): Uint8Array => { try { - return Buffer.from(tx.serialized.substring(2), 'hex'); + return Uint8Array.from(Buffer.from(tx.serialized.substring(2), 'hex')); } catch (error) { throw new SerializationError(`${error}`); } From 68a7b299526394b445b4d11edc460944c75bf41e Mon Sep 17 00:00:00 2001 From: HFazelinia Date: Mon, 14 Oct 2024 15:09:32 +0100 Subject: [PATCH 3/7] fix test --- packages/chains/evm/tests/EvmChain.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/chains/evm/tests/EvmChain.spec.ts b/packages/chains/evm/tests/EvmChain.spec.ts index f34ffcaf..b2abaacb 100644 --- a/packages/chains/evm/tests/EvmChain.spec.ts +++ b/packages/chains/evm/tests/EvmChain.spec.ts @@ -2303,8 +2303,10 @@ describe('EvmChain', () => { expect(signedTx.hash).toEqual(TestData.transaction2TxId); // `signFunction` should have been called with unsigned hash without '0x' - expect(signFunction).toHaveBeenCalledWith( - Buffer.from(tx.unsignedHash.slice(2), 'hex') + expect(signFunction).toHaveBeenCalledOnce(); + const callArguments = signFunction.mock.lastCall as Uint8Array[]; + expect(Buffer.from(callArguments[0]).toString('hex')).toEqual( + tx.unsignedHash.slice(2) ); }); From d6e04b8d9c70fd3f1b3097e00a7880f361fe2e42 Mon Sep 17 00:00:00 2001 From: HFazelinia Date: Mon, 14 Oct 2024 16:02:04 +0100 Subject: [PATCH 4/7] fix package exports --- .changeset/hip-emus-act.md | 5 +++++ packages/chains/binance/lib/index.ts | 2 +- packages/chains/ethereum/lib/index.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/hip-emus-act.md diff --git a/.changeset/hip-emus-act.md b/.changeset/hip-emus-act.md new file mode 100644 index 00000000..1d896849 --- /dev/null +++ b/.changeset/hip-emus-act.md @@ -0,0 +1,5 @@ +--- +'@rosen-chains/ethereum': patch +--- + +fix EthereumChain export diff --git a/packages/chains/binance/lib/index.ts b/packages/chains/binance/lib/index.ts index a330bab3..abed4407 100644 --- a/packages/chains/binance/lib/index.ts +++ b/packages/chains/binance/lib/index.ts @@ -1,2 +1,2 @@ -export * from './BinanceChain'; +export { default as BinanceChain } from './BinanceChain'; export * from './constants'; diff --git a/packages/chains/ethereum/lib/index.ts b/packages/chains/ethereum/lib/index.ts index e64a719c..d5f879ff 100644 --- a/packages/chains/ethereum/lib/index.ts +++ b/packages/chains/ethereum/lib/index.ts @@ -1,2 +1,2 @@ -export * from './EthereumChain'; +export { default as EthereumChain } from './EthereumChain'; export * from './constants'; From fdd44ae0a3abbe6059f48e7c1e886b7cd9c8aaf6 Mon Sep 17 00:00:00 2001 From: HFazelinia Date: Mon, 21 Oct 2024 10:06:47 +0100 Subject: [PATCH 5/7] export chain ids --- .changeset/gentle-needles-walk.md | 5 +++++ package-lock.json | 1 + packages/chains/binance/lib/BinanceChain.ts | 4 ++-- packages/chains/binance/lib/constants.ts | 1 + packages/chains/ethereum/lib/EthereumChain.ts | 4 ++-- packages/chains/ethereum/lib/constants.ts | 1 + 6 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .changeset/gentle-needles-walk.md diff --git a/.changeset/gentle-needles-walk.md b/.changeset/gentle-needles-walk.md new file mode 100644 index 00000000..94468ace --- /dev/null +++ b/.changeset/gentle-needles-walk.md @@ -0,0 +1,5 @@ +--- +'@rosen-chains/ethereum': patch +--- + +Export chain ID diff --git a/package-lock.json b/package-lock.json index d72fe53c..4452ef8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17123,6 +17123,7 @@ } }, "packages/chains/binance": { + "name": "@rosen-chains/binance", "version": "0.1.0", "license": "GPL-3.0", "dependencies": { diff --git a/packages/chains/binance/lib/BinanceChain.ts b/packages/chains/binance/lib/BinanceChain.ts index 82a85341..6b9e6e59 100644 --- a/packages/chains/binance/lib/BinanceChain.ts +++ b/packages/chains/binance/lib/BinanceChain.ts @@ -6,12 +6,12 @@ import { } from '@rosen-chains/evm'; import { RosenTokens } from '@rosen-bridge/tokens'; import { AbstractLogger } from '@rosen-bridge/abstract-logger'; -import { BNB, BINANCE_CHAIN } from './constants'; +import { BNB, BINANCE_CHAIN, BINANCE_CHAIN_ID } from './constants'; class BinanceChain extends EvmChain { CHAIN = BINANCE_CHAIN; NATIVE_TOKEN_ID = BNB; - CHAIN_ID = 56n; + CHAIN_ID = BINANCE_CHAIN_ID; constructor( network: AbstractEvmNetwork, diff --git a/packages/chains/binance/lib/constants.ts b/packages/chains/binance/lib/constants.ts index 5b28073f..e0650734 100644 --- a/packages/chains/binance/lib/constants.ts +++ b/packages/chains/binance/lib/constants.ts @@ -1,2 +1,3 @@ export const BINANCE_CHAIN = 'binance'; export const BNB = 'bnb'; +export const BINANCE_CHAIN_ID = 56n; diff --git a/packages/chains/ethereum/lib/EthereumChain.ts b/packages/chains/ethereum/lib/EthereumChain.ts index e996ef2b..30b5967d 100644 --- a/packages/chains/ethereum/lib/EthereumChain.ts +++ b/packages/chains/ethereum/lib/EthereumChain.ts @@ -6,12 +6,12 @@ import { } from '@rosen-chains/evm'; import { RosenTokens } from '@rosen-bridge/tokens'; import { AbstractLogger } from '@rosen-bridge/abstract-logger'; -import { ETH, ETHEREUM_CHAIN } from './constants'; +import { ETH, ETHEREUM_CHAIN, ETHEREUM_CHAIN_ID } from './constants'; class EthereumChain extends EvmChain { CHAIN = ETHEREUM_CHAIN; NATIVE_TOKEN_ID = ETH; - CHAIN_ID = 1n; + CHAIN_ID = ETHEREUM_CHAIN_ID; constructor( network: AbstractEvmNetwork, diff --git a/packages/chains/ethereum/lib/constants.ts b/packages/chains/ethereum/lib/constants.ts index 55ee6663..ab0c9a4e 100644 --- a/packages/chains/ethereum/lib/constants.ts +++ b/packages/chains/ethereum/lib/constants.ts @@ -1,2 +1,3 @@ export const ETHEREUM_CHAIN = 'ethereum'; export const ETH = 'eth'; +export const ETHEREUM_CHAIN_ID = 1n; From 381b63c90b19d8ff8d34058787a316a2124c2893 Mon Sep 17 00:00:00 2001 From: HFazelinia Date: Mon, 21 Oct 2024 10:09:37 +0100 Subject: [PATCH 6/7] update dependencies --- package-lock.json | 91 ++++++++++++++++--- packages/chains/binance/package.json | 2 +- packages/chains/bitcoin/package.json | 2 +- packages/chains/cardano/package.json | 2 +- packages/chains/ergo/package.json | 2 +- packages/chains/ethereum/package.json | 2 +- packages/chains/evm/package.json | 2 +- .../networks/bitcoin-esplora/package.json | 2 +- .../networks/cardano-blockfrost/package.json | 2 +- .../networks/cardano-graphql/package.json | 2 +- packages/networks/cardano-koios/package.json | 2 +- packages/networks/ergo-explorer/package.json | 2 +- packages/networks/ergo-node/package.json | 2 +- packages/networks/evm-rpc/package.json | 2 +- 14 files changed, 91 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4452ef8b..d6443422 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17127,7 +17127,7 @@ "version": "0.1.0", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/evm": "^4.1.1" @@ -17145,6 +17145,11 @@ "node": ">=20.11.0" } }, + "packages/chains/binance/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/chains/binance/node_modules/@types/node": { "version": "20.16.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.11.tgz", @@ -17431,7 +17436,7 @@ "version": "5.1.0", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/bitcoin-utxo-selection": "^0.2.0", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/rosen-extractor": "^6.2.0", @@ -17455,6 +17460,11 @@ "node": ">=20.11.0" } }, + "packages/chains/bitcoin/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/chains/bitcoin/node_modules/@types/node": { "version": "20.11.17", "dev": true, @@ -18203,7 +18213,7 @@ "license": "GPL-3.0", "dependencies": { "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/rosen-extractor": "^6.2.0", "@rosen-bridge/tokens": "^1.2.1", @@ -18227,12 +18237,17 @@ "typescript": "^4.9.5" } }, + "packages/chains/cardano/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/chains/ergo": { "name": "@rosen-chains/ergo", "version": "9.0.2", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/rosen-extractor": "^6.2.0", "@rosen-bridge/tokens": "^1.2.1", @@ -18255,12 +18270,17 @@ "typescript": "^4.9.5" } }, + "packages/chains/ergo/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/chains/ethereum": { "name": "@rosen-chains/ethereum", "version": "0.1.8", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/evm": "^4.1.1" @@ -18278,6 +18298,11 @@ "node": ">=20.11.0" } }, + "packages/chains/ethereum/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/chains/ethereum/node_modules/@types/node": { "version": "20.14.14", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.14.tgz", @@ -18558,7 +18583,7 @@ "version": "4.1.1", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/rosen-extractor": "^6.2.0", "@rosen-bridge/tokens": "^1.2.1", @@ -18581,6 +18606,11 @@ "node": ">=20.11.0" } }, + "packages/chains/evm/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/chains/evm/node_modules/@types/node": { "version": "20.11.25", "dev": true, @@ -19328,7 +19358,7 @@ "version": "4.0.3", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/bitcoin": "^5.1.0", @@ -19351,6 +19381,11 @@ "node": ">=20.11.0" } }, + "packages/networks/bitcoin-esplora/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/networks/bitcoin-esplora/node_modules/@types/node": { "version": "20.11.24", "dev": true, @@ -20100,7 +20135,7 @@ "dependencies": { "@blockfrost/blockfrost-js": "^5.4.0", "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/cardano": "^9.0.2" }, @@ -20328,6 +20363,11 @@ "win32" ] }, + "packages/networks/cardano-blockfrost/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/networks/cardano-blockfrost/node_modules/@typescript-eslint/eslint-plugin": { "version": "6.10.0", "dev": true, @@ -21090,7 +21130,7 @@ "dependencies": { "@apollo/client": "^3.8.7", "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/cardano": "^9.0.2" }, @@ -21321,6 +21361,11 @@ "win32" ] }, + "packages/networks/cardano-graphql/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/networks/cardano-graphql/node_modules/@typescript-eslint/eslint-plugin": { "version": "6.13.1", "dev": true, @@ -22082,7 +22127,7 @@ "license": "GPL-3.0", "dependencies": { "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/cardano": "^9.0.2", @@ -22104,6 +22149,11 @@ "typescript": "^5.0.4" } }, + "packages/networks/cardano-koios/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/networks/cardano-koios/node_modules/@types/node": { "version": "8.10.66", "dev": true, @@ -22126,7 +22176,7 @@ "version": "9.0.2", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/ergo": "^9.0.2", @@ -22357,6 +22407,11 @@ "win32" ] }, + "packages/networks/ergo-explorer/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/networks/ergo-explorer/node_modules/@vitest/coverage-istanbul": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-1.6.0.tgz", @@ -22920,7 +22975,7 @@ "version": "9.0.2", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/ergo": "^9.0.2", @@ -23151,6 +23206,11 @@ "win32" ] }, + "packages/networks/ergo-node/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/networks/ergo-node/node_modules/@vitest/coverage-istanbul": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-1.6.0.tgz", @@ -23698,7 +23758,7 @@ "version": "2.1.5", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/evm-address-tx-extractor": "^1.0.3", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/evm": "^4.1.1", @@ -23720,6 +23780,11 @@ "node": ">=20.11.0" } }, + "packages/networks/evm-rpc/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/networks/evm-rpc/node_modules/@types/node": { "version": "20.12.7", "dev": true, diff --git a/packages/chains/binance/package.json b/packages/chains/binance/package.json index 4db5a0ec..0ff59bbd 100644 --- a/packages/chains/binance/package.json +++ b/packages/chains/binance/package.json @@ -28,7 +28,7 @@ "node": ">=20.11.0" }, "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/evm": "^4.1.1" diff --git a/packages/chains/bitcoin/package.json b/packages/chains/bitcoin/package.json index 43b2ca5e..a7c41bdd 100644 --- a/packages/chains/bitcoin/package.json +++ b/packages/chains/bitcoin/package.json @@ -33,7 +33,7 @@ "node": ">=20.11.0" }, "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/bitcoin-utxo-selection": "^0.2.0", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/rosen-extractor": "^6.2.0", diff --git a/packages/chains/cardano/package.json b/packages/chains/cardano/package.json index 193be04b..2347da97 100644 --- a/packages/chains/cardano/package.json +++ b/packages/chains/cardano/package.json @@ -21,7 +21,7 @@ "license": "GPL-3.0", "dependencies": { "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/rosen-extractor": "^6.2.0", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/tokens": "^1.2.1", diff --git a/packages/chains/ergo/package.json b/packages/chains/ergo/package.json index c6f8ccfa..07cb6270 100644 --- a/packages/chains/ergo/package.json +++ b/packages/chains/ergo/package.json @@ -20,7 +20,7 @@ }, "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/rosen-extractor": "^6.2.0", "@rosen-bridge/tokens": "^1.2.1", diff --git a/packages/chains/ethereum/package.json b/packages/chains/ethereum/package.json index 7ece5892..f7f1ca7b 100644 --- a/packages/chains/ethereum/package.json +++ b/packages/chains/ethereum/package.json @@ -28,7 +28,7 @@ "node": ">=20.11.0" }, "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/evm": "^4.1.1" diff --git a/packages/chains/evm/package.json b/packages/chains/evm/package.json index 4abb5452..a43cec6d 100644 --- a/packages/chains/evm/package.json +++ b/packages/chains/evm/package.json @@ -33,7 +33,7 @@ "node": ">=20.11.0" }, "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/rosen-extractor": "^6.2.0", "@rosen-bridge/tokens": "^1.2.1", diff --git a/packages/networks/bitcoin-esplora/package.json b/packages/networks/bitcoin-esplora/package.json index cedbda75..2d764876 100644 --- a/packages/networks/bitcoin-esplora/package.json +++ b/packages/networks/bitcoin-esplora/package.json @@ -33,7 +33,7 @@ "node": ">=20.11.0" }, "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/bitcoin": "^5.1.0", diff --git a/packages/networks/cardano-blockfrost/package.json b/packages/networks/cardano-blockfrost/package.json index 738a900c..a4d44127 100644 --- a/packages/networks/cardano-blockfrost/package.json +++ b/packages/networks/cardano-blockfrost/package.json @@ -35,7 +35,7 @@ "dependencies": { "@blockfrost/blockfrost-js": "^5.4.0", "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/cardano": "^9.0.2" } diff --git a/packages/networks/cardano-graphql/package.json b/packages/networks/cardano-graphql/package.json index 48c0d8a2..e9ec6f23 100644 --- a/packages/networks/cardano-graphql/package.json +++ b/packages/networks/cardano-graphql/package.json @@ -39,7 +39,7 @@ "dependencies": { "@apollo/client": "^3.8.7", "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/cardano": "^9.0.2" } diff --git a/packages/networks/cardano-koios/package.json b/packages/networks/cardano-koios/package.json index 83a7cd50..30555de8 100644 --- a/packages/networks/cardano-koios/package.json +++ b/packages/networks/cardano-koios/package.json @@ -22,7 +22,7 @@ "dependencies": { "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/cardano": "^9.0.2", "@rosen-clients/cardano-koios": "^2.0.3" diff --git a/packages/networks/ergo-explorer/package.json b/packages/networks/ergo-explorer/package.json index b25ae34d..f7871972 100644 --- a/packages/networks/ergo-explorer/package.json +++ b/packages/networks/ergo-explorer/package.json @@ -20,7 +20,7 @@ }, "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/ergo": "^9.0.2", diff --git a/packages/networks/ergo-node/package.json b/packages/networks/ergo-node/package.json index 9f1b991f..19b1f847 100644 --- a/packages/networks/ergo-node/package.json +++ b/packages/networks/ergo-node/package.json @@ -21,7 +21,7 @@ "license": "GPL-3.0", "dependencies": { "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/ergo": "^9.0.2", "@rosen-clients/ergo-node": "^1.1.1", diff --git a/packages/networks/evm-rpc/package.json b/packages/networks/evm-rpc/package.json index 6fc38d65..32c36353 100644 --- a/packages/networks/evm-rpc/package.json +++ b/packages/networks/evm-rpc/package.json @@ -33,7 +33,7 @@ "node": ">=20.11.0" }, "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/evm-address-tx-extractor": "^1.0.3", "@rosen-chains/abstract-chain": "^9.0.2", "@rosen-chains/evm": "^4.1.1", From 9a98570ae1cd9f0041324522724d496628d26c8f Mon Sep 17 00:00:00 2001 From: HFazelinia Date: Mon, 21 Oct 2024 14:38:19 +0100 Subject: [PATCH 7/7] update dependencies --- package-lock.json | 61 ++++++++++++++++++---------- packages/abstract-chain/package.json | 6 +-- packages/chains/bitcoin/package.json | 4 +- packages/chains/cardano/package.json | 2 +- packages/chains/ergo/package.json | 2 +- packages/chains/evm/package.json | 2 +- 6 files changed, 48 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index d6443422..0962f9e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5403,15 +5403,21 @@ } }, "node_modules/@rosen-bridge/bitcoin-utxo-selection": { - "version": "0.2.0", - "license": "GPL-3.0", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@rosen-bridge/bitcoin-utxo-selection/-/bitcoin-utxo-selection-0.2.2.tgz", + "integrity": "sha512-Qn8k1l8lBuZvtSvtM7z5rN0s6JqjH1b6FCj5HzV8fQhgBjql6AJt9nNCUlXOm9dwO95DkWuJv0Cp0Hs8752ABg==", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0" + "@rosen-bridge/abstract-logger": "^2.0.1" }, "engines": { "node": ">=20.11.0" } }, + "node_modules/@rosen-bridge/bitcoin-utxo-selection/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "node_modules/@rosen-bridge/changeset-formatter": { "version": "0.1.0", "dev": true, @@ -5447,12 +5453,11 @@ } }, "node_modules/@rosen-bridge/minimum-fee": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@rosen-bridge/minimum-fee/-/minimum-fee-2.2.0.tgz", - "integrity": "sha512-nlh2a2A7a2PYWOMIT/upWLWqG1iJZQbfwFvFD0n2vWOOTdvGXT0WpKvwZYTNb1kwv5YA57fkold7H2l4IGupag==", - "license": "GPL-3.0", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@rosen-bridge/minimum-fee/-/minimum-fee-2.2.2.tgz", + "integrity": "sha512-WZxIh0W7LneOtAp4aECtSbnhOATdHlmKjuKf6NAWZ7BL+sawYuykXfpLvD2p7Vo/lEv4jLAX+ELf5W2mWBjbeQ==", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-clients/ergo-explorer": "^1.1.1", "@rosen-clients/ergo-node": "^1.1.1", @@ -5462,15 +5467,19 @@ "node": ">=18.16.1" } }, + "node_modules/@rosen-bridge/minimum-fee/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "node_modules/@rosen-bridge/rosen-extractor": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@rosen-bridge/rosen-extractor/-/rosen-extractor-6.2.0.tgz", - "integrity": "sha512-cKQaJn3QuhrhEqTaosN9aKgBAuepwyFuehvH+br8lmdmtn1IiCsBFzzCJpXW5lm+Uluq0/yijvkelTNVEuVbfQ==", - "license": "GPL-3.0", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@rosen-bridge/rosen-extractor/-/rosen-extractor-6.2.2.tgz", + "integrity": "sha512-02/h4m+fprm3GdBnbbK9LeVPgfP+tc04LK5VX3AVpcFyf8JkHN/wIEfwhxAfZgmlCo8o2I+OsJT4Gmq5Y8P4Aw==", "dependencies": { "@blockfrost/blockfrost-js": "^5.4.0", "@cardano-ogmios/schema": "^6.0.3", - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/address-codec": "^0.3.0", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/tokens": "^1.2.1", @@ -5481,6 +5490,11 @@ "lodash-es": "^4.17.21" } }, + "node_modules/@rosen-bridge/rosen-extractor/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "node_modules/@rosen-bridge/scanner": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/@rosen-bridge/scanner/-/scanner-4.1.2.tgz", @@ -17099,10 +17113,10 @@ "version": "9.0.2", "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/minimum-fee": "^2.2.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/minimum-fee": "^2.2.2", + "@rosen-bridge/rosen-extractor": "^6.2.1", "@rosen-bridge/tokens": "^1.2.1", "blakejs": "^1.2.1" }, @@ -17122,6 +17136,11 @@ "typescript": "^4.9.5" } }, + "packages/abstract-chain/node_modules/@rosen-bridge/abstract-logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rosen-bridge/abstract-logger/-/abstract-logger-2.0.1.tgz", + "integrity": "sha512-GC2TpPxrDRkwJvhBVdaQCrkkUkp1DwwzCGT2akUv6HKfHijrNMv9BVus9ia7mv//Cy4zJCq0yw9N1n48lD2aOg==" + }, "packages/chains/binance": { "name": "@rosen-chains/binance", "version": "0.1.0", @@ -17437,9 +17456,9 @@ "license": "GPL-3.0", "dependencies": { "@rosen-bridge/abstract-logger": "^2.0.1", - "@rosen-bridge/bitcoin-utxo-selection": "^0.2.0", + "@rosen-bridge/bitcoin-utxo-selection": "^0.2.2", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/rosen-extractor": "^6.2.2", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "bitcoinjs-lib": "^6.1.5" @@ -18215,7 +18234,7 @@ "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/rosen-extractor": "^6.2.2", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "bech32": "^2.0.0" @@ -18249,7 +18268,7 @@ "dependencies": { "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/rosen-extractor": "^6.2.2", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "ergo-lib-wasm-nodejs": "^0.24.1" @@ -18585,7 +18604,7 @@ "dependencies": { "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/rosen-extractor": "^6.2.2", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "ethers": "^6.11.1" diff --git a/packages/abstract-chain/package.json b/packages/abstract-chain/package.json index 27aa4a59..3ce548e7 100644 --- a/packages/abstract-chain/package.json +++ b/packages/abstract-chain/package.json @@ -20,10 +20,10 @@ }, "license": "GPL-3.0", "dependencies": { - "@rosen-bridge/abstract-logger": "^1.0.0", + "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/minimum-fee": "^2.2.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/minimum-fee": "^2.2.2", + "@rosen-bridge/rosen-extractor": "^6.2.1", "@rosen-bridge/tokens": "^1.2.1", "blakejs": "^1.2.1" }, diff --git a/packages/chains/bitcoin/package.json b/packages/chains/bitcoin/package.json index a7c41bdd..4b4afdd1 100644 --- a/packages/chains/bitcoin/package.json +++ b/packages/chains/bitcoin/package.json @@ -34,9 +34,9 @@ }, "dependencies": { "@rosen-bridge/abstract-logger": "^2.0.1", - "@rosen-bridge/bitcoin-utxo-selection": "^0.2.0", + "@rosen-bridge/bitcoin-utxo-selection": "^0.2.2", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/rosen-extractor": "^6.2.2", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "bitcoinjs-lib": "^6.1.5" diff --git a/packages/chains/cardano/package.json b/packages/chains/cardano/package.json index 2347da97..a500e968 100644 --- a/packages/chains/cardano/package.json +++ b/packages/chains/cardano/package.json @@ -22,7 +22,7 @@ "dependencies": { "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", "@rosen-bridge/abstract-logger": "^2.0.1", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/rosen-extractor": "^6.2.2", "@rosen-bridge/json-bigint": "^0.1.0", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", diff --git a/packages/chains/ergo/package.json b/packages/chains/ergo/package.json index 07cb6270..38240377 100644 --- a/packages/chains/ergo/package.json +++ b/packages/chains/ergo/package.json @@ -22,7 +22,7 @@ "dependencies": { "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/rosen-extractor": "^6.2.2", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "ergo-lib-wasm-nodejs": "^0.24.1" diff --git a/packages/chains/evm/package.json b/packages/chains/evm/package.json index a43cec6d..7b4e807b 100644 --- a/packages/chains/evm/package.json +++ b/packages/chains/evm/package.json @@ -35,7 +35,7 @@ "dependencies": { "@rosen-bridge/abstract-logger": "^2.0.1", "@rosen-bridge/json-bigint": "^0.1.0", - "@rosen-bridge/rosen-extractor": "^6.2.0", + "@rosen-bridge/rosen-extractor": "^6.2.2", "@rosen-bridge/tokens": "^1.2.1", "@rosen-chains/abstract-chain": "^9.0.2", "ethers": "^6.11.1"