Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add @ethereumjs/tx dependency * Update Web3BaseProvider to SupportedProviders for Web3Eth constructor * WIP eth-tx * Add support for undefined values for convertToValidType * Remove unused Web3BaseProvider * WIP eth-tx utils * Export privateKeyToAddress * Add web3-eth-accounts dependency * WIP web3-eth-tx util methods * Replace inline errors with error constructors * Change types for transaction r and s properties. Correct hardforks in detectTransactionType * Init formatTransaction tests and fixture * Init detectTransactionType and fixture * Add more descriptive error messages * Logic fixes for validateTransactionForSigning * Init validateTransactionForSigning tests and fixtures * Add esModuleInterop: true to tsconfig * Small bug fixes and added TODOs * Add parent describe to detect_transaction_type test * Add parent describe to format_transaction test * Add web3-providers-http as dev dependency for tests * Init populate_transaction tests * Move types from eth_tx.ts to types.ts * Remove TODOs * Add missing , * Remove TODO * Remove TODO * Fix transaction type import issues * Update convertToValidType test data for undefined * Update override method tests * Update packages/web3-eth/src/eth_tx.ts Co-authored-by: jdevcs <86780488+jdevcs@users.noreply.github.com> * Move getBlock to after type check for populateTransaction * Replace N/A with name of error for error.msg * Assign formattedTransaction type Transaction<ReturnType> * convertToValidType now throws error for value === undefined * NumberType extends Numbers * Transaction type related changes * Refactor DesiredType logic * Convert to deep copy for formatTransaction method * skip override method test - needs to be refactored. General formatting * Skip override method test - needs to be refactored. Set input.type > 0x7f * Refactor formatTransaction * Add error codes to web3-eth errors * Refactor validateGate if statements into readable consts * Update comment * Add link to error message from 1.x * Fix bug with is gas consts in validateGas * Init InvalidConvertibleValueError * Replace error with InvalidConvertibleValueError * Update tests for formatting undefined * Update expected errors for validateGas tests * No longer default tx.type if undefined * Refactor detectTransactionType * Fix type error for return in detectTransactionType * Init rpc_method_wrappers.ts * Remove Web3Eth import * Refactor use of web3Context.defaults * Restore Formatted transaction types * Init web3_rpc_method_wrappers tests * Refactor web3_eth_methods_with_parameters test * Replace if X === undefined checks with ? * Un-export consts that aren't used * Add defaultTransactionType and defaultMaxPriorityFeePerGas * Update defaults for chain and hardfork to mainnet and london * Update to use web3Context.default chain and hardfork. Init tests for defaults * Update test to account for added defaults * Refactor validateGas to use helper methods * remove TODO * Init error TransactionGasMismatchError * Fix tests and refactor transaction validator helper methods * Move validation methods to validation.ts * Add input to Transaction type * Add @ethereumjs/common dependency * yarn format * Remove null for defaultTransactionType * Add default for defaultTransactionType * Update default for defaultTransactionType * Bug fixes, refactors, and init prepareTransactionForSigning and tests * Remove unused test code * revert transaction data and value to default to 0x * Fix failing populate_transaction tests * Add defaultNetworkId to web3_config * Add TODO for failing prepare_transaction_for_signing test * Remove TODO * Init TransactionDataAndInputError * Add else if to populateTransaction - data * Refactor populateTransaction - chainId * Comment out unused ifs * Remove populateTransaction - gas * Remove populateTransaction - hexTxType * Replace use of ValidReturnTypes[ValidTypes.HexString] with HexString * Remove toHex import * Remove | null for Web3ConfigOptions defaultChain and defaultHardfork * Refactor getEthereumjsTransactionOptions * Remove no longer needed populateTransaction - gas test * Update packages/web3-eth/src/validation.ts * Remove unnecessary rpc method wrappers * Web3Eth now extends Web3Context instead of instantiating it * Init getPendingTransactions * Init requestAccounts * Add EIP-1102 as a comment for requestAccounts * Init getChainId * Init getProof * Init Web3EthExecutionAPI * Fix imports for AccountObject in fixtures * Add formatting to getPendingTransactions. Move formatTransaction to seperate file * Add TODO to investigate transaction.data * Add formatting to getChainId response * Init getNodeInfo * Revert esModuleInterop change * Combine networkId and chainId if statements * yarn format * Add Partial to type of transaction for eth_sendTransaction * Init transactionReceiptPollingInterval and transactionConfirmationPollingInterval * Add TODO and Partial to transaction type for sendTransaction * WIP sendTransaction and PromiEvent integration * Add eslint-disable-next-line * Add eslint-disable-next-line * Move TransactionEvents * eslint fixes * Update sendSignedTransaction to use PromiEvent * Init signTransaction * Refactor TransactionCall * Comment out validation for call * Init TransactionCall type for web3-eth types * Remove as BaseTransaction from isTransactionCall * Implement call for rpc_method_wrappers * Uncomment sendTransaction, signTransaction, and call * ✨ Add skeleton for the web3-eth-personal * 🎨 Add initial structure * 🎨 Update web3-eth packageto export utility functions * ✨ Add eth-personal api implementation * ✅ Add unit tests for web3-eth-personal * Apply suggestions from code review Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com> * 🎨 Update the code as per feebdack Co-authored-by: Wyatt Barnes <me@wyatt.email> Co-authored-by: jdevcs <86780488+jdevcs@users.noreply.github.com>
- Loading branch information