From 48c5303e263cba911076a4a4139aec58ca874a1a Mon Sep 17 00:00:00 2001 From: andrepatta Date: Sun, 5 Nov 2023 20:57:45 -0300 Subject: [PATCH 01/10] fix some eth-accounts etnip1 test cases --- .../test/unit/tx/base.test.ts | 46 +++++++------------ .../test/unit/tx/typedTxsAndEIP2930.test.ts | 6 +-- 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/packages/web3-eth-accounts/test/unit/tx/base.test.ts b/packages/web3-eth-accounts/test/unit/tx/base.test.ts index fdfb7178317..7ef016c47b7 100644 --- a/packages/web3-eth-accounts/test/unit/tx/base.test.ts +++ b/packages/web3-eth-accounts/test/unit/tx/base.test.ts @@ -248,17 +248,19 @@ describe('[BaseTransaction]', () => { for (const txType of txTypes) { for (const [i, tx] of txType.txs.entries()) { const { privateKey } = txType.fixtures[i]; - if(tx.type == 64) { + if(tx.type === 64) { if (privateKey !== undefined) { // eslint-disable-next-line jest/no-conditional-expect expect((tx as PriorityETNIP1Transaction).sign(hexToBytes(privateKey), hexToBytes(privateKey))).toBeTruthy(); } + // eslint-disable-next-line jest/no-conditional-expect expect(() => (tx as PriorityETNIP1Transaction).sign(new Uint8Array(bytesToUint8Array('invalid')))).toThrow(); } else { if (privateKey !== undefined) { // eslint-disable-next-line jest/no-conditional-expect expect(tx.sign(hexToBytes(privateKey))).toBeTruthy(); } + // eslint-disable-next-line jest/no-conditional-expect expect(() => tx.sign(new Uint8Array(bytesToUint8Array('invalid')))).toThrow(); } } @@ -294,13 +296,8 @@ describe('[BaseTransaction]', () => { if (privateKey === undefined) { continue; } - if(tx.type == 64) { - const signedTx = (tx as PriorityETNIP1Transaction).sign(hexToBytes(privateKey), hexToBytes(privateKey)); - expect(signedTx.getSenderAddress().toString()).toBe(`0x${sendersAddress}`); - } else { - const signedTx = tx.sign(hexToBytes(privateKey)); - expect(signedTx.getSenderAddress().toString()).toBe(`0x${sendersAddress}`); - } + const signedTx = tx.type === 64? (tx as PriorityETNIP1Transaction).sign(hexToBytes(privateKey), hexToBytes(privateKey)) : tx.sign(hexToBytes(privateKey)); + expect(signedTx.getSenderAddress().toString()).toBe(`0x${sendersAddress}`); } } @@ -313,17 +310,20 @@ describe('[BaseTransaction]', () => { if (privateKey === undefined) { continue; } - if(tx.type == 64) { + if(tx.type === 64) { const signedTx = (tx as PriorityETNIP1Transaction).sign(hexToBytes(privateKey), hexToBytes(privateKey)); - const [txPubKey, txPrioKey] = (signedTx as PriorityETNIP1Transaction).getSenderAndPriorityPublicKey(); + const [txPubKey, txPrioKey] = signedTx.getSenderAndPriorityPublicKey(); const pubKeyFromPriv = privateToPublic(hexToBytes(privateKey)); const prioKeyFromPriv = privateToPublic(hexToBytes(privateKey)) + // eslint-disable-next-line jest/no-conditional-expect expect(uint8ArrayEquals(txPubKey, pubKeyFromPriv)).toBe(true); + // eslint-disable-next-line jest/no-conditional-expect expect(uint8ArrayEquals(txPrioKey, prioKeyFromPriv)).toBe(true); } else { const signedTx = tx.sign(hexToBytes(privateKey)); const txPubKey = signedTx.getSenderPublicKey(); const pubKeyFromPriv = privateToPublic(hexToBytes(privateKey)); + // eslint-disable-next-line jest/no-conditional-expect expect(uint8ArrayEquals(txPubKey, pubKeyFromPriv)).toBe(true); } @@ -340,21 +340,12 @@ describe('[BaseTransaction]', () => { if (privateKey === undefined) { continue; } - if(tx.type == 64) { - let signedTx = (tx as PriorityETNIP1Transaction).sign(hexToBytes(privateKey), hexToBytes(privateKey)); - signedTx = JSON.parse(JSON.stringify(signedTx)); // deep clone - (signedTx as any).s = SECP256K1_ORDER + BigInt(1); - expect(() => { + let signedTx = tx.type === 64 ? (tx as PriorityETNIP1Transaction).sign(hexToBytes(privateKey), hexToBytes(privateKey)) : tx.sign(hexToBytes(privateKey)); + signedTx = JSON.parse(JSON.stringify(signedTx)); // deep clone + (signedTx as any).s = SECP256K1_ORDER + BigInt(1); + expect(() => { signedTx.getSenderPublicKey(); }).toThrow(); - } else { - let signedTx = tx.sign(hexToBytes(privateKey)); - signedTx = JSON.parse(JSON.stringify(signedTx)); // deep clone - (signedTx as any).s = SECP256K1_ORDER + BigInt(1); - expect(() => { - signedTx.getSenderPublicKey(); - }).toThrow(); - } } } }); @@ -366,13 +357,8 @@ describe('[BaseTransaction]', () => { if (privateKey === undefined) { continue; } - if(tx.type == 64) { - const signedTx = (tx as PriorityETNIP1Transaction).sign(hexToBytes(privateKey), hexToBytes(privateKey)); - expect(signedTx.verifySignature()).toBeTruthy(); - } else { - const signedTx = tx.sign(hexToBytes(privateKey)); - expect(signedTx.verifySignature()).toBeTruthy(); - } + const signedTx = tx.type === 64 ? (tx as PriorityETNIP1Transaction).sign(hexToBytes(privateKey), hexToBytes(privateKey)) : tx.sign(hexToBytes(privateKey)); + expect(signedTx.verifySignature()).toBeTruthy(); } } }); diff --git a/packages/web3-eth-accounts/test/unit/tx/typedTxsAndEIP2930.test.ts b/packages/web3-eth-accounts/test/unit/tx/typedTxsAndEIP2930.test.ts index 7b1a26ed045..7e4970cbe5f 100644 --- a/packages/web3-eth-accounts/test/unit/tx/typedTxsAndEIP2930.test.ts +++ b/packages/web3-eth-accounts/test/unit/tx/typedTxsAndEIP2930.test.ts @@ -278,14 +278,14 @@ describe('[AccessListEIP2930Transaction / FeeMarketEIP1559Transaction] -> EIP-29 }, { common }, ); - let signed = tx.type == 64 ? (tx as PriorityETNIP1Transaction).sign(pKey, pKey) : tx.sign(pKey); + let signed = tx.type === 64 ? (tx as PriorityETNIP1Transaction).sign(pKey, pKey) : tx.sign(pKey); const signedAddress = signed.getSenderAddress(); expect(uint8ArrayEquals(signedAddress.buf, address)).toBeTruthy(); // expect(signedAddress).toEqual(Address.publicToAddress(Buffer.from(address))); signed.verifySignature(); // If this throws, test will not end. tx = txType.class.fromTxData({}, { common }); - signed = tx.type == 64 ? (tx as PriorityETNIP1Transaction).sign(pKey, pKey) : tx.sign(pKey); + signed = tx.type === 64 ? (tx as PriorityETNIP1Transaction).sign(pKey, pKey) : tx.sign(pKey); expect(tx.accessList).toEqual([]); expect(signed.accessList).toEqual([]); @@ -303,7 +303,7 @@ describe('[AccessListEIP2930Transaction / FeeMarketEIP1559Transaction] -> EIP-29 expect(() => { const high = SECP256K1_ORDER_DIV_2 + BigInt(1); const _tx = txType.class.fromTxData({ s: high, r: 1, v: 1 }, { common }); - const _signed = _tx.type == 64 ? (_tx as PriorityETNIP1Transaction).sign(pKey, pKey) : _tx.sign(pKey); + const _signed = _tx.type === 64 ? (_tx as PriorityETNIP1Transaction).sign(pKey, pKey) : _tx.sign(pKey); _signed.getSenderPublicKey(); }).toThrow(); } From b5df413c1460bbbab98402967ed9de3ca18c1ccb Mon Sep 17 00:00:00 2001 From: andrepatta Date: Sun, 5 Nov 2023 20:57:57 -0300 Subject: [PATCH 02/10] update package.json --- package.json | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c136d147f66..77942e45311 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "web3.js", + "name": "@etn-sc/web3.js", "private": true, - "description": "Ethereum API wrappers and utilities", - "author": "ChainSafe Systems", + "description": "Electroneum SmartChain API wrappers and utilities", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "keywords": [ "ethereum", @@ -10,15 +10,17 @@ "web3", "web3js", "web3.js", - "blockchain" + "blockchain", + "electroneum", + "etn" ], - "homepage": "https://github.com/ChainSafe/web3.js#readme", + "homepage": "https://github.com/electroneum/electroneum-web3.js#readme", "repository": { "type": "git", - "url": "git+https://github.com/ChainSafe/web3.js.git" + "url": "git+https://github.com/electroneum/electroneum-web3.js.git" }, "bugs": { - "url": "https://github.com/ChainSafe/web3.js/issues" + "url": "https://github.com/electroneum/electroneum-web3.js/issues" }, "engines": { "node": ">=14", From 6fdb1670a127f74a7c5e7d0c0c635e5ddfac2c91 Mon Sep 17 00:00:00 2001 From: andrepatta Date: Sun, 5 Nov 2023 21:00:04 -0300 Subject: [PATCH 03/10] update eth-accounts package.json --- packages/web3-eth-accounts/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/web3-eth-accounts/package.json b/packages/web3-eth-accounts/package.json index ae62345610d..22b8fa36436 100644 --- a/packages/web3-eth-accounts/package.json +++ b/packages/web3-eth-accounts/package.json @@ -1,7 +1,7 @@ { - "name": "web3-eth-accounts", + "name": "@etn-sc/web3-eth-accounts", "version": "4.1.0", - "description": "Package for managing Ethereum accounts and signing", + "description": "Package for managing Electroneum accounts and signing", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", From d3b58a99d4661b9d98442e3f800338186987c310 Mon Sep 17 00:00:00 2001 From: andrepatta Date: Sun, 5 Nov 2023 21:12:47 -0300 Subject: [PATCH 04/10] update eth-accounts readme --- packages/web3-eth-accounts/README.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/web3-eth-accounts/README.md b/packages/web3-eth-accounts/README.md index 3ca18c2a460..1acbc16b04d 100644 --- a/packages/web3-eth-accounts/README.md +++ b/packages/web3-eth-accounts/README.md @@ -9,29 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [electroneum-web3.js][repo]. `web3-eth-accounts` contains functionality for managing Ethereum accounts and signing. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-eth-accounts) or using [Yarn](https://yarnpkg.com/package/web3-eth-accounts) +You can install the package either using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth-accounts) ### Using NPM ```bash -npm install web3-eth-accounts -``` - -### Using Yarn - -```bash -yarn add web3-eth-accounts +npm install @etn-sc/web3-eth-accounts ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) ## Prerequisites @@ -53,7 +47,7 @@ yarn add web3-eth-accounts | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-eth-accounts +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-accounts [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-accounts%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-eth-accounts +[npm-url]: https://npmjs.org/package/@etn-sc/web3-eth-accounts [downloads-image]: https://img.shields.io/npm/dm/web3-eth-accounts?label=npm%20downloads From f82cf1b48c087e062028681535bf3526638d8e99 Mon Sep 17 00:00:00 2001 From: andrepatta Date: Sun, 5 Nov 2023 21:17:00 -0300 Subject: [PATCH 05/10] update eth-accounts package.json --- packages/web3-eth-accounts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web3-eth-accounts/package.json b/packages/web3-eth-accounts/package.json index 22b8fa36436..34b598cd5f3 100644 --- a/packages/web3-eth-accounts/package.json +++ b/packages/web3-eth-accounts/package.json @@ -1,6 +1,6 @@ { "name": "@etn-sc/web3-eth-accounts", - "version": "4.1.0", + "version": "4.1.1", "description": "Package for managing Electroneum accounts and signing", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", From 1ace2b69883b8e5a890c513888866bb6629ca2b6 Mon Sep 17 00:00:00 2001 From: andrepatta Date: Sun, 5 Nov 2023 22:23:35 -0300 Subject: [PATCH 06/10] update all packages readme & package.json --- packages/web3-core/README.md | 21 +++----- packages/web3-core/package.json | 22 ++++----- packages/web3-errors/README.md | 21 +++----- packages/web3-errors/package.json | 8 ++-- packages/web3-eth-abi/README.md | 21 +++----- packages/web3-eth-abi/package.json | 14 +++--- packages/web3-eth-accounts/README.md | 9 ++-- packages/web3-eth-accounts/package.json | 12 ++--- packages/web3-eth-contract/README.md | 25 ++++------ packages/web3-eth-contract/package.json | 24 +++++----- packages/web3-eth-ens/README.md | 21 +++----- packages/web3-eth-ens/package.json | 24 +++++----- packages/web3-eth-iban/README.md | 21 +++----- packages/web3-eth-iban/package.json | 16 +++---- packages/web3-eth-personal/README.md | 21 +++----- packages/web3-eth-personal/package.json | 22 ++++----- packages/web3-eth/README.md | 21 +++----- packages/web3-eth/package.json | 30 ++++++------ packages/web3-net/README.md | 21 +++----- packages/web3-net/package.json | 16 +++---- packages/web3-providers-http/README.md | 21 +++----- packages/web3-providers-http/package.json | 12 ++--- packages/web3-providers-ipc/README.md | 21 +++----- packages/web3-providers-ipc/package.json | 12 ++--- packages/web3-providers-ws/README.md | 21 +++----- packages/web3-providers-ws/package.json | 12 ++--- packages/web3-rpc-methods/README.md | 22 +++------ packages/web3-rpc-methods/package.json | 14 +++--- packages/web3-types/README.md | 21 +++----- packages/web3-types/package.json | 6 +-- packages/web3-utils/README.md | 23 ++++----- packages/web3-utils/package.json | 12 ++--- packages/web3-validator/README.md | 24 ++++------ packages/web3-validator/package.json | 10 ++-- packages/web3/README.md | 58 ++++++++++------------- packages/web3/package.json | 43 +++++++++-------- tools/web3-packagetemplate/README.md | 21 +++----- tools/web3-packagetemplate/package.json | 6 +-- tools/web3-plugin-example/README.md | 19 +++----- tools/web3-plugin-example/package.json | 29 ++++++------ 40 files changed, 331 insertions(+), 466 deletions(-) diff --git a/packages/web3-core/README.md b/packages/web3-core/README.md index a5a2110742c..90fc606e117 100644 --- a/packages/web3-core/README.md +++ b/packages/web3-core/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-core` package contains core functions for [web3.js][repo] packages. +`@etn-sc/web3-core` package contains core functions for [@etn-sc/web3.js][repo] packages. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-core) or using [Yarn](https://yarnpkg.com/package/web3-core) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-core) ### Using NPM ```bash -npm install web3-core -``` - -### Using Yarn - -```bash -yarn add web3-core +npm install @etn-sc/web3-core ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-core | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-core +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-core [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-core%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-core +[npm-url]: https://npmjs.org/package/@etn-sc/web3-core [downloads-image]: https://img.shields.io/npm/dm/web3-core?label=npm%20downloads diff --git a/packages/web3-core/package.json b/packages/web3-core/package.json index 8db0707032b..95d9bb96948 100644 --- a/packages/web3-core/package.json +++ b/packages/web3-core/package.json @@ -1,5 +1,5 @@ { - "name": "web3-core", + "name": "@etn-sc/web3-core", "version": "4.3.1", "description": "Web3 core tools for sub-packages. This is an internal package.", "main": "./lib/commonjs/index.js", @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -42,16 +42,16 @@ "test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests" }, "dependencies": { - "web3-errors": "^1.1.4", - "web3-eth-iban": "^4.0.7", - "web3-providers-http": "^4.1.0", - "web3-providers-ws": "^4.0.7", - "web3-types": "^1.3.1", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-errors": "^1.1.4", + "@etn-sc/web3-eth-iban": "^4.0.7", + "@etn-sc/web3-providers-http": "^4.1.0", + "@etn-sc/web3-providers-ws": "^4.0.7", + "@etn-sc/web3-types": "^1.3.1", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" }, "optionalDependencies": { - "web3-providers-ipc": "^4.0.7" + "@etn-sc/web3-providers-ipc": "^4.0.7" }, "devDependencies": { "@types/jest": "^28.1.6", diff --git a/packages/web3-errors/README.md b/packages/web3-errors/README.md index 9a68b9a7b8d..5037ad732ef 100644 --- a/packages/web3-errors/README.md +++ b/packages/web3-errors/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-errors` This package has web3 error classes. +`@etn-sc/web3-errors` This package has web3 error classes. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-errors) or using [Yarn](https://yarnpkg.com/package/web3-errors) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-errors) ### Using NPM ```bash -npm install web3-errors -``` - -### Using Yarn - -```bash -yarn add web3-errors +npm install @etn-sc/web3-errors ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-errors | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-errors +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-errors [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-errors%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-errors +[npm-url]: https://npmjs.org/package/@etn-sc/web3-errors [downloads-image]: https://img.shields.io/npm/dm/web3-errors?label=npm%20downloads diff --git a/packages/web3-errors/package.json b/packages/web3-errors/package.json index fd43a758229..e37dce2ef69 100644 --- a/packages/web3-errors/package.json +++ b/packages/web3-errors/package.json @@ -1,5 +1,5 @@ { - "name": "web3-errors", + "name": "@etn-sc/web3-errors", "version": "1.1.4", "description": "This package has web3 error classes", "main": "./lib/commonjs/index.js", @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -41,7 +41,7 @@ "test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests" }, "dependencies": { - "web3-types": "^1.3.1" + "@etn-sc/web3-types": "^1.3.1" }, "devDependencies": { "@types/jest": "^28.1.6", diff --git a/packages/web3-eth-abi/README.md b/packages/web3-eth-abi/README.md index bbeb96bf2c4..03f0fab68ed 100644 --- a/packages/web3-eth-abi/README.md +++ b/packages/web3-eth-abi/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-eth-abi` contains functions for the encode and decode EVM in/output. +`@etn-sc/web3-eth-abi` contains functions for the encode and decode EVM in/output. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-eth-abi) or using [Yarn](https://yarnpkg.com/package/web3-eth-abi) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth-abi) ### Using NPM ```bash -npm install web3-eth-abi -``` - -### Using Yarn - -```bash -yarn add web3-eth-abi +npm install @etn-sc/web3-eth-abi ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-eth-abi | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-eth-abi +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-abi [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-abi%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-eth-abi +[npm-url]: https://npmjs.org/package/@etn-sc/web3-eth-abi [downloads-image]: https://img.shields.io/npm/dm/web3-eth-abi?label=npm%20downloads diff --git a/packages/web3-eth-abi/package.json b/packages/web3-eth-abi/package.json index c685639c1ac..4169d620e82 100644 --- a/packages/web3-eth-abi/package.json +++ b/packages/web3-eth-abi/package.json @@ -1,5 +1,5 @@ { - "name": "web3-eth-abi", + "name": "@etn-sc/web3-eth-abi", "version": "4.1.4", "description": "Web3 module encode and decode EVM in/output.", "main": "./lib/commonjs/index.js", @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ethereum/web3.js/tree/4.x/packages/web3-eth-abi", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-abi", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -43,10 +43,10 @@ }, "dependencies": { "abitype": "0.7.1", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" }, "devDependencies": { "@humeris/espresso-shot": "^4.0.0", diff --git a/packages/web3-eth-accounts/README.md b/packages/web3-eth-accounts/README.md index 1acbc16b04d..fffea4779df 100644 --- a/packages/web3-eth-accounts/README.md +++ b/packages/web3-eth-accounts/README.md @@ -9,13 +9,13 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [electroneum-web3.js][repo]. +This is a sub-package of [@etn-sc/electroneum-web3.js][repo]. -`web3-eth-accounts` contains functionality for managing Ethereum accounts and signing. +`@etn-sc/web3-eth-accounts` contains functionality for managing Electroneum Smart Chain accounts and signing. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth-accounts) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth-accounts) ### Using NPM @@ -25,8 +25,7 @@ npm install @etn-sc/web3-eth-accounts ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites diff --git a/packages/web3-eth-accounts/package.json b/packages/web3-eth-accounts/package.json index 34b598cd5f3..a604efce37c 100644 --- a/packages/web3-eth-accounts/package.json +++ b/packages/web3-eth-accounts/package.json @@ -1,6 +1,6 @@ { "name": "@etn-sc/web3-eth-accounts", - "version": "4.1.1", + "version": "4.1.2", "description": "Package for managing Electroneum accounts and signing", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -55,15 +55,15 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-providers-ipc": "^4.0.7" + "@etn-sc/web3-providers-ipc": "^4.0.7" }, "dependencies": { "@ethereumjs/rlp": "^4.0.1", "crc-32": "^1.2.2", "ethereum-cryptography": "^2.0.0", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" } } diff --git a/packages/web3-eth-contract/README.md b/packages/web3-eth-contract/README.md index 9de73d9556e..cb4008d3f55 100644 --- a/packages/web3-eth-contract/README.md +++ b/packages/web3-eth-contract/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-eth-contract` contains the contract package used in `web3-eth`. +`@etn-sc/web3-eth-contract` contains the contract package used in `@etn-sc/web3-eth`. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-eth-contract) or using [Yarn](https://yarnpkg.com/package/web3-eth-contract) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth-contract) ### Using NPM ```bash -npm install web3-eth-contract -``` - -### Using Yarn - -```bash -yarn add web3-eth-contract +npm install @etn-sc/web3-eth-contract ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -44,7 +37,7 @@ yarn add web3-eth-contract You can initialize the typesafe Contract API instance with the following. ```ts -import { Contract } from 'web3-eth-contract'; +import { Contract } from '@etn-sc/web3-eth-contract'; const abi = [...] as const; @@ -60,7 +53,7 @@ const contract = new Contract(abi); We have tested the Typescript interface support for the ABIs compiled with solidity version `v0.4.x` and above. If you face any issue regarding the contract typing, please create an issue to report to us. -The Typescript support for fixed length array types are supported up 30 elements. See more details [here](https://github.com/ChainSafe/web3.js/blob/nh%2F4562-contract-typing/packages/web3-eth-abi/src/number_map_type.ts#L1). This limitation is only to provide more performant developer experience in IDEs. In future we may come up with a workaround to avoid this limitation. If you have any idea feel free to share. +The Typescript support for fixed length array types are supported up 30 elements. See more details [here](https://github.com/electroneum/electroneum-web3.js/blob/nh%2F4562-contract-typing/packages/web3-eth-abi/src/number_map_type.ts#L1). This limitation is only to provide more performant developer experience in IDEs. In future we may come up with a workaround to avoid this limitation. If you have any idea feel free to share. ## Package.json Scripts @@ -76,7 +69,7 @@ The Typescript support for fixed length array types are supported up 30 elements | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-eth-contract +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-contract [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-contract%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-eth-contract +[npm-url]: https://npmjs.org/package/@etn-sc/web3-eth-contract [downloads-image]: https://img.shields.io/npm/dm/web3-eth-contract?label=npm%20downloads diff --git a/packages/web3-eth-contract/package.json b/packages/web3-eth-contract/package.json index b905e8500ce..610777b0974 100644 --- a/packages/web3-eth-contract/package.json +++ b/packages/web3-eth-contract/package.json @@ -1,7 +1,7 @@ { - "name": "web3-eth-contract", + "name": "@etn-sc/web3-eth-contract", "version": "4.1.3", - "description": "Web3 module to interact with Ethereum smart contracts.", + "description": "Web3 module to interact with Electroneum smart contracts.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ethereum/web3.js/tree/4.x/packages/web3-eth-contract", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-contract", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -45,13 +45,13 @@ "test:e2e:firefox": "npx cypress run --headless --browser firefox --env grep='ignore',invert=true" }, "dependencies": { - "web3-core": "^4.3.1", - "web3-errors": "^1.1.4", - "web3-eth": "^4.3.1", - "web3-eth-abi": "^4.1.4", - "web3-types": "^1.3.1", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-core": "^4.3.1", + "@etn-sc/web3-errors": "^1.1.4", + "@etn-sc/web3-eth": "^4.3.1", + "@etn-sc/web3-eth-abi": "^4.1.4", + "@etn-sc/web3-types": "^1.3.1", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" }, "devDependencies": { "@humeris/espresso-shot": "^4.0.0", @@ -67,6 +67,6 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-eth-accounts": "^4.1.0" + "@etn-sc/web3-eth-accounts": "^4.1.2" } } diff --git a/packages/web3-eth-ens/README.md b/packages/web3-eth-ens/README.md index ea4f306a767..918dcab00d3 100644 --- a/packages/web3-eth-ens/README.md +++ b/packages/web3-eth-ens/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-eth-ens` This package has ENS functions for interacting with Ethereum Name Service. +`@etn-sc/web3-eth-ens` This package has ENS functions for interacting with Electroneum Name Service. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-eth-ens) or using [Yarn](https://yarnpkg.com/package/web3-eth-ens) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth-ens) ### Using NPM ```bash -npm install web3-eth-ens -``` - -### Using Yarn - -```bash -yarn add web3-eth-ens +npm install @etn-sc/web3-eth-ens ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-eth-ens | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-eth-ens +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-ens [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-ens%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-eth-ens +[npm-url]: https://npmjs.org/package/@etn-sc/web3-eth-ens [downloads-image]: https://img.shields.io/npm/dm/web3-eth-ens?label=npm%20downloads diff --git a/packages/web3-eth-ens/package.json b/packages/web3-eth-ens/package.json index 6d38e795878..f28ecdea9a7 100644 --- a/packages/web3-eth-ens/package.json +++ b/packages/web3-eth-ens/package.json @@ -1,7 +1,7 @@ { - "name": "web3-eth-ens", + "name": "@etn-sc/web3-eth-ens", "version": "4.0.8", - "description": "This package has ENS functions for interacting with Ethereum Name Service.", + "description": "This package has ENS functions for interacting with Electroneum Name Service.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -59,13 +59,13 @@ }, "dependencies": { "@adraffy/ens-normalize": "^1.8.8", - "web3-core": "^4.3.0", - "web3-errors": "^1.1.3", - "web3-eth": "^4.3.1", - "web3-eth-contract": "^4.1.2", - "web3-net": "^4.0.7", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-core": "^4.3.0", + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-eth": "^4.3.1", + "@etn-sc/web3-eth-contract": "^4.1.2", + "@etn-sc/web3-net": "^4.0.7", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" } } diff --git a/packages/web3-eth-iban/README.md b/packages/web3-eth-iban/README.md index 11c7e52305b..a9ad2584ce6 100644 --- a/packages/web3-eth-iban/README.md +++ b/packages/web3-eth-iban/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-eth-iban` This package converts Ethereum addresses to IBAN addresses a vice versa. +`@etn-sc/web3-eth-iban` This package converts Electroneum addresses to IBAN addresses a vice versa. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-eth-iban) or using [Yarn](https://yarnpkg.com/package/web3-eth-iban) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth-iban) ### Using NPM ```bash -npm install web3-eth-iban -``` - -### Using Yarn - -```bash -yarn add web3-eth-iban +npm install @etn-sc/web3-eth-iban ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-eth-iban | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-eth-iban +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-iban [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-iban%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-eth-iban +[npm-url]: https://npmjs.org/package/@etn-sc/web3-eth-iban [downloads-image]: https://img.shields.io/npm/dm/web3-eth-iban?label=npm%20downloads diff --git a/packages/web3-eth-iban/package.json b/packages/web3-eth-iban/package.json index c04c1b0476c..c058f9007e2 100644 --- a/packages/web3-eth-iban/package.json +++ b/packages/web3-eth-iban/package.json @@ -1,7 +1,7 @@ { - "name": "web3-eth-iban", + "name": "@etn-sc/web3-eth-iban", "version": "4.0.7", - "description": "This package converts Ethereum addresses to IBAN addresses and vice versa.", + "description": "This package converts Electroneum addresses to IBAN addresses and vice versa.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -56,9 +56,9 @@ "typescript": "^4.7.4" }, "dependencies": { - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" } } diff --git a/packages/web3-eth-personal/README.md b/packages/web3-eth-personal/README.md index 857d97d88f2..729e4534ec3 100644 --- a/packages/web3-eth-personal/README.md +++ b/packages/web3-eth-personal/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-eth-personal` Web3 module to interact with the Ethereum blockchain accounts stored in the node. +`@etn-sc/web3-eth-personal` Web3 module to interact with the Electroneum blockchain accounts stored in the node. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-eth-personal) or using [Yarn](https://yarnpkg.com/package/web3-eth-personal) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth-personal) ### Using NPM ```bash -npm install web3-eth-personal -``` - -### Using Yarn - -```bash -yarn add web3-eth-personal +npm install @etn-sc/web3-eth-personal ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-eth-personal | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-eth-personal +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-personal [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-personal%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-eth-personal +[npm-url]: https://npmjs.org/package/@etn-sc/web3-eth-personal [downloads-image]: https://img.shields.io/npm/dm/web3-eth-personal?label=npm%20downloads diff --git a/packages/web3-eth-personal/package.json b/packages/web3-eth-personal/package.json index ad0c3088cb1..04b657beaff 100644 --- a/packages/web3-eth-personal/package.json +++ b/packages/web3-eth-personal/package.json @@ -1,7 +1,7 @@ { - "name": "web3-eth-personal", + "name": "@etn-sc/web3-eth-personal", "version": "4.0.8", - "description": "Web3 module to interact with the Ethereum blockchain accounts stored in the node.", + "description": "Web3 module to interact with the Electroneum blockchain accounts stored in the node.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -42,12 +42,12 @@ "test:integration": "jest --config=./test/integration/jest.config.js" }, "dependencies": { - "web3-core": "^4.3.0", - "web3-eth": "^4.3.1", - "web3-rpc-methods": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-core": "^4.3.0", + "@etn-sc/web3-eth": "^4.3.1", + "@etn-sc/web3-rpc-methods": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" }, "devDependencies": { "@types/jest": "^28.1.6", @@ -62,6 +62,6 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-providers-ws": "^4.0.7" + "@etn-sc/web3-providers-ws": "^4.0.7" } } diff --git a/packages/web3-eth/README.md b/packages/web3-eth/README.md index a7d675b599c..cfa28336477 100644 --- a/packages/web3-eth/README.md +++ b/packages/web3-eth/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-eth` contains modules to interact with the Ethereum blockchain and smart contracts. +`@etn-sc/web3-eth` contains modules to interact with the Electroneum blockchain and smart contracts. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-eth) or using [Yarn](https://yarnpkg.com/package/web3-eth) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-eth) ### Using NPM ```bash -npm install web3-eth -``` - -### Using Yarn - -```bash -yarn add web3-eth +npm install @etn-sc/web3-eth ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-eth | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-eth +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-eth +[npm-url]: https://npmjs.org/package/@etn-sc/web3-eth [downloads-image]: https://img.shields.io/npm/dm/web3-eth?label=npm%20downloads diff --git a/packages/web3-eth/package.json b/packages/web3-eth/package.json index 4cfb96130fb..64483b2d0fd 100644 --- a/packages/web3-eth/package.json +++ b/packages/web3-eth/package.json @@ -1,7 +1,7 @@ { - "name": "web3-eth", + "name": "@etn-sc/web3-eth", "version": "4.3.1", - "description": "Web3 module to interact with the Ethereum blockchain and smart contracts.", + "description": "Web3 module to interact with the Electroneum blockchain and smart contracts.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -59,19 +59,19 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-providers-http": "^4.1.0" + "@etn-sc/web3-providers-http": "^4.1.0" }, "dependencies": { "setimmediate": "^1.0.5", - "web3-core": "^4.3.0", - "web3-errors": "^1.1.3", - "web3-eth-abi": "^4.1.4", - "web3-eth-accounts": "^4.1.0", - "web3-net": "^4.0.7", - "web3-providers-ws": "^4.0.7", - "web3-rpc-methods": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-core": "^4.3.0", + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-eth-abi": "^4.1.4", + "@etn-sc/web3-eth-accounts": "^4.1.0", + "@etn-sc/web3-net": "^4.0.7", + "@etn-sc/web3-providers-ws": "^4.0.7", + "@etn-sc/web3-rpc-methods": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" } } diff --git a/packages/web3-net/README.md b/packages/web3-net/README.md index 6e19cf6a079..5c2a58d56a8 100644 --- a/packages/web3-net/README.md +++ b/packages/web3-net/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-net` package allows to interact with an Ethereum node’s network properties. +`@etn-sc/web3-net` package allows to interact with an Electroneum node’s network properties. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-net) or using [Yarn](https://yarnpkg.com/package/web3-net) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-net) ### Using NPM ```bash -npm install web3-net -``` - -### Using Yarn - -```bash -yarn add web3-net +npm install @etn-sc/web3-net ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-net | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-net +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-net [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-net%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-net +[npm-url]: https://npmjs.org/package/@etn-sc/web3-net [downloads-image]: https://img.shields.io/npm/dm/web3-net?label=npm%20downloads diff --git a/packages/web3-net/package.json b/packages/web3-net/package.json index f6ddefca6ee..a4f9428e6d2 100644 --- a/packages/web3-net/package.json +++ b/packages/web3-net/package.json @@ -1,7 +1,7 @@ { - "name": "web3-net", + "name": "@etn-sc/web3-net", "version": "4.0.7", - "description": "Web3 module to interact with the Ethereum nodes networking properties.", + "description": "Web3 module to interact with the Electroneum nodes networking properties.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -56,9 +56,9 @@ "typescript": "^4.7.4" }, "dependencies": { - "web3-core": "^4.3.0", - "web3-rpc-methods": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" + "@etn-sc/web3-core": "^4.3.0", + "@etn-sc/web3-rpc-methods": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7" } } diff --git a/packages/web3-providers-http/README.md b/packages/web3-providers-http/README.md index 12c52dd4c1e..2493265e16e 100644 --- a/packages/web3-providers-http/README.md +++ b/packages/web3-providers-http/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-providers-http` contains the Web3.js provider for the HTTP protocol. +`@etn-sc/web3-providers-http` contains the Web3.js provider for the HTTP protocol. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-providers-http) or using [Yarn](https://yarnpkg.com/package/web3-providers-http) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-providers-http) ### Using NPM ```bash -npm install web3-providers-http -``` - -### Using Yarn - -```bash -yarn add web3-providers-http +npm install @etn-sc/web3-providers-http ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new/choose) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new/choose) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-providers-http | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-providers-http +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-providers-http [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-http%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-providers-http +[npm-url]: https://npmjs.org/package/@etn-sc/web3-providers-http [downloads-image]: https://img.shields.io/npm/dm/web3-providers-http?label=npm%20downloads diff --git a/packages/web3-providers-http/package.json b/packages/web3-providers-http/package.json index 6a01d2e835d..96a4e27000c 100644 --- a/packages/web3-providers-http/package.json +++ b/packages/web3-providers-http/package.json @@ -1,5 +1,5 @@ { - "name": "web3-providers-http", + "name": "@etn-sc/web3-providers-http", "version": "4.1.0", "description": "HTTP provider for Web3 4.x.x", "main": "./lib/commonjs/index.js", @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -61,8 +61,8 @@ }, "dependencies": { "cross-fetch": "^4.0.0", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7" } } diff --git a/packages/web3-providers-ipc/README.md b/packages/web3-providers-ipc/README.md index 39913cd9584..8176f08d3d1 100644 --- a/packages/web3-providers-ipc/README.md +++ b/packages/web3-providers-ipc/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-providers-ipc` contains the Web3.js provider for Inter Process Communication (IPC). +`@etn-sc/web3-providers-ipc` contains the Web3.js provider for Inter Process Communication (IPC). ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-providers-ipc) or using [Yarn](https://yarnpkg.com/package/web3-providers-ipc) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-providers-ipc) ### Using NPM ```bash -npm install web3-providers-ipc -``` - -### Using Yarn - -```bash -yarn add web3-providers-ipc +npm install @etn-sc/web3-providers-ipc ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-providers-ipc | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-probiders-ipc +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-probiders-ipc [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-ipc%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-providers-ipc +[npm-url]: https://npmjs.org/package/@etn-sc/web3-providers-ipc [downloads-image]: https://img.shields.io/npm/dm/web3-providers-ipc?label=npm%20downloads diff --git a/packages/web3-providers-ipc/package.json b/packages/web3-providers-ipc/package.json index e0052448ae3..2daf65c04aa 100644 --- a/packages/web3-providers-ipc/package.json +++ b/packages/web3-providers-ipc/package.json @@ -1,5 +1,5 @@ { - "name": "web3-providers-ipc", + "name": "@etn-sc/web3-providers-ipc", "version": "4.0.7", "description": "IPC provider for Web3 4.x.x", "main": "./lib/commonjs/index.js", @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -56,8 +56,8 @@ "typescript": "^4.7.4" }, "dependencies": { - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7" } } diff --git a/packages/web3-providers-ws/README.md b/packages/web3-providers-ws/README.md index 942839b6b23..ec969070557 100644 --- a/packages/web3-providers-ws/README.md +++ b/packages/web3-providers-ws/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-providers-ws` contains the Web3.js provider for the Websocket protocol. +`@etn-sc/web3-providers-ws` contains the Web3.js provider for the Websocket protocol. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-providers-ws) or using [Yarn](https://yarnpkg.com/package/web3-providers-ws) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-providers-ws) ### Using NPM ```bash -npm install web3-providers-ws -``` - -### Using Yarn - -```bash -yarn add web3-providers-ws +npm install @etn-sc/web3-providers-ws ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-providers-ws | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-providers-ws +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-providers-ws [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-ws%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-providers-ws +[npm-url]: https://npmjs.org/package/@etn-sc/web3-providers-ws [downloads-image]: https://img.shields.io/npm/dm/web3-providers-ws?label=npm%20downloads diff --git a/packages/web3-providers-ws/package.json b/packages/web3-providers-ws/package.json index 6aa3bde1ee1..abfa2ba3385 100644 --- a/packages/web3-providers-ws/package.json +++ b/packages/web3-providers-ws/package.json @@ -1,5 +1,5 @@ { - "name": "web3-providers-ws", + "name": "@etn-sc/web3-providers-ws", "version": "4.0.7", "description": "Websocket provider for Web3 4.x.x", "main": "./lib/commonjs/index.js", @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -63,9 +63,9 @@ "dependencies": { "@types/ws": "8.5.3", "isomorphic-ws": "^5.0.0", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7", + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7", "ws": "^8.8.1" } } diff --git a/packages/web3-rpc-methods/README.md b/packages/web3-rpc-methods/README.md index 2b46d105286..1514e973e64 100644 --- a/packages/web3-rpc-methods/README.md +++ b/packages/web3-rpc-methods/README.md @@ -9,31 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-rpc-methods` contains RPC methods for various ETH related protocols. +`@etn-sc/web3-rpc-methods` contains RPC methods for various ETN related protocols. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-rpc-methods) or using [Yarn](https://yarnpkg.com/package/web3-rpc-methods) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-rpc-methods) ### Using NPM ```bash -npm install web3-rpc-methods -``` - -### Using Yarn - -```bash -yarn add web3-rpc-methods +npm install @etn-sc/web3-rpc-methods ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) - +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites - :gear: [NodeJS](https://nodejs.org/) (LTS/Fermium) @@ -53,7 +45,7 @@ yarn add web3-rpc-methods | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-rpc-methods +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-rpc-methods [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-rpc-methods%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-rpc-methods +[npm-url]: https://npmjs.org/package/@etn-sc/web3-rpc-methods [downloads-image]: https://img.shields.io/npm/dm/web3-rpc-methods?label=npm%20downloads diff --git a/packages/web3-rpc-methods/package.json b/packages/web3-rpc-methods/package.json index 25cc30c36ae..e708304cbbd 100644 --- a/packages/web3-rpc-methods/package.json +++ b/packages/web3-rpc-methods/package.json @@ -1,7 +1,7 @@ { - "name": "web3-rpc-methods", + "name": "@etn-sc/web3-rpc-methods", "version": "1.1.3", - "description": "Ethereum RPC methods for Web3 4.x.x", + "description": "Electroneum RPC methods for Web3 4.x.x", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -56,8 +56,8 @@ "typescript": "^4.7.4" }, "dependencies": { - "web3-core": "^4.3.0", - "web3-types": "^1.3.0", - "web3-validator": "^2.0.3" + "@etn-sc/web3-core": "^4.3.0", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-validator": "^2.0.3" } } diff --git a/packages/web3-types/README.md b/packages/web3-types/README.md index 7c15e2dc2e0..7c0990717cf 100644 --- a/packages/web3-types/README.md +++ b/packages/web3-types/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-types` contains the common data structures and interfaces used in [web3.js][repo]. +`@etn-sc/web3-types` contains the common data structures and interfaces used in [web3.js][repo]. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-types) or using [Yarn](https://yarnpkg.com/package/web3-types) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-types) ### Using NPM ```bash -npm install web3-types -``` - -### Using Yarn - -```bash -yarn add web3-types +npm install @etn-sc/web3-types ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-types | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-types +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-types [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-types%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-types +[npm-url]: https://npmjs.org/package/@etn-sc/web3-types [downloads-image]: https://img.shields.io/npm/dm/web3-types?label=npm%20downloads diff --git a/packages/web3-types/package.json b/packages/web3-types/package.json index d42252af9b8..03effbcc5a2 100644 --- a/packages/web3-types/package.json +++ b/packages/web3-types/package.json @@ -1,5 +1,5 @@ { - "name": "web3-types", + "name": "@etn-sc/web3-types", "version": "1.3.1", "description": "Provide the common data structures and interfaces for web3 modules.", "main": "./lib/commonjs/index.js", @@ -11,8 +11,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", diff --git a/packages/web3-utils/README.md b/packages/web3-utils/README.md index 78cce56e322..8fedb62c308 100644 --- a/packages/web3-utils/README.md +++ b/packages/web3-utils/README.md @@ -9,30 +9,24 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-utils` This contains useful utility functions for Dapp developers. +`@etn-sc/web3-utils` This contains useful utility functions for Dapp developers. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-utils) or using [Yarn](https://yarnpkg.com/package/web3-utils) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-utils) ### Using NPM ```bash -npm install web3-utils -``` - -### Using Yarn - -```bash -yarn add web3-utils +npm install @etn-sc/web3-utils ``` ## Usage ```js -const Web3Utils = require('web3-utils'); +const Web3Utils = require('@etn-sc/web3-utils'); console.log(Web3Utils); { sha3: function(){}, @@ -44,8 +38,7 @@ console.log(Web3Utils); ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -66,7 +59,7 @@ console.log(Web3Utils); | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-utils +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-utils [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-utils%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-utils +[npm-url]: https://npmjs.org/package/@etn-sc/web3-utils [downloads-image]: https://img.shields.io/npm/dm/web3-utils?label=npm%20downloads diff --git a/packages/web3-utils/package.json b/packages/web3-utils/package.json index a4d48ca5cf4..a21e04db323 100644 --- a/packages/web3-utils/package.json +++ b/packages/web3-utils/package.json @@ -1,5 +1,5 @@ { - "name": "web3-utils", + "name": "@etn-sc/web3-utils", "sideEffects": false, "version": "4.0.7", "description": "Collection of utility functions used in web3.js.", @@ -12,8 +12,8 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -64,8 +64,8 @@ }, "dependencies": { "ethereum-cryptography": "^2.0.0", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", - "web3-validator": "^2.0.3" + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-validator": "^2.0.3" } } diff --git a/packages/web3-validator/README.md b/packages/web3-validator/README.md index 8096002bd59..fab7e9e3441 100644 --- a/packages/web3-validator/README.md +++ b/packages/web3-validator/README.md @@ -9,37 +9,29 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-validator` contains functions for validating objects. +`@etn-sc/web3-validator` contains functions for validating objects. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-validator) or using [Yarn](https://yarnpkg.com/package/web3-validator) - +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-validator) ### Using NPM ```bash -npm install web3-validator -``` - -### Using Yarn - -```bash -yarn add web3-validator +npm install @etn-sc/web3-validator ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ### Usage You can use the the validator by importing as and using to validate; ```ts -import { validator } from 'web3-validator'; +import { validator } from '@etn-sc/web3-validator'; // To validate and throw validator.validate(['uint8', 'string'], [val1, val2]); @@ -92,7 +84,7 @@ The implementation of the validator is extension of [JSON-Schema-Draft07](https: | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3-validator +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-validator [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-validator%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-validator +[npm-url]: https://npmjs.org/package/@etn-sc/web3-validator [downloads-image]: https://img.shields.io/npm/dm/web3-validator?label=npm%20downloads diff --git a/packages/web3-validator/package.json b/packages/web3-validator/package.json index 483ac6237aa..39ad50fdded 100644 --- a/packages/web3-validator/package.json +++ b/packages/web3-validator/package.json @@ -1,5 +1,5 @@ { - "name": "web3-validator", + "name": "@etn-sc/web3-validator", "version": "2.0.3", "description": "JSON-Schema compatible validator for web3", "main": "./lib/commonjs/index.js", @@ -12,8 +12,8 @@ } }, "browser": "./dist/web3-validator.min.js", - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", @@ -47,8 +47,8 @@ "dependencies": { "ethereum-cryptography": "^2.0.0", "util": "^0.12.5", - "web3-errors": "^1.1.3", - "web3-types": "^1.3.0", + "@etn-sc/web3-errors": "^1.1.3", + "@etn-sc/web3-types": "^1.3.0", "zod": "^3.21.4" }, "devDependencies": { diff --git a/packages/web3/README.md b/packages/web3/README.md index bec916e563d..a7c41753d3e 100644 --- a/packages/web3/README.md +++ b/packages/web3/README.md @@ -9,30 +9,22 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is the main package of [web3.js](repo). +This is the main package of [@etn-sc/web3.js](repo). -`web3` contains the ideal setup for a Web3.js package. +`@etn-sc/web3` contains the ideal setup for a Web3.js package. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3) or using [Yarn](https://yarnpkg.com/package/web3) - +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3) ### Using NPM ```bash -npm install web3 -``` - -### Using Yarn - -```bash -yarn add web3 +npm install @etn-sc/web3 ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -63,27 +55,27 @@ We encourage users to use only required individual packages listed in following | Package | Version | License | Docs | Description | | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| [web3](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3%2Fpackage.json)](https://www.npmjs.com/package/web3) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3) | :rotating_light: Entire Web3.js offering (includes all packages) | -| [web3-core](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-core) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-core%2Fpackage.json)](https://www.npmjs.com/package/web3-core) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-core) | Core functions for web3.js packages | -| [web3-errors](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-errors) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-errors%2Fpackage.json)](https://www.npmjs.com/package/web3-core) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-errors) | Errors Objects | -| [web3-eth](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-eth) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth%2Fpackage.json)](https://www.npmjs.com/package/web3-eth) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth) | Modules to interact with the Ethereum blockchain and smart contracts | -| [web3-eth-abi](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-eth-abi) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-abi%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-abi) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-abi) | Functions for encoding and decoding EVM in/output | -| [web3-eth-accounts](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-eth-accounts) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-accounts%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-accounts) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-accounts) | Functions for managing Ethereum accounts and signing | -| [web3-eth-contract](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-eth-contract) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-contract%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-contract) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-contract) | The contract package contained in [web3-eth](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-eth) | -| [web3-eth-ens](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-eth-ens) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-ens%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-ens) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-ens) | Functions for interacting with the Ethereum Name Service | -| [web3-eth-iban](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-eth-iban) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-iban%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-iban) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-iban) | Functionality for converting Ethereum addressed to IBAN addressed and vice versa | -| [web3-eth-personal](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-eth-personal) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-personal%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-personal) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-personal) | Module to interact with the Ethereum blockchain accounts stored in the node | -| [web3-net](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-net) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-net%2Fpackage.json)](https://www.npmjs.com/package/web3-net) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-net) | Functions to interact with an Ethereum node's network properties | -| [web3-providers-http](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-providers-http) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-http%2Fpackage.json)](https://www.npmjs.com/package/web3-providers-http) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-providers-http) | Web3.js provider for the HTTP protocol | -| [web3-providers-ipc](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-providers-ipc) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-ipc%2Fpackage.json)](https://www.npmjs.com/package/web3-providers-ipc) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-providers-ipc) | Web3.js provider for IPC | -| [web3-providers-ws](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-providers-ws) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-ws%2Fpackage.json)](https://www.npmjs.com/package/web3-providers-ws) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-providers-ws) | Web3.js provider for the Websocket protocol | -| [web3-rpc-methods](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-rpc-methods) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-rpc-methods%2Fpackage.json)](https://www.npmjs.com/package/web3-types) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/) | RPC Methods | -| [web3-types](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-types) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-types%2Fpackage.json)](https://www.npmjs.com/package/web3-types) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-types) | Shared useable types | -| [web3-utils](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-utils) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-utils%2Fpackage.json)](https://www.npmjs.com/package/web3-utils) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-utils) | Useful utility functions for Dapp developers | -| [web3-validator](https://github.com/ChainSafe/web3.js/tree/4.x/packages/web3-validator) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-validator%2Fpackage.json)](https://www.npmjs.com/package/web3-validator) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-validator) | Utilities for validating objects | +| [web3](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3%2Fpackage.json)](https://www.npmjs.com/package/web3) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3) | :rotating_light: Entire Web3.js offering (includes all packages) | +| [web3-core](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-core) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-core%2Fpackage.json)](https://www.npmjs.com/package/web3-core) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-core) | Core functions for web3.js packages | +| [web3-errors](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-errors) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-errors%2Fpackage.json)](https://www.npmjs.com/package/web3-core) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-errors) | Errors Objects | +| [web3-eth](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth%2Fpackage.json)](https://www.npmjs.com/package/web3-eth) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth) | Modules to interact with the Ethereum blockchain and smart contracts | +| [web3-eth-abi](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-abi) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-abi%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-abi) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-abi) | Functions for encoding and decoding EVM in/output | +| [web3-eth-accounts](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-accounts) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-accounts%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-accounts) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-accounts) | Functions for managing Ethereum accounts and signing | +| [web3-eth-contract](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-contract) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-contract%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-contract) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-contract) | The contract package contained in [web3-eth](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth) | +| [web3-eth-ens](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-ens) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-ens%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-ens) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-ens) | Functions for interacting with the Ethereum Name Service | +| [web3-eth-iban](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-iban) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-iban%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-iban) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-iban) | Functionality for converting Ethereum addressed to IBAN addressed and vice versa | +| [web3-eth-personal](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-eth-personal) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-eth-personal%2Fpackage.json)](https://www.npmjs.com/package/web3-eth-personal) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-eth-personal) | Module to interact with the Ethereum blockchain accounts stored in the node | +| [web3-net](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-net) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-net%2Fpackage.json)](https://www.npmjs.com/package/web3-net) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-net) | Functions to interact with an Ethereum node's network properties | +| [web3-providers-http](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-providers-http) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-http%2Fpackage.json)](https://www.npmjs.com/package/web3-providers-http) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-providers-http) | Web3.js provider for the HTTP protocol | +| [web3-providers-ipc](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-providers-ipc) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-ipc%2Fpackage.json)](https://www.npmjs.com/package/web3-providers-ipc) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-providers-ipc) | Web3.js provider for IPC | +| [web3-providers-ws](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-providers-ws) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-providers-ws%2Fpackage.json)](https://www.npmjs.com/package/web3-providers-ws) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-providers-ws) | Web3.js provider for the Websocket protocol | +| [web3-rpc-methods](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-rpc-methods) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-rpc-methods%2Fpackage.json)](https://www.npmjs.com/package/web3-types) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/) | RPC Methods | +| [web3-types](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-types) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-types%2Fpackage.json)](https://www.npmjs.com/package/web3-types) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-types) | Shared useable types | +| [web3-utils](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-utils) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-utils%2Fpackage.json)](https://www.npmjs.com/package/web3-utils) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-utils) | Useful utility functions for Dapp developers | +| [web3-validator](https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3-validator) | [![npm](https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3-validator%2Fpackage.json)](https://www.npmjs.com/package/web3-validator) | [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | [![documentation](https://img.shields.io/badge/typedoc-blue)](https://docs.web3js.org/api/web3-validator) | Utilities for validating objects | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/packages/web3 +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/packages/web3 [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=packages%2Fweb3%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3 +[npm-url]: https://npmjs.org/package/@etn-sc/web3 [downloads-image]: https://img.shields.io/npm/dm/web3?label=npm%20downloads diff --git a/packages/web3/package.json b/packages/web3/package.json index b9f54e5a950..7bad6f9b9ff 100644 --- a/packages/web3/package.json +++ b/packages/web3/package.json @@ -1,7 +1,7 @@ { - "name": "web3", + "name": "@etn-sc/web3", "version": "4.2.2", - "description": "Ethereum JavaScript API", + "description": "Electroneum SmartChain JavaScript API", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", "exports": { @@ -11,16 +11,17 @@ "require": "./lib/commonjs/index.js" } }, - "repository": "https://github.com/ChainSafe/web3.js", + "repository": "https://github.com/electroneum/electroneum-web3.js", "engines": { "node": ">=14.0.0", "npm": ">=6.12.0" }, - "author": "ChainSafe Systems", + "author": "Electroneum & ChainSafe Systems", "browser": "./dist/web3.min.js", "license": "LGPL-3.0", "keywords": [ "Ethereum", + "Electroneum", "JavaScript", "API" ], @@ -78,24 +79,24 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3-providers-ipc": "^4.0.7" + "@etn-sc/web3-providers-ipc": "^4.0.7" }, "dependencies": { - "web3-core": "^4.3.1", - "web3-errors": "^1.1.4", - "web3-eth": "^4.3.1", - "web3-eth-abi": "^4.1.4", - "web3-eth-accounts": "^4.1.0", - "web3-eth-contract": "^4.1.3", - "web3-eth-ens": "^4.0.8", - "web3-eth-iban": "^4.0.7", - "web3-eth-personal": "^4.0.8", - "web3-net": "^4.0.7", - "web3-providers-http": "^4.1.0", - "web3-providers-ws": "^4.0.7", - "web3-rpc-methods": "^1.1.3", - "web3-types": "^1.3.1", - "web3-utils": "^4.0.7", - "web3-validator": "^2.0.3" + "@etn-sc/web3-core": "^4.3.1", + "@etn-sc/web3-errors": "^1.1.4", + "@etn-sc/web3-eth": "^4.3.1", + "@etn-sc/web3-eth-abi": "^4.1.4", + "@etn-sc/web3-eth-accounts": "^4.1.1", + "@etn-sc/web3-eth-contract": "^4.1.3", + "@etn-sc/web3-eth-ens": "^4.0.8", + "@etn-sc/web3-eth-iban": "^4.0.7", + "@etn-sc/web3-eth-personal": "^4.0.8", + "@etn-sc/web3-net": "^4.0.7", + "@etn-sc/web3-providers-http": "^4.1.0", + "@etn-sc/web3-providers-ws": "^4.0.7", + "@etn-sc/web3-rpc-methods": "^1.1.3", + "@etn-sc/web3-types": "^1.3.1", + "@etn-sc/web3-utils": "^4.0.7", + "@etn-sc/web3-validator": "^2.0.3" } } diff --git a/tools/web3-packagetemplate/README.md b/tools/web3-packagetemplate/README.md index 4fe1e0036b6..3ddd65aaee6 100644 --- a/tools/web3-packagetemplate/README.md +++ b/tools/web3-packagetemplate/README.md @@ -9,30 +9,23 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is a sub-package of [web3.js][repo]. +This is a sub-package of [@etn-sc/web3.js][repo]. -`web3-packagetemplate` contains the ideal setup for a Web3.js package. +`@etn-sc/web3-packagetemplate` contains the ideal setup for a Web3.js package. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-packagetemplate) or using [Yarn](https://yarnpkg.com/package/web3-packagetemplate) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-packagetemplate) ### Using NPM ```bash -npm install web3-packagetemplate -``` - -### Using Yarn - -```bash -yarn add web3-packagetemplate +npm install @etn-sc/web3-packagetemplate ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -53,7 +46,7 @@ yarn add web3-packagetemplate | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/tools/web3-packagetemplate +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/tools/web3-packagetemplate [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=tools%2Fweb3-packagetemplate%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-packagetemplate +[npm-url]: https://npmjs.org/package/@etn-sc/web3-packagetemplate [downloads-image]: https://img.shields.io/npm/dm/web3-packagetemplate?label=npm%20downloads diff --git a/tools/web3-packagetemplate/package.json b/tools/web3-packagetemplate/package.json index c9181be53a0..a7e1b829efe 100644 --- a/tools/web3-packagetemplate/package.json +++ b/tools/web3-packagetemplate/package.json @@ -1,10 +1,10 @@ { - "name": "web3-packagetemplate", + "name": "@etn-sc/web3-packagetemplate", "version": "1.1.1", "description": "Package template for Web3 4.x.x", "main": "lib/index.js", - "repository": "https://github.com/ChainSafe/web3.js", - "author": "ChainSafe Systems", + "repository": "https://github.com/electroneum/electroneum-web3.js", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "engines": { "node": ">=14", diff --git a/tools/web3-plugin-example/README.md b/tools/web3-plugin-example/README.md index f06e2d7d065..369fb1382b4 100644 --- a/tools/web3-plugin-example/README.md +++ b/tools/web3-plugin-example/README.md @@ -9,28 +9,21 @@ [![NPM Package][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] -This is an example of a plugin implementation for [web3.js][repo]. +This is an example of a plugin implementation for [@etn-sc/web3.js][repo]. ## Installation -You can install the package either using [NPM](https://www.npmjs.com/package/web3-plugin-example) or using [Yarn](https://yarnpkg.com/package/web3-plugin-example) +You can install the package using [NPM](https://www.npmjs.com/package/@etn-sc/web3-plugin-example) ### Using NPM ```bash -npm install web3-plugin-example -``` - -### Using Yarn - -```bash -yarn add web3-plugin-example +npm install @etn-sc/web3-plugin-example ``` ## Getting Started -- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) - ![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) +- :writing_hand: If you have questions [submit an issue](https://github.com/electroneum/electroneum-web3.js/issues/new) ## Prerequisites @@ -51,7 +44,7 @@ yarn add web3-plugin-example | test:unit | Uses `jest` to run tests under `/test/unit` | [docs]: https://docs.web3js.org/ -[repo]: https://github.com/web3/web3.js/tree/4.x/tools/web3-plugin-example +[repo]: https://github.com/electroneum/electroneum-web3.js/tree/4.x/tools/web3-plugin-example [npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=tools%2Fweb3-plugin-example%2Fpackage.json -[npm-url]: https://npmjs.org/package/web3-plugin-example +[npm-url]: https://npmjs.org/package/@etn-sc/web3-plugin-example [downloads-image]: https://img.shields.io/npm/dm/web3-plugin-example?label=npm%20downloads diff --git a/tools/web3-plugin-example/package.json b/tools/web3-plugin-example/package.json index 6e5782e9f3d..7bda88571f0 100644 --- a/tools/web3-plugin-example/package.json +++ b/tools/web3-plugin-example/package.json @@ -1,16 +1,17 @@ { - "name": "web3-plugin-example", + "name": "@etn-sc/web3-plugin-example", "version": "1.0.6", "description": "Example implementations of Web3.js' 4.x plugin system", - "repository": "https://github.com/ChainSafe/web3.js", + "repository": "https://github.com/electroneum/electroneum-web3.js", "engines": { "node": ">=14", "npm": ">=6.12.0" }, - "author": "ChainSafe Systems", + "author": "Electroneum & ChainSafe Systems", "license": "LGPL-3.0", "keywords": [ "Ethereum", + "Electroneum", "JavaScript", "API" ], @@ -45,18 +46,18 @@ "prettier": "^2.7.1", "ts-jest": "^28.0.7", "typescript": "^4.7.4", - "web3": "^4.2.1", - "web3-core": "^4.3.0", - "web3-eth-abi": "^4.1.4", - "web3-eth-contract": "^4.1.2", - "web3-types": "^1.3.0", - "web3-utils": "^4.0.7" + "@etn-sc/web3": "^4.2.1", + "@etn-sc/web3-core": "^4.3.0", + "@etn-sc/web3-eth-abi": "^4.1.4", + "@etn-sc/web3-eth-contract": "^4.1.2", + "@etn-sc/web3-types": "^1.3.0", + "@etn-sc/web3-utils": "^4.0.7" }, "peerDependencies": { - "web3-core": ">= 4.1.1 < 5", - "web3-eth-abi": ">= 4.1.1 < 5", - "web3-eth-contract": ">= 4.0.5 < 5", - "web3-types": ">= 1.1.1 < 5", - "web3-utils": ">= 4.0.5 < 5" + "@etn-sc/web3-core": ">= 4.1.1 < 5", + "@etn-sc/web3-eth-abi": ">= 4.1.1 < 5", + "@etn-sc/web3-eth-contract": ">= 4.0.5 < 5", + "@etn-sc/web3-types": ">= 1.1.1 < 5", + "@etn-sc/web3-utils": ">= 4.0.5 < 5" } } From d873253f655a7ea0b4bace71423891dd4f69ea2b Mon Sep 17 00:00:00 2001 From: andrepatta Date: Sun, 5 Nov 2023 23:37:02 -0300 Subject: [PATCH 07/10] update package references to @etn-sc/... --- .../support_additional_rpc_methods/index.md | 12 +++--- .../web3_tree_shaking_support_guide/index.md | 4 +- docs/docs/guides/basics/eth.md | 8 ++-- .../basics/sign_and_send_tx/local_wallet.md | 4 +- .../sign_and_send_tx/wallet_of_eth_node.md | 4 +- ...ng_and_interacting_with_smart_contracts.md | 8 ++-- .../infer_contract_types_guide/index.md | 4 +- .../web3_plugin_guide/plugin_authors.md | 22 +++++----- .../guides/web3_plugin_guide/plugin_users.md | 6 +-- .../web3_providers_guide/events_listening.md | 2 +- .../docs/guides/web3_providers_guide/index.md | 2 +- .../guides/web3_upgrade_guide/1.x/index.md | 16 +++---- .../1.x/providers_migration_guide.md | 2 +- .../1.x/web3_utils_migration_guide.md | 4 +- packages/web3-core/src/formatters.ts | 10 ++--- packages/web3-core/src/types.ts | 2 +- packages/web3-core/src/utils.ts | 2 +- packages/web3-core/src/web3_batch_request.ts | 6 +-- packages/web3-core/src/web3_config.ts | 6 +-- packages/web3-core/src/web3_context.ts | 6 +-- packages/web3-core/src/web3_event_emitter.ts | 2 +- .../web3-core/src/web3_request_manager.ts | 10 ++--- .../src/web3_subscription_manager.ts | 6 +-- packages/web3-core/src/web3_subscriptions.ts | 6 +-- .../web3-core/test/unit/formatters.test.ts | 6 +-- .../test/unit/web3_batch_request.test.ts | 6 +-- .../web3-core/test/unit/web3_config.test.ts | 2 +- .../web3-core/test/unit/web3_context.test.ts | 4 +- .../web3-core/test/unit/web3_extend.test.ts | 2 +- .../test/unit/web3_request_manager.test.ts | 10 ++--- .../unit/web3_subscription_manager.test.ts | 2 +- .../src/errors/connection_errors.ts | 2 +- .../web3-errors/src/errors/contract_errors.ts | 2 +- .../web3-errors/src/errors/response_errors.ts | 2 +- packages/web3-errors/src/errors/rpc_errors.ts | 2 +- .../src/errors/transaction_errors.ts | 2 +- packages/web3-errors/src/web3_error_base.ts | 2 +- packages/web3-errors/test/unit/errors.test.ts | 2 +- .../web3-errors/test/unit/rpc-errors.test.ts | 2 +- packages/web3-eth-abi/src/api/errors_api.ts | 6 +-- packages/web3-eth-abi/src/api/events_api.ts | 6 +-- .../web3-eth-abi/src/api/functions_api.ts | 6 +-- packages/web3-eth-abi/src/api/logs_api.ts | 2 +- .../web3-eth-abi/src/api/parameters_api.ts | 4 +- .../web3-eth-abi/src/coders/base/address.ts | 8 ++-- .../web3-eth-abi/src/coders/base/array.ts | 6 +-- packages/web3-eth-abi/src/coders/base/bool.ts | 6 +-- .../web3-eth-abi/src/coders/base/bytes.ts | 8 ++-- .../web3-eth-abi/src/coders/base/index.ts | 2 +- .../web3-eth-abi/src/coders/base/number.ts | 8 ++-- .../web3-eth-abi/src/coders/base/string.ts | 6 +-- .../web3-eth-abi/src/coders/base/tuple.ts | 6 +-- .../web3-eth-abi/src/coders/base/utils.ts | 2 +- packages/web3-eth-abi/src/coders/decode.ts | 4 +- packages/web3-eth-abi/src/coders/encode.ts | 6 +-- packages/web3-eth-abi/src/coders/utils.ts | 6 +-- .../src/decode_contract_error_data.ts | 4 +- packages/web3-eth-abi/src/eip_712.ts | 4 +- packages/web3-eth-abi/src/utils.ts | 6 +-- .../test/fixtures/coders/base/bytes.ts | 2 +- .../test/fixtures/coders/base/number.ts | 2 +- .../test/fixtures/coders/base/tuple.ts | 2 +- .../test/fixtures/coders/encode.ts | 2 +- .../test/fixtures/get_encoded_eip712_data.ts | 2 +- .../test/unit/api/parameters_api.test.ts | 2 +- .../test/unit/coders/base/address.test.ts | 4 +- .../test/unit/coders/base/array.test.ts | 4 +- .../test/unit/coders/base/bool.test.ts | 4 +- .../test/unit/coders/base/bytes.test.ts | 4 +- .../test/unit/coders/base/number.test.ts | 4 +- .../test/unit/coders/base/string.test.ts | 4 +- .../test/unit/coders/base/tuple.test.ts | 2 +- .../test/unit/decodeContractErrorData.test.ts | 2 +- .../test/unit/encodeDecodeParams.test.ts | 2 +- packages/web3-eth-abi/test/unit/types.test.ts | 2 +- packages/web3-eth-accounts/src/account.ts | 8 ++-- .../web3-eth-accounts/src/common/common.ts | 4 +- .../web3-eth-accounts/src/common/utils.ts | 4 +- packages/web3-eth-accounts/src/index.ts | 4 +- packages/web3-eth-accounts/src/tx/address.ts | 2 +- .../src/tx/baseTransaction.ts | 4 +- .../src/tx/eip1559Transaction.ts | 4 +- .../src/tx/eip2930Transaction.ts | 4 +- .../src/tx/etnip1Transaction.ts | 4 +- .../src/tx/legacyTransaction.ts | 4 +- .../src/tx/transactionFactory.ts | 2 +- packages/web3-eth-accounts/src/tx/types.ts | 2 +- packages/web3-eth-accounts/src/tx/utils.ts | 4 +- packages/web3-eth-accounts/src/types.ts | 8 ++-- packages/web3-eth-accounts/src/wallet.ts | 6 +-- .../test/fixtures/account.ts | 9 ++-- .../test/integration/account.test.ts | 4 +- .../test/integration/wallet.test.ts | 2 +- .../test/unit/account.test.ts | 4 +- .../test/unit/common/eips.test.ts | 2 +- .../test/unit/common/hardforks.test.ts | 2 +- .../test/unit/common/mergePOS.test.ts | 2 +- .../test/unit/common/timestamp.test.ts | 2 +- .../test/unit/common/utils.test.ts | 2 +- .../test/unit/tx/base.test.ts | 2 +- .../test/unit/tx/eip1559.test.ts | 2 +- .../test/unit/tx/etnip1.test.ts | 2 +- .../test/unit/tx/inputValue.test.ts | 4 +- .../test/unit/tx/legacy.test.ts | 2 +- .../test/unit/tx/transactionFactory.test.ts | 2 +- .../test/unit/tx/typedTxsAndEIP2930.test.ts | 2 +- .../test/unit/wallet.test.ts | 2 +- packages/web3-eth-contract/src/constant.ts | 2 +- packages/web3-eth-contract/src/contract.ts | 14 +++---- packages/web3-eth-contract/src/encoding.ts | 12 +++--- .../web3-eth-contract/src/log_subscription.ts | 6 +-- packages/web3-eth-contract/src/types.ts | 8 ++-- packages/web3-eth-contract/src/utils.ts | 6 +-- .../web3-eth-contract/test/fixtures/erc20.ts | 2 +- .../web3-eth-contract/test/fixtures/erc721.ts | 2 +- .../integration/contract_defaults.test.ts | 4 +- .../contract_defaults_extra.test.ts | 6 +-- .../test/integration/contract_deploy.test.ts | 2 +- .../test/integration/contract_erc20.test.ts | 2 +- .../test/integration/contract_erc721.test.ts | 2 +- .../contract_estimateGas_without_0x.test.ts | 2 +- .../test/integration/contract_events.test.ts | 2 +- .../contract_filter_events.test.ts | 4 +- .../test/integration/contract_methods.test.ts | 2 +- .../contract_methods_errors.test.ts | 2 +- .../local_account/contract_deploy.test.ts | 4 +- .../local_account/contract_erc20.test.ts | 4 +- .../local_account/contract_erc721.test.ts | 4 +- .../contract_overloaded_methods.test.ts | 8 ++-- .../test/unit/contract.test.ts | 8 ++-- .../test/unit/contract_typing.test.ts | 2 +- .../test/unit/encode_event_abi.test.ts | 2 +- packages/web3-eth-ens/src/ens.ts | 12 +++--- packages/web3-eth-ens/src/registry.ts | 6 +-- packages/web3-eth-ens/src/resolver.ts | 8 ++-- packages/web3-eth-ens/src/utils.ts | 2 +- .../test/integration/ens.events.test.ts | 10 ++--- .../web3-eth-ens/test/integration/ens.test.ts | 10 ++--- .../test/integration/resolver.test.ts | 10 ++--- .../test/unit/constructor.test.ts | 2 +- packages/web3-eth-ens/test/unit/ens.test.ts | 6 +-- .../web3-eth-ens/test/unit/registry.test.ts | 4 +- .../web3-eth-ens/test/unit/resolver.test.ts | 8 ++-- packages/web3-eth-iban/src/iban.ts | 8 ++-- packages/web3-eth-personal/src/index.ts | 4 +- packages/web3-eth-personal/src/personal.ts | 4 +- .../src/rpc_method_wrappers.ts | 12 +++--- .../test/integration/personal.test.ts | 6 +-- .../test/unit/eth_personal.test.ts | 8 ++-- packages/web3-eth/src/constants.ts | 2 +- packages/web3-eth/src/index.ts | 10 ++--- packages/web3-eth/src/rpc_method_wrappers.ts | 14 +++---- packages/web3-eth/src/types.ts | 4 +- .../src/utils/decode_signed_transaction.ts | 6 +-- packages/web3-eth/src/utils/decoding.ts | 6 +-- .../src/utils/detect_transaction_type.ts | 10 ++--- .../web3-eth/src/utils/format_transaction.ts | 8 ++-- .../web3-eth/src/utils/get_revert_reason.ts | 8 ++-- .../src/utils/get_transaction_error.ts | 6 +-- .../src/utils/get_transaction_gas_pricing.ts | 10 ++--- .../utils/prepare_transaction_for_signing.ts | 10 ++--- .../src/utils/reject_if_block_timeout.ts | 8 ++-- packages/web3-eth/src/utils/send_tx_helper.ts | 10 ++--- .../web3-eth/src/utils/transaction_builder.ts | 14 +++---- .../src/utils/try_send_transaction.ts | 8 ++-- .../src/utils/wait_for_transaction_receipt.ts | 8 ++-- .../src/utils/watch_transaction_by_pooling.ts | 10 ++--- .../watch_transaction_by_subscription.ts | 6 +-- .../watch_transaction_for_confirmations.ts | 12 +++--- packages/web3-eth/src/validation.ts | 6 +-- packages/web3-eth/src/web3_eth.ts | 10 ++--- packages/web3-eth/src/web3_subscriptions.ts | 6 +-- .../test/e2e/subscription_new_heads.test.ts | 2 +- packages/web3-eth/test/fixtures/decoding.ts | 2 +- .../test/fixtures/detect_transaction_type.ts | 2 +- .../test/fixtures/example_subscription.ts | 2 +- .../test/fixtures/format_transaction.ts | 4 +- .../prepare_transaction_for_signing.ts | 2 +- .../test/fixtures/rpc_methods_wrappers.ts | 2 +- .../validate_transaction_for_signing.ts | 4 +- packages/web3-eth/test/fixtures/validation.ts | 4 +- .../web3_eth_methods_with_parameters.ts | 2 +- .../web3-eth/test/integration/batch.test.ts | 4 +- .../integration/block/rpc.getBlock.test.ts | 6 +-- .../rpc.getBlockTransactionCount.test.ts | 4 +- .../block/rpc.getBlockUncleCount.test.ts | 4 +- .../block/rpc.getTransactionCount.test.ts | 4 +- .../block/rpc.getTransactionFromBlock.test.ts | 4 +- .../integration/block/rpc.getUncle.test.ts | 4 +- .../test/integration/defaults.test.ts | 8 ++-- .../defaults.transactionBlockTimeout.test.ts | 12 +++--- .../web3-eth/test/integration/eth.test.ts | 10 ++--- .../integration/get_revert_reason.test.ts | 2 +- packages/web3-eth/test/integration/helper.ts | 4 +- .../web3-eth/test/integration/nonce.test.ts | 6 +-- .../web3-eth/test/integration/rpc.test.ts | 6 +-- .../test/integration/subscribe.test.ts | 6 +-- .../integration/subscription_heads.test.ts | 4 +- .../integration/subscription_logs.test.ts | 8 ++-- .../subscription_logs_block.test.ts | 10 ++--- .../subscription_new_pending_tx.test.ts | 2 +- .../subscription_on_2_events.test.ts | 2 +- .../test/integration/unsubscribe.test.ts | 6 +-- .../integration/watch_transaction.test.ts | 8 ++-- .../watch_transaction_polling.test.ts | 6 +-- .../test/integration/web3_eth/call.test.ts | 4 +- .../web3_eth/createAccessList.test.ts | 2 +- .../integration/web3_eth/estimate_gas.test.ts | 2 +- .../web3_eth/getFeeHistory.test.ts | 2 +- .../web3_eth/send_signed_transaction.test.ts | 6 +-- .../web3_eth/send_transaction.test.ts | 6 +-- .../test/integration/web3_eth/sign.test.ts | 2 +- .../web3_eth/sign_transaction.test.ts | 2 +- .../web3_eth/sign_typed_data.test.ts | 6 +-- packages/web3-eth/test/unit/decoding.test.ts | 2 +- .../unit/default_transaction_builder.test.ts | 12 +++--- .../test/unit/detect_transaction_type.test.ts | 8 ++-- packages/web3-eth/test/unit/errors.test.ts | 2 +- .../test/unit/format_rpc_methods.test.ts | 6 +-- .../test/unit/format_transaction.test.ts | 4 +- .../prepare_transaction_for_signing.test.ts | 14 +++---- .../unit/rpc_method_wrappers/call.test.ts | 10 ++--- .../createAccessList.test.ts | 10 ++--- .../rpc_method_wrappers/estimate_gas.test.ts | 10 ++--- .../unit/rpc_method_wrappers/fixtures/call.ts | 2 +- .../fixtures/createAccessList.ts | 2 +- .../fixtures/estimate_gas.ts | 2 +- .../fixtures/get_balance.ts | 2 +- .../rpc_method_wrappers/fixtures/get_block.ts | 4 +- .../fixtures/get_block_transaction_count.ts | 4 +- .../fixtures/get_block_uncle_count.ts | 4 +- .../rpc_method_wrappers/fixtures/get_code.ts | 2 +- .../fixtures/get_fee_history.ts | 2 +- .../rpc_method_wrappers/fixtures/get_logs.ts | 2 +- .../fixtures/get_pending_transactions.ts | 2 +- .../rpc_method_wrappers/fixtures/get_proof.ts | 4 +- .../fixtures/get_storage_at.ts | 2 +- .../fixtures/get_transaction.ts | 4 +- .../fixtures/get_transaction_count.ts | 2 +- .../fixtures/get_transaction_from_block.ts | 4 +- .../fixtures/get_transaction_receipt.ts | 4 +- .../rpc_method_wrappers/fixtures/get_uncle.ts | 4 +- .../fixtures/return_formats.ts | 2 +- .../fixtures/send_signed_transaction.ts | 4 +- .../fixtures/send_transaction.ts | 2 +- .../unit/rpc_method_wrappers/fixtures/sign.ts | 4 +- .../fixtures/sign_transaction.ts | 2 +- .../fixtures/sign_typed_data.ts | 2 +- .../rpc_method_wrappers/get_balance.test.ts | 10 ++--- .../rpc_method_wrappers/get_block.test.ts | 10 ++--- .../get_block_number.test.ts | 8 ++-- .../get_block_transaction_count.test.ts | 10 ++--- .../get_block_uncle_count.test.ts | 10 ++--- .../rpc_method_wrappers/get_chain_id.test.ts | 8 ++-- .../unit/rpc_method_wrappers/get_code.test.ts | 10 ++--- .../rpc_method_wrappers/get_coinbase.test.ts | 6 +-- .../get_fee_history.test.ts | 10 ++--- .../rpc_method_wrappers/get_gas_price.test.ts | 8 ++-- .../rpc_method_wrappers/get_hash_rate.test.ts | 8 ++-- .../unit/rpc_method_wrappers/get_logs.test.ts | 8 ++-- .../get_pending_transactions.test.ts | 6 +-- .../rpc_method_wrappers/get_proof.test.ts | 10 ++--- .../get_protocol_version.test.ts | 6 +-- .../get_storage_at.test.ts | 10 ++--- .../get_transaction.test.ts | 8 ++-- .../get_transaction_count.test.ts | 10 ++--- .../get_transaction_from_block.test.ts | 10 ++--- .../get_transaction_receipt.test.ts | 8 ++-- .../rpc_method_wrappers/get_uncle.test.ts | 10 ++--- .../rpc_method_wrappers/is_mining.test.ts | 6 +-- .../rpc_method_wrappers/is_syncing.test.ts | 6 +-- .../send_signed_transaction.test.ts | 8 ++-- .../send_transaction.test.ts | 10 ++--- .../unit/rpc_method_wrappers/sign.test.ts | 10 ++--- .../sign_transaction.test.ts | 8 ++-- .../sign_typed_data.test.ts | 8 ++-- .../web3-eth/test/unit/send_tx_helper.test.ts | 6 +-- .../utils/getTransactionFromOrToAttr.test.ts | 4 +- .../test/unit/utils/get_revert_reason.test.ts | 4 +- .../unit/utils/get_transaction_error.test.ts | 4 +- .../unit/utils/get_transaction_type.test.ts | 8 ++-- .../utils/parse_transaction_error.test.ts | 2 +- .../wait_for_transaction_receipt.test.ts | 6 +-- .../watch_transaction_by_polling.test.ts | 8 ++-- ...atch_transaction_for_confirmations.test.ts | 10 ++--- .../validate_transaction_for_signing.test.ts | 2 +- .../web3-eth/test/unit/validation.test.ts | 2 +- .../web3_eth_methods_no_parameters.test.ts | 2 +- .../web3_eth_methods_with_parameters.test.ts | 4 +- .../test/unit/web3_eth_subscription.test.ts | 4 +- packages/web3-net/src/index.ts | 4 +- packages/web3-net/src/net.ts | 4 +- packages/web3-net/src/rpc_method_wrappers.ts | 8 ++-- .../test/fixtures/rpc_method_wrappers.ts | 2 +- .../test/fixtures/web3_net_methods.ts | 2 +- .../test/integration/web3_net.test.ts | 2 +- .../test/unit/rpc_method_wrappers.test.ts | 2 +- packages/web3-providers-http/src/index.ts | 4 +- .../test/integration/request.test.ts | 2 +- .../test/unit/implemented_methods.test.ts | 4 +- .../test/unit/not_implemented_methods.test.ts | 2 +- packages/web3-providers-ipc/src/index.ts | 6 +-- .../test/integration/eip1193.test.ts | 4 +- .../test/unit/ipc_provider.test.ts | 2 +- packages/web3-providers-ws/src/index.ts | 6 +-- .../test/integration/eip1193.test.ts | 4 +- .../ganache_fault_tolerance.test.ts | 8 ++-- .../test/integration/reconnection.test.ts | 2 +- .../web_socket_provider_integration.test.ts | 6 +-- .../test/unit/__mocks__/isomorphic-ws.ts | 2 +- .../test/unit/web_socket_provider.test.ts | 2 +- .../web3-rpc-methods/src/eth_rpc_methods.ts | 8 ++-- .../web3-rpc-methods/src/net_rpc_methods.ts | 4 +- .../src/personal_rpc_methods.ts | 4 +- .../test/unit/eth_rpc_methods/call.test.ts | 4 +- .../unit/eth_rpc_methods/compile_lll.test.ts | 4 +- .../eth_rpc_methods/compile_serpent.test.ts | 4 +- .../eth_rpc_methods/compile_solidity.test.ts | 4 +- .../eth_rpc_methods/createAccessList.test.ts | 2 +- .../unit/eth_rpc_methods/estimate_gas.test.ts | 4 +- .../unit/eth_rpc_methods/fixtures/call.ts | 2 +- .../fixtures/createAccessList.ts | 2 +- .../eth_rpc_methods/fixtures/estimate_gas.ts | 2 +- .../eth_rpc_methods/fixtures/get_balance.ts | 2 +- .../fixtures/get_block_by_hash.ts | 2 +- .../fixtures/get_block_by_number.ts | 2 +- .../get_block_transaction_count_by_hash.ts | 2 +- .../get_block_transaction_count_by_number.ts | 2 +- .../unit/eth_rpc_methods/fixtures/get_code.ts | 2 +- .../fixtures/get_fee_history.ts | 2 +- .../fixtures/get_filter_changes.ts | 2 +- .../fixtures/get_filter_logs.ts | 2 +- .../unit/eth_rpc_methods/fixtures/get_logs.ts | 2 +- .../eth_rpc_methods/fixtures/get_proof.ts | 2 +- .../fixtures/get_storage_at.ts | 2 +- ...get_transaction_by_block_hash_and_index.ts | 2 +- ...t_transaction_by_block_number_and_index.ts | 2 +- .../fixtures/get_transaction_by_hash.ts | 2 +- .../fixtures/get_transaction_count.ts | 2 +- .../fixtures/get_transaction_receipt.ts | 2 +- .../get_uncle_by_block_hash_and_index.ts | 2 +- .../fixtures/get_uncle_count_by_block_hash.ts | 2 +- .../get_uncle_count_by_block_number.ts | 2 +- .../eth_rpc_methods/fixtures/new_filter.ts | 2 +- .../fixtures/send_raw_transaction.ts | 2 +- .../fixtures/send_transaction.ts | 2 +- .../unit/eth_rpc_methods/fixtures/sign.ts | 2 +- .../fixtures/sign_transaction.ts | 2 +- .../fixtures/sign_typed_data.ts | 2 +- .../fixtures/submit_hashrate.ts | 2 +- .../eth_rpc_methods/fixtures/submit_work.ts | 2 +- .../fixtures/uninstall_filter.ts | 2 +- .../unit/eth_rpc_methods/get_accounts.test.ts | 2 +- .../unit/eth_rpc_methods/get_balance.test.ts | 4 +- .../eth_rpc_methods/get_block_by_hash.test.ts | 4 +- .../get_block_by_number.test.ts | 4 +- .../eth_rpc_methods/get_block_number.test.ts | 2 +- ...et_block_transaction_count_by_hash.test.ts | 4 +- ..._block_transaction_count_by_number.test.ts | 4 +- .../unit/eth_rpc_methods/get_chain_id.test.ts | 2 +- .../unit/eth_rpc_methods/get_code.test.ts | 4 +- .../unit/eth_rpc_methods/get_coinbase.test.ts | 2 +- .../eth_rpc_methods/get_compilers.test.ts | 2 +- .../eth_rpc_methods/get_fee_history.test.ts | 4 +- .../get_filter_changes.test.ts | 4 +- .../eth_rpc_methods/get_filter_logs.test.ts | 4 +- .../eth_rpc_methods/get_gas_price.test.ts | 2 +- .../eth_rpc_methods/get_hash_rate.test.ts | 2 +- .../unit/eth_rpc_methods/get_logs.test.ts | 4 +- .../unit/eth_rpc_methods/get_mining.test.ts | 2 +- .../eth_rpc_methods/get_node_info.test.ts | 2 +- .../get_pending_transaction.test.ts | 2 +- .../unit/eth_rpc_methods/get_proof.test.ts | 4 +- .../get_protocol_version.test.ts | 2 +- .../eth_rpc_methods/get_storage_at.test.ts | 4 +- .../unit/eth_rpc_methods/get_syncing.test.ts | 2 +- ...ransaction_by_block_hash_and_index.test.ts | 4 +- ...nsaction_by_block_number_and_index.test.ts | 4 +- .../get_transaction_by_hash.test.ts | 4 +- .../get_transaction_count.test.ts | 4 +- .../get_transaction_receipt.test.ts | 4 +- .../get_uncle_by_block_hash_and_index.test.ts | 4 +- .../get_uncle_count_by_block_hash.test.ts | 4 +- .../get_uncle_count_by_block_number.test.ts | 4 +- .../unit/eth_rpc_methods/get_work.test.ts | 2 +- .../eth_rpc_methods/new_block_filter.test.ts | 2 +- .../unit/eth_rpc_methods/new_filter.test.ts | 4 +- .../new_pending_transaction_filter.test.ts | 2 +- .../eth_rpc_methods/request_accounts.test.ts | 2 +- .../send_raw_transaction.test.ts | 4 +- .../eth_rpc_methods/send_transaction.test.ts | 4 +- .../test/unit/eth_rpc_methods/sign.test.ts | 4 +- .../eth_rpc_methods/sign_transaction.test.ts | 4 +- .../eth_rpc_methods/sign_typed_data.test.ts | 4 +- .../eth_rpc_methods/submit_hashrate.test.ts | 4 +- .../unit/eth_rpc_methods/submit_work.test.ts | 4 +- .../eth_rpc_methods/uninstall_filter.test.ts | 4 +- .../test/unit/net_rpc_methods.test.ts | 4 +- .../web3-utils/src/chunk_response_parser.ts | 4 +- packages/web3-utils/src/converters.ts | 6 +-- packages/web3-utils/src/formatter.ts | 6 +-- packages/web3-utils/src/hash.ts | 6 +-- packages/web3-utils/src/json_rpc.ts | 6 +-- packages/web3-utils/src/objects.ts | 4 +- packages/web3-utils/src/promise_helpers.ts | 2 +- packages/web3-utils/src/socket_provider.ts | 4 +- .../web3-utils/src/string_manipulation.ts | 6 +-- packages/web3-utils/src/validation.ts | 6 +-- .../web3-utils/src/web3_deferred_promise.ts | 4 +- .../web3-utils/src/web3_eip1193_provider.ts | 4 +- .../web3-utils/test/fixtures/converters.ts | 2 +- .../web3-utils/test/fixtures/formatter.ts | 2 +- packages/web3-utils/test/fixtures/hash.ts | 2 +- packages/web3-utils/test/fixtures/json_rpc.ts | 2 +- .../test/fixtures/string_manipulation.ts | 2 +- .../web3-utils/test/fixtures/validation.ts | 4 +- .../web3-utils/test/unit/formatter.test.ts | 2 +- .../test/unit/socket_provider.test.ts | 2 +- .../web3-utils/test/unit/validation.test.ts | 2 +- packages/web3-validator/src/errors.ts | 4 +- packages/web3-validator/src/formats.ts | 2 +- packages/web3-validator/src/types.ts | 2 +- packages/web3-validator/src/utils.ts | 2 +- packages/web3-validator/src/validation/abi.ts | 2 +- .../web3-validator/src/validation/block.ts | 2 +- .../web3-validator/src/validation/filter.ts | 2 +- .../web3-validator/src/validation/object.ts | 2 +- packages/web3-validator/src/validator.ts | 4 +- packages/web3-validator/src/web3_validator.ts | 2 +- .../test/fixtures/validation.ts | 2 +- .../web3-validator/test/unit/error.test.ts | 2 +- .../web3-validator/test/unit/utils.test.ts | 2 +- .../test/unit/web3_validator.test.ts | 2 +- packages/web3/src/abi.ts | 2 +- packages/web3/src/accounts.ts | 10 ++--- packages/web3/src/eth.exports.ts | 14 +++---- packages/web3/src/index.ts | 42 +++++++++---------- packages/web3/src/providers.exports.ts | 6 +-- packages/web3/src/types.ts | 18 ++++---- packages/web3/src/web3.ts | 22 +++++----- .../test/web3-eth-accounts/create.test.ts | 4 +- .../test/web3-eth-contract/erc20.test.ts | 2 +- .../test/web3-eth/getBlock.test.ts | 4 +- packages/web3/test/e2e/estimate_gas.test.ts | 2 +- packages/web3/test/e2e/get_balance.test.ts | 4 +- packages/web3/test/e2e/get_block.test.ts | 8 ++-- .../web3/test/e2e/get_block_number.test.ts | 2 +- .../e2e/get_block_transaction_count.test.ts | 4 +- packages/web3/test/e2e/get_chain_id.test.ts | 2 +- .../web3/test/e2e/get_fee_history.test.ts | 2 +- packages/web3/test/e2e/get_gas_price.test.ts | 2 +- .../test/e2e/get_protocol_version.test.ts | 2 +- .../e2e/get_transaction_from_block.test.ts | 2 +- packages/web3/test/e2e/get_uncle.test.ts | 2 +- packages/web3/test/e2e/mainnet/call.test.ts | 2 +- .../web3/test/e2e/mainnet/get_code.test.ts | 2 +- .../test/e2e/mainnet/get_past_logs.test.ts | 4 +- .../test/e2e/mainnet/get_transaction.test.ts | 4 +- .../mainnet/get_transaction_receipt.test.ts | 4 +- packages/web3/test/e2e/sepolia/call.test.ts | 2 +- .../web3/test/e2e/sepolia/get_code.test.ts | 2 +- .../test/e2e/sepolia/get_past_logs.test.ts | 4 +- .../test/e2e/sepolia/get_transaction.test.ts | 4 +- .../sepolia/get_transaction_receipt.test.ts | 4 +- packages/web3/test/e2e/web3_extend.test.ts | 2 +- .../esm_black_box/test/batchRequest.test.ts | 2 +- .../test/web3-eth-accounts/create.test.ts | 4 +- .../web3-eth-accounts/hashMessage.test.ts | 2 +- .../test/web3-eth-contract/erc20.test.ts | 4 +- .../test/web3-eth/getBlock.test.ts | 6 +-- .../test/web3-eth/getTransaction.test.ts | 2 +- .../web3/test/fixtures/tx-type-15/index.ts | 6 +-- .../integration/external-providers/helper.ts | 2 +- .../external-providers/in3.test.ts | 2 +- .../test/integration/handle_revert.test.ts | 6 +-- packages/web3/test/integration/ipc.test.ts | 2 +- .../integration/web3-plugin-add-tx.test.ts | 2 +- .../test/integration/web3.accounts.test.ts | 2 +- .../integration/web3.eth.transaction.test.ts | 4 +- packages/web3/test/integration/web3.test.ts | 10 ++--- packages/web3/test/shared_fixtures/data.ts | 2 +- packages/web3/test/unit/accounts.test.ts | 6 +-- packages/web3/test/unit/index.test.ts | 18 ++++---- .../unit/web3-custom-subscriptions.test.ts | 2 +- packages/web3/test/unit/web3.extend.test.ts | 2 +- packages/web3/test/unit/web3.test.ts | 4 +- scripts/system_tests_utils.ts | 20 ++++----- .../src/contract_method_wrappers.ts | 8 ++-- .../src/custom_rpc_methods.ts | 2 +- .../src/reexported_web3_context.ts | 2 +- .../unit/contract_method_wrappers.test.ts | 4 +- .../test/unit/custom_rpc_methods.test.ts | 2 +- .../test/web3_export_helper.ts | 2 +- 493 files changed, 1144 insertions(+), 1145 deletions(-) diff --git a/docs/docs/guides/advanced/support_additional_rpc_methods/index.md b/docs/docs/guides/advanced/support_additional_rpc_methods/index.md index 7416551603f..c44fdc3eb08 100644 --- a/docs/docs/guides/advanced/support_additional_rpc_methods/index.md +++ b/docs/docs/guides/advanced/support_additional_rpc_methods/index.md @@ -24,7 +24,7 @@ This will give your plugin access to [requestManager](/api/web3-core/class/Web3C :::caution ```ts -import { Web3PluginBase } from 'web3'; +import { Web3PluginBase } from '@etn-sc/web3'; export default class CustomRpcMethodsPlugin extends Web3PluginBase { // step 1 @@ -35,7 +35,7 @@ export default class CustomRpcMethodsPlugin extends Web3PluginBase { 2. After that add public `pluginNamespace` property. This will be used to access your plugin, as mentioned in step number 5 code example. ```ts -import { Web3PluginBase } from 'web3'; +import { Web3PluginBase } from '@etn-sc/web3'; export default class CustomRpcMethodsPlugin extends Web3PluginBase { public pluginNamespace = 'customRpcMethods'; // step 2 @@ -45,7 +45,7 @@ export default class CustomRpcMethodsPlugin extends Web3PluginBase { 3. Once plugin class is created using above mentioned steps, its very easy to add new RPC methods like: ```ts -import { Web3PluginBase } from 'web3'; +import { Web3PluginBase } from '@etn-sc/web3'; export default class CustomRpcMethodsPlugin extends Web3PluginBase { public pluginNamespace = 'customRpcMethods'; @@ -64,7 +64,7 @@ export default class CustomRpcMethodsPlugin extends Web3PluginBase { 4. Final step is setting up module [augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation), this will allow you to access plugin on web3 object. ```ts -import { Web3PluginBase } from 'web3'; +import { Web3PluginBase } from '@etn-sc/web3'; export default class CustomRpcMethodsPlugin extends Web3PluginBase { public pluginNamespace = 'customRpcMethods'; @@ -99,8 +99,8 @@ After the plugin is ready, it is recommended to publish it on the NPM registry. Once plugin is registered its custom methods will be available to use. ```ts -import { Web3 } from 'web3'; -import CustomRpcMethodsPlugin from 'web3-plugin-example'; +import { Web3 } from '@etn-sc/web3'; +import CustomRpcMethodsPlugin from '@etn-sc/web3-plugin-example'; const web3 = new Web3('http://127.0.0.1:8545'); web3.registerPlugin(new CustomRpcMethodsPlugin()); // step 5 diff --git a/docs/docs/guides/advanced/web3_tree_shaking_support_guide/index.md b/docs/docs/guides/advanced/web3_tree_shaking_support_guide/index.md index 4df076a42e7..3ed564f5fb5 100644 --- a/docs/docs/guides/advanced/web3_tree_shaking_support_guide/index.md +++ b/docs/docs/guides/advanced/web3_tree_shaking_support_guide/index.md @@ -31,13 +31,13 @@ For further information about `sideEffects` see [webpack docs](https://webpack.j For example, if you need `web.eth`: ```ts -import Web3Eth from 'web3-eth'; +import Web3Eth from '@etn-sc/web3-eth'; ``` If you only need a few functions from `web3-utils`: ```ts -import { numberToHex, hexToNumber } from 'web3-utils'; +import { numberToHex, hexToNumber } from '@etn-sc/web3-utils'; ``` You can find an example app with tree shaking [here](https://github.com/ChainSafe/web3js-example-react-app). diff --git a/docs/docs/guides/basics/eth.md b/docs/docs/guides/basics/eth.md index 51d38c67bb9..ce525893dd2 100644 --- a/docs/docs/guides/basics/eth.md +++ b/docs/docs/guides/basics/eth.md @@ -65,7 +65,7 @@ Note that we are installing the latest version of 4.x, at the time of this tutor Next, create a new file called `index.ts` in your project directory and add the following code to it: ```javascript -const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from 'web3'`) +const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from '@etn-sc/web3'`) // Set up a connection to the Ganache network const web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:7545')); @@ -99,7 +99,7 @@ In the first example, we are going to send a simple value transaction. Create a file named `transaction.ts` and fill it with the following code: ```typescript -const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from 'web3'`) +const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from '@etn-sc/web3'`) const fs = require('fs'); const path = require('path'); @@ -202,7 +202,7 @@ transactionHash { In the next example, we are going to use `estimateGas` function to see the expected gas for contract deployment. (For more on contracts, please see the corresponding tutotial). Create a file named `estimate.ts` and fill it with the following code: ```typescript -import Web3, { ETH_DATA_FORMAT, DEFAULT_RETURN_FORMAT } from 'web3'; +import Web3, { ETH_DATA_FORMAT, DEFAULT_RETURN_FORMAT } from '@etn-sc/web3'; async function estimate() { // abi of our contract @@ -284,7 +284,7 @@ If everything is working correctly, you should see something like the following: In the next example we are going to sign a transaction and use `sendSignedTransaction` to send the signed transaction. Create a file named `sendSigned.ts` and fill it with the following code: ```typescript -import Web3 from 'web3'; +import Web3 from '@etn-sc/web3'; const web3 = new Web3('http://localhost:7545'); //make sure to copy the private key from ganache diff --git a/docs/docs/guides/basics/sign_and_send_tx/local_wallet.md b/docs/docs/guides/basics/sign_and_send_tx/local_wallet.md index 4637f539b67..d5c891e3a59 100644 --- a/docs/docs/guides/basics/sign_and_send_tx/local_wallet.md +++ b/docs/docs/guides/basics/sign_and_send_tx/local_wallet.md @@ -11,7 +11,7 @@ The simplest way to sign and send transactions is using a local wallet: ```ts // First step: initialize `web3` instance -import Web3 from 'web3'; +import Web3 from '@etn-sc/web3'; const web3 = new Web3(/* PROVIDER*/); // Second step: add an account to wallet @@ -45,7 +45,7 @@ List of references: ```ts // First step: initialize `web3` instance -import Web3 from 'web3'; +import Web3 from '@etn-sc/web3'; const web3 = new Web3(/* PROVIDER*/); // Second step: add an account to wallet diff --git a/docs/docs/guides/basics/sign_and_send_tx/wallet_of_eth_node.md b/docs/docs/guides/basics/sign_and_send_tx/wallet_of_eth_node.md index f53d412a11e..f6b8ad630c2 100644 --- a/docs/docs/guides/basics/sign_and_send_tx/wallet_of_eth_node.md +++ b/docs/docs/guides/basics/sign_and_send_tx/wallet_of_eth_node.md @@ -11,7 +11,7 @@ If Ethereum node has unlocked account in its wallet you can send transaction wit ```ts // First step: initialize web3 instance -import Web3 from 'web3'; +import Web3 from '@etn-sc/web3'; const web3 = new Web3(/* PROVIDER*/); // Second step: add an account to the Ethereum node and unlock it @@ -54,7 +54,7 @@ List of references: ```ts // First step: initialize web3 instance -import Web3 from 'web3'; +import Web3 from '@etn-sc/web3'; const web3 = new Web3(/* PROVIDER*/); // Second step: add an account to the Ethereum node and unlock it diff --git a/docs/docs/guides/smart_contracts/deploying_and_interacting_with_smart_contracts.md b/docs/docs/guides/smart_contracts/deploying_and_interacting_with_smart_contracts.md index f6c1353cd37..e1f81e18da4 100644 --- a/docs/docs/guides/smart_contracts/deploying_and_interacting_with_smart_contracts.md +++ b/docs/docs/guides/smart_contracts/deploying_and_interacting_with_smart_contracts.md @@ -179,7 +179,7 @@ Note that we are installing the latest version of 4.x, at the time of this tutor Next, create a new file called `index.js` in your project directory and add the following code to it: ```javascript -const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from 'web3'`) +const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from '@etn-sc/web3'`) // Set up a connection to the Ganache network const web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:7545')); @@ -214,7 +214,7 @@ Create a file named `deploy.js` and fill it with the following code: ```javascript // For simplicity we use `web3` package here. However, if you are concerned with the size, // you may import individual packages like 'web3-eth', 'web3-eth-contract' and 'web3-providers-http'. -const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from 'web3'`) +const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from '@etn-sc/web3'`) const fs = require('fs'); const path = require('path'); @@ -289,7 +289,7 @@ In this step, we will use web3.js to interact with the smart contract on the Gan Create a file named `interact.js` and fill it with the following code: ```javascript -const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from 'web3'`) +const { Web3 } = require('web3'); // web3.js has native ESM builds and (`import Web3 from '@etn-sc/web3'`) const fs = require('fs'); const path = require('path'); @@ -369,7 +369,7 @@ Here are examples: ```typescript // Configuring Web3Context with `contractDataInputFill` -import { Web3Context } from 'web3-core'; +import { Web3Context } from '@etn-sc/web3-core'; const expectedProvider = 'http://127.0.0.1:8545'; const web3Context = new Web3Context({ diff --git a/docs/docs/guides/smart_contracts/infer_contract_types_guide/index.md b/docs/docs/guides/smart_contracts/infer_contract_types_guide/index.md index c6051b7bd41..52afef52827 100644 --- a/docs/docs/guides/smart_contracts/infer_contract_types_guide/index.md +++ b/docs/docs/guides/smart_contracts/infer_contract_types_guide/index.md @@ -11,7 +11,7 @@ Before we dive into the problem, let's take a quick look at the problem. Web3.js Web3.js uses ABI type to dynamically load available methods and events but Typescript currently [doesn't support loading JSON as const](https://github.com/microsoft/TypeScript/issues/32063). If you go to the [Playground Link](https://www.typescriptlang.org/play?#code/MYewdgzgLgBAhgIwJYwLwwNoCga5gbxz1wCIkwAHAVyghIC5MjjdCWWywoBTAJzDgAbACoBPCtwYwS0XuQDmJADTN20gQFtJjEpu4B9ZavYko47dNkKSxvAF8VagreKce-IWIlSZUOWEVHJ3U4LR8IUQ0EEEFDIKdTc3C-axcYO1sAXXi8XzgeAFkaRCRBJDMfMHAKOFFEQUkc0jNvHVBIPypgKBBeG2IHVTYOOCqwSJAqOkYAMyEIbibpcmpaKWwnYYTyABNuAA9uHalOxbTScncBESSdOB2d3m4IOiXXPR8QAHcwPiNg6QtCwke6PZ50NKDTbnZZgPaHY6MU5vXKXPjXLzA0FPF7-YK6ULAiASOF-FHNW7SbHg-pqKFqLZqTjwo5SOaCBbk2FXTyUkhUS4AJgArAA2PEJD46ABuQiojRhiVa0gFXBF4shWSWBLCOgAghQKLwQLLBBLckCfNxpdwuLTcPTWLYQWMJlM2fMziYVjRpkxoQDmQdWUjePKuW50bzlSCHjjXoqpdIZsaNOaTJa7nGaZCUYzvaSEScw178WiPDcY9TcRGk6YQOmOJmqdncbm0vmOLtg4iYOzOYryxi+aqoOrG+9CT5TfKJxaR0KxfaWBl2NlnXXhLxRhAZmTnc2SNbbVBl47nAXVn6NgzB1wo5Wsa2E4G699fn0I4fqxCnOfiJ2rhDtGT5gjWiZTjoxK2nsn6Kt+z7LgMWobpBVKCII3yjMAComJMUBXusHZ3jyj4+KO461mhJBzhSMYUUumprtq0D5NwRRQCUZQVDKSDcF8jZKsCMxUGA3RIOAZ45J2nCEYwN7sIBqL3hWmI+D+tEhLqlgkrBmlCepiHtgGZYqcO9GLuKVHaSCGiTHaX4LmqjF-ihJh1nAhrGjagn4XJ-q3oGwFkTo0QxPpdb6YeYVmkxLDriYrGFMUyDcaIlTVLU9S4U2fIiWJUASWAUlDM6PprPJxFBWZIGGWBL74h5wCgKJp6OVWRmucxqE2QgQjYdwADyMy+TQ-kKSwSkXDVIUqpZEXUVFTlji5dJuRwSXsSlpTlOlvH8YJh75eJkmqOeMnldeCUcHWezAEgGjzKNBG+kRJnbDNak6KOAAcC02UtFlcH9cXENdribRxXG7dOfECdqR2iSdxVndJZWUK9lXvUywVfS29X-USun7oGCEE8ZgWmaReP8vN1lElQCB+HA3RHAAanKOUJIeDEal18Xard3DAE8cALHqGFYWJXO5H5mMBYpJEPjTMWEz4gPAqroN4ODuSQ9taUZZQWUIA0h15UjhWnQMaOXvLE0AUrql8hp9PhMTcGky7nV0nmTvmcCvNq1mew7Bzgizu1gfzdruC66QdbkCL3Bi9wEuYV8A3PeNVVU8rfKq27Ogaz4Wv82DLGcclnGpTDOhjDUdSmzLdHCZbRUlY7dsVZg8dacCHzanLPcO3gU3cvnMZWAEwfSCXUEpDPscwH3eTV9DPHSNKcPmzGx1WyjNuld3V2C9RERROFQ9jfbucfdTfLT4EEEA1HyT+Ioy+r-rNc7ZvJDbwOgjC2BUO6o2Pl2DGI9V51h6JxQQABlKghpBDpWvi9Eed8cafWWpRF+wJ55zWcnzNa3VEpVy2r-Q2+14YHhAcjTuY90Y52xgWB+HUCZF0BA2N+Id4xIXsH7aq7Do7ENnrZeybV4K4NWuwVcAserAmZpAPcnsODD2vFgthk9NYgCvvg9WvDpBl1IQo8hbEoa13-g3E2ZtgF73btbQRECgJQM0awyBIi6r8K4SQFMIA0xGNjOTP8Qi87Ow4T4gxOgeiEOCfwimithE6PInTaJVI7KtTiUHL+Z8bLKN3HwAAYqmbOt8PGuK8aFPRZpfFxJMXI9aEMKGWL-ntdQmUm52LoQ40BTiHREEyPACAMB2jQAANxAA) and choose ".d.ts" you can check type difference with and without `as const`. ```typescript -import { Contract, Web3 } from 'web3'; +import { Contract, Web3 } from '@etn-sc/web3'; import ERC20 from './node_modules/@openzeppelin/contracts/build/contracts/ERC20.json'; (async function () { @@ -100,7 +100,7 @@ and run the script with `node -r ts-node/register