This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Init web3-test-utils Package
#5426
Closed
Closed
Changes from 4 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
9e5834f
Init web3-test-utils and realted errors
Spacesai1or 95f4d92
WIP test utils
Spacesai1or bb45fa7
Remove web3-eth and web3-eth-accounts dep from web3-test-utils
Spacesai1or 56d0609
Add web3-test-utils dep to web3-eth-accounts
Spacesai1or 17193ae
WIP refactors for web3_context.ts
Spacesai1or 71ba344
WIP test utils
Spacesai1or 6e0210e
WIP call.test.ts test-util refactor
Spacesai1or a29a138
Init web3-eth-transaction-utils
Spacesai1or 548fa33
Init web3-rpc-methods
Spacesai1or 80915f7
Add web3-eth-transaction-utils dependency to web3
Spacesai1or 135570f
Update privateKey parameter type for TransactionBuilder type in web3-…
Spacesai1or 4b23a08
Remove transaction related util methods (replaced with web3-eth-trans…
Spacesai1or 2f4d042
Move eth_execution_api to web3-types
Spacesai1or 68c0552
Move eth_personal_api to web3-types
Spacesai1or 8b44abd
Update imports for decode_signed_transaction
Spacesai1or 37e3c76
Remove old transaction util exports in web3-eth
Spacesai1or 0116706
Replace rpc_methods.ts with web3-rpc-methods in web3-eth
Spacesai1or 85b237b
Update formatTransaction import in web3-eth
Spacesai1or 293e3fd
Add web3-eth-transaction-utils and web3-rpc-methods dependencies to w…
Spacesai1or 90aada4
Update imports in web3-eth-ens
Spacesai1or 32422a2
Remove types export in web3-eth-personal
Spacesai1or b776fa3
Update imports in web3-eth-personal
Spacesai1or b4053d5
Remove rpc_methods from web3-eth-personal (replaced via web3-rpc-meth…
Spacesai1or baaeb13
Update imported methods in web3-eth-personal's rpc_method_wrappers
Spacesai1or be3aeea
Remove types.ts in web3-eth-personal
Spacesai1or 2d69bb6
Add web3-eth-transaction-utils and web3-rpc-methods dependencies to w…
Spacesai1or 32a8a7c
Remove rpcMethods and Web3NetApi exports in web3-net
Spacesai1or b46f0fb
Update import in web3-net
Spacesai1or 17be1a6
Add web3-rpc-methods dependency to web3-net
Spacesai1or 2fbc23d
Remove web3_net_api.ts in web3-net
Spacesai1or 4a64608
Add web3-rpc-methods dependency to web3-test-utils
Spacesai1or 0d1c8b1
Move Web3EthExecutionAPI to web3-types
Spacesai1or 4787590
Move Web3NetAPI to web3-types
Spacesai1or fc0197c
Move eth_execution_api within web3-types package
Spacesai1or 7ff2d90
Update web3-types exports
Spacesai1or 7198140
Init privateKeyToAddress method signature type
Spacesai1or eb4f2cd
Update import for EthExecutionAPI in web3-types
Spacesai1or e7943a9
Init web3_eth_schemas.ts in web3-types
Spacesai1or 7aa5797
Remove rpc_methods.ts in web3-net
Spacesai1or 4534bea
Update imports in web3-net
Spacesai1or c5e3887
Init use of web3-rpc-methods in web3-test-utils
Spacesai1or 69fd64d
Correct types in wait_for_transaction_receipt.ts in web3-eth
Spacesai1or 5b5936b
Update import for getBlockByNumber in web3-eth watch_transaction_for_…
Spacesai1or 833744d
Update imports for rpc_method_wrappers.ts in web3-eth
Spacesai1or 1291e52
Update imports for web3_eth.ts
Spacesai1or File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /* | ||
| This file is part of web3.js. | ||
|
|
||
| web3.js is free software: you can redistribute it and/or modify | ||
| it under the terms of the GNU Lesser General Public License as published by | ||
| the Free Software Foundation, either version 3 of the License, or | ||
| (at your option) any later version. | ||
|
|
||
| web3.js is distributed in the hope that it will be useful, | ||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| GNU Lesser General Public License for more details. | ||
|
|
||
| You should have received a copy of the GNU Lesser General Public License | ||
| along with web3.js. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
| /* eslint-disable max-classes-per-file */ | ||
| import { | ||
| ERR_PROVIDER_CONNECTION_NOT_CLOSEABLE, | ||
| ERR_PROVIDER_CONNECTION_NOT_WAITABLE, | ||
| ERR_WAIT_FOR_OPEN_CONNECTION_TIMEOUT, | ||
| } from '../error_codes'; | ||
| import { Web3Error } from '../web3_error_base'; | ||
|
|
||
| export class WaitForOpenConnectionTimeoutError extends Web3Error { | ||
| public code = ERR_WAIT_FOR_OPEN_CONNECTION_TIMEOUT; | ||
| public constructor() { | ||
| super('Maximum number of attempts exceeded'); | ||
| } | ||
| } | ||
|
|
||
| export class ProviderConnectionNotWaitableError extends Web3Error { | ||
| public code = ERR_PROVIDER_CONNECTION_NOT_WAITABLE; | ||
| public constructor() { | ||
| super('Cannot wait on open connection for provider'); | ||
| } | ||
| } | ||
|
|
||
| export class ProviderConnectionNotCloseableError extends Web3Error { | ||
| public code = ERR_PROVIDER_CONNECTION_NOT_CLOSEABLE; | ||
| public constructor() { | ||
| super('Cannot close open connection for provider'); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,8 @@ | |
| "jest-when": "^3.5.1", | ||
| "prettier": "^2.7.1", | ||
| "ts-jest": "^28.0.7", | ||
| "typescript": "^4.7.4" | ||
| "typescript": "^4.7.4", | ||
| "web3-test-utils": "0.1.0-alpha.0" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will create cyclic dependency? as testing utils will use accounts pkg for account creation. |
||
| }, | ||
| "dependencies": { | ||
| "@ethereumjs/tx": "^3.5.2", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,8 @@ | |
| "typescript": "^4.7.4", | ||
| "web3-eth-abi": "^4.0.1-alpha.0", | ||
| "web3-eth-accounts": "^4.0.1-alpha.0", | ||
| "web3-providers-http": "^4.0.1-alpha.0" | ||
| "web3-providers-http": "^4.0.1-alpha.0", | ||
| "web3-test-utils": "0.1.0-alpha.0" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here, cyclic dependency question? |
||
| }, | ||
| "dependencies": { | ||
| "@ethereumjs/common": "^2.6.5", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its for local debugging so should be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this PR is still a draft and not ready for review