hardhat 2.20.0 → 2.21.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/internal/core/jsonrpc/types/input/blockTag.d.ts +3 -3
- package/internal/core/jsonrpc/types/input/filterRequest.d.ts +6 -6
- package/internal/core/providers/construction.d.ts.map +1 -1
- package/internal/core/providers/construction.js +28 -4
- package/internal/core/providers/construction.js.map +1 -1
- package/internal/core/providers/http.d.ts +2 -0
- package/internal/core/providers/http.d.ts.map +1 -1
- package/internal/core/providers/http.js +2 -1
- package/internal/core/providers/http.js.map +1 -1
- package/internal/core/runtime-environment.d.ts.map +1 -1
- package/internal/core/runtime-environment.js.map +1 -1
- package/internal/hardhat-network/jsonrpc/client.d.ts +0 -2
- package/internal/hardhat-network/jsonrpc/client.d.ts.map +1 -1
- package/internal/hardhat-network/jsonrpc/client.js +0 -16
- package/internal/hardhat-network/jsonrpc/client.js.map +1 -1
- package/internal/hardhat-network/jsonrpc/handler.js +9 -1
- package/internal/hardhat-network/jsonrpc/handler.js.map +1 -1
- package/internal/hardhat-network/provider/BlockchainData.d.ts +5 -5
- package/internal/hardhat-network/provider/BlockchainData.d.ts.map +1 -1
- package/internal/hardhat-network/provider/BlockchainData.js +10 -10
- package/internal/hardhat-network/provider/BlockchainData.js.map +1 -1
- package/internal/hardhat-network/provider/HardhatBlockchain.d.ts +0 -7
- package/internal/hardhat-network/provider/HardhatBlockchain.d.ts.map +1 -1
- package/internal/hardhat-network/provider/HardhatBlockchain.js +2 -14
- package/internal/hardhat-network/provider/HardhatBlockchain.js.map +1 -1
- package/internal/hardhat-network/provider/TxPool.d.ts +3 -2
- package/internal/hardhat-network/provider/TxPool.d.ts.map +1 -1
- package/internal/hardhat-network/provider/TxPool.js +16 -16
- package/internal/hardhat-network/provider/TxPool.js.map +1 -1
- package/internal/hardhat-network/provider/ethereumjs-workarounds.js +1 -1
- package/internal/hardhat-network/provider/ethereumjs-workarounds.js.map +1 -1
- package/internal/hardhat-network/provider/filter.d.ts +6 -5
- package/internal/hardhat-network/provider/filter.d.ts.map +1 -1
- package/internal/hardhat-network/provider/filter.js +2 -2
- package/internal/hardhat-network/provider/filter.js.map +1 -1
- package/internal/hardhat-network/provider/fork/ForkBlockchain.d.ts +0 -7
- package/internal/hardhat-network/provider/fork/ForkBlockchain.d.ts.map +1 -1
- package/internal/hardhat-network/provider/fork/ForkBlockchain.js +4 -21
- package/internal/hardhat-network/provider/fork/ForkBlockchain.js.map +1 -1
- package/internal/hardhat-network/provider/fork/ForkStateManager.d.ts +13 -19
- package/internal/hardhat-network/provider/fork/ForkStateManager.d.ts.map +1 -1
- package/internal/hardhat-network/provider/fork/ForkStateManager.js +61 -59
- package/internal/hardhat-network/provider/fork/ForkStateManager.js.map +1 -1
- package/internal/hardhat-network/provider/fork/rpcToBlockData.d.ts.map +1 -1
- package/internal/hardhat-network/provider/fork/rpcToBlockData.js +0 -3
- package/internal/hardhat-network/provider/fork/rpcToBlockData.js.map +1 -1
- package/internal/hardhat-network/provider/fork/rpcToTxData.d.ts +2 -2
- package/internal/hardhat-network/provider/fork/rpcToTxData.d.ts.map +1 -1
- package/internal/hardhat-network/provider/fork/rpcToTxData.js +1 -1
- package/internal/hardhat-network/provider/fork/rpcToTxData.js.map +1 -1
- package/internal/hardhat-network/provider/modules/base.js +4 -4
- package/internal/hardhat-network/provider/modules/base.js.map +1 -1
- package/internal/hardhat-network/provider/modules/eth.d.ts.map +1 -1
- package/internal/hardhat-network/provider/modules/eth.js +9 -16
- package/internal/hardhat-network/provider/modules/eth.js.map +1 -1
- package/internal/hardhat-network/provider/modules/logger.d.ts +6 -84
- package/internal/hardhat-network/provider/modules/logger.d.ts.map +1 -1
- package/internal/hardhat-network/provider/modules/logger.js +3 -530
- package/internal/hardhat-network/provider/modules/logger.js.map +1 -1
- package/internal/hardhat-network/provider/node-types.d.ts +2 -65
- package/internal/hardhat-network/provider/node-types.d.ts.map +1 -1
- package/internal/hardhat-network/provider/node-types.js +0 -5
- package/internal/hardhat-network/provider/node-types.js.map +1 -1
- package/internal/hardhat-network/provider/node.d.ts +2 -6
- package/internal/hardhat-network/provider/node.d.ts.map +1 -1
- package/internal/hardhat-network/provider/node.js +79 -148
- package/internal/hardhat-network/provider/node.js.map +1 -1
- package/internal/hardhat-network/provider/output.d.ts +0 -14
- package/internal/hardhat-network/provider/output.d.ts.map +1 -1
- package/internal/hardhat-network/provider/output.js +0 -264
- package/internal/hardhat-network/provider/output.js.map +1 -1
- package/internal/hardhat-network/provider/provider.d.ts +26 -25
- package/internal/hardhat-network/provider/provider.d.ts.map +1 -1
- package/internal/hardhat-network/provider/provider.js +342 -186
- package/internal/hardhat-network/provider/provider.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.d.ts +10 -8
- package/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.d.ts.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.js +9 -9
- package/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.d.ts +10 -8
- package/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.d.ts.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.js +9 -9
- package/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderTransaction.d.ts +10 -9
- package/internal/hardhat-network/provider/transactions/FakeSenderTransaction.d.ts.map +1 -1
- package/internal/hardhat-network/provider/transactions/FakeSenderTransaction.js +7 -6
- package/internal/hardhat-network/provider/transactions/FakeSenderTransaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.d.ts +6 -5
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.d.ts.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.d.ts +5 -4
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.d.ts.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.js +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.d.ts +8 -7
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.d.ts.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.js +2 -2
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.js.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.d.ts +8 -7
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.d.ts.map +1 -1
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.js +2 -2
- package/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.js.map +1 -1
- package/internal/hardhat-network/provider/types/HardhatBlockchainInterface.d.ts +5 -4
- package/internal/hardhat-network/provider/types/HardhatBlockchainInterface.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/convertToEdr.d.ts +14 -0
- package/internal/hardhat-network/provider/utils/convertToEdr.d.ts.map +1 -0
- package/internal/hardhat-network/provider/utils/convertToEdr.js +191 -0
- package/internal/hardhat-network/provider/utils/convertToEdr.js.map +1 -0
- package/internal/hardhat-network/provider/utils/getCurrentTimestamp.d.ts +0 -1
- package/internal/hardhat-network/provider/utils/getCurrentTimestamp.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/getCurrentTimestamp.js +1 -5
- package/internal/hardhat-network/provider/utils/getCurrentTimestamp.js.map +1 -1
- package/internal/hardhat-network/provider/utils/makeCommon.d.ts +1 -1
- package/internal/hardhat-network/provider/utils/makeCommon.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/makeCommon.js +1 -3
- package/internal/hardhat-network/provider/utils/makeCommon.js.map +1 -1
- package/internal/hardhat-network/provider/utils/makeFakeSignature.d.ts +2 -2
- package/internal/hardhat-network/provider/utils/makeFakeSignature.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/makeFakeSignature.js +1 -15
- package/internal/hardhat-network/provider/utils/makeFakeSignature.js.map +1 -1
- package/internal/hardhat-network/provider/utils/makeForkClient.d.ts +10 -1
- package/internal/hardhat-network/provider/utils/makeForkClient.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/makeForkClient.js +38 -18
- package/internal/hardhat-network/provider/utils/makeForkClient.js.map +1 -1
- package/internal/hardhat-network/provider/utils/makeStateTrie.js +2 -2
- package/internal/hardhat-network/provider/utils/makeStateTrie.js.map +1 -1
- package/internal/hardhat-network/provider/utils/putGenesisBlock.d.ts +3 -1
- package/internal/hardhat-network/provider/utils/putGenesisBlock.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/putGenesisBlock.js +2 -6
- package/internal/hardhat-network/provider/utils/putGenesisBlock.js.map +1 -1
- package/internal/hardhat-network/provider/utils/random.d.ts +1 -0
- package/internal/hardhat-network/provider/utils/random.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/random.js +7 -1
- package/internal/hardhat-network/provider/utils/random.js.map +1 -1
- package/internal/hardhat-network/provider/utils/reorgs-protection.d.ts +1 -1
- package/internal/hardhat-network/provider/utils/reorgs-protection.d.ts.map +1 -1
- package/internal/hardhat-network/provider/utils/reorgs-protection.js +5 -5
- package/internal/hardhat-network/provider/utils/reorgs-protection.js.map +1 -1
- package/internal/hardhat-network/provider/vm/exit.d.ts +22 -0
- package/internal/hardhat-network/provider/vm/exit.d.ts.map +1 -0
- package/internal/hardhat-network/provider/vm/exit.js +93 -0
- package/internal/hardhat-network/provider/vm/exit.js.map +1 -0
- package/internal/hardhat-network/provider/vm/minimal-vm.d.ts +29 -0
- package/internal/hardhat-network/provider/vm/minimal-vm.d.ts.map +1 -0
- package/internal/hardhat-network/provider/vm/minimal-vm.js +46 -0
- package/internal/hardhat-network/provider/vm/minimal-vm.js.map +1 -0
- package/internal/hardhat-network/provider/vm/proxy-vm.d.ts +36 -0
- package/internal/hardhat-network/provider/vm/proxy-vm.d.ts.map +1 -0
- package/internal/hardhat-network/provider/vm/proxy-vm.js +73 -0
- package/internal/hardhat-network/provider/vm/proxy-vm.js.map +1 -0
- package/internal/hardhat-network/provider/vm/types.d.ts +27 -0
- package/internal/hardhat-network/provider/vm/types.d.ts.map +1 -0
- package/internal/hardhat-network/provider/vm/types.js +3 -0
- package/internal/hardhat-network/provider/vm/types.js.map +1 -0
- package/internal/hardhat-network/stack-traces/consoleLogger.d.ts +6 -0
- package/internal/hardhat-network/stack-traces/consoleLogger.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/consoleLogger.js +33 -16
- package/internal/hardhat-network/stack-traces/consoleLogger.js.map +1 -1
- package/internal/hardhat-network/stack-traces/contracts-identifier.d.ts +1 -2
- package/internal/hardhat-network/stack-traces/contracts-identifier.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/contracts-identifier.js +6 -7
- package/internal/hardhat-network/stack-traces/contracts-identifier.js.map +1 -1
- package/internal/hardhat-network/stack-traces/debug.js +6 -6
- package/internal/hardhat-network/stack-traces/debug.js.map +1 -1
- package/internal/hardhat-network/stack-traces/error-inferrer.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/error-inferrer.js +13 -7
- package/internal/hardhat-network/stack-traces/error-inferrer.js.map +1 -1
- package/internal/hardhat-network/stack-traces/message-trace.d.ts +8 -3
- package/internal/hardhat-network/stack-traces/message-trace.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/message-trace.js +22 -1
- package/internal/hardhat-network/stack-traces/message-trace.js.map +1 -1
- package/internal/hardhat-network/stack-traces/model.d.ts +8 -0
- package/internal/hardhat-network/stack-traces/model.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/model.js +52 -0
- package/internal/hardhat-network/stack-traces/model.js.map +1 -1
- package/internal/hardhat-network/stack-traces/opcodes.d.ts +1 -0
- package/internal/hardhat-network/stack-traces/opcodes.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/opcodes.js +5 -1
- package/internal/hardhat-network/stack-traces/opcodes.js.map +1 -1
- package/internal/hardhat-network/stack-traces/solidity-errors.js +2 -2
- package/internal/hardhat-network/stack-traces/solidity-errors.js.map +1 -1
- package/internal/hardhat-network/stack-traces/solidityTracer.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/solidityTracer.js +5 -5
- package/internal/hardhat-network/stack-traces/solidityTracer.js.map +1 -1
- package/internal/hardhat-network/stack-traces/vm-debug-tracer.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/vm-debug-tracer.js +28 -34
- package/internal/hardhat-network/stack-traces/vm-debug-tracer.js.map +1 -1
- package/internal/hardhat-network/stack-traces/vm-trace-decoder.d.ts +7 -0
- package/internal/hardhat-network/stack-traces/vm-trace-decoder.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/vm-trace-decoder.js +69 -2
- package/internal/hardhat-network/stack-traces/vm-trace-decoder.js.map +1 -1
- package/internal/hardhat-network/stack-traces/vm-tracer.d.ts +7 -12
- package/internal/hardhat-network/stack-traces/vm-tracer.d.ts.map +1 -1
- package/internal/hardhat-network/stack-traces/vm-tracer.js +46 -65
- package/internal/hardhat-network/stack-traces/vm-tracer.js.map +1 -1
- package/internal/util/date.d.ts +1 -0
- package/internal/util/date.d.ts.map +1 -1
- package/internal/util/date.js +5 -1
- package/internal/util/date.js.map +1 -1
- package/internal/util/hardforks.d.ts +2 -0
- package/internal/util/hardforks.d.ts.map +1 -1
- package/internal/util/hardforks.js +27 -1
- package/internal/util/hardforks.js.map +1 -1
- package/package.json +18 -16
- package/src/internal/core/providers/construction.ts +7 -9
- package/src/internal/core/providers/http.ts +3 -1
- package/src/internal/core/runtime-environment.ts +2 -1
- package/src/internal/hardhat-network/jsonrpc/client.ts +1 -28
- package/src/internal/hardhat-network/jsonrpc/handler.ts +9 -1
- package/src/internal/hardhat-network/provider/modules/logger.ts +6 -801
- package/src/internal/hardhat-network/provider/node-types.ts +2 -89
- package/src/internal/hardhat-network/provider/output.ts +0 -352
- package/src/internal/hardhat-network/provider/provider.ts +482 -263
- package/src/internal/hardhat-network/provider/utils/convertToEdr.ts +228 -0
- package/src/internal/hardhat-network/provider/utils/getCurrentTimestamp.ts +0 -4
- package/src/internal/hardhat-network/provider/utils/makeCommon.ts +1 -12
- package/src/internal/hardhat-network/provider/utils/makeForkClient.ts +63 -24
- package/src/internal/hardhat-network/provider/utils/random.ts +8 -1
- package/src/internal/hardhat-network/provider/utils/reorgs-protection.ts +5 -5
- package/src/internal/hardhat-network/provider/vm/exit.ts +101 -0
- package/src/internal/hardhat-network/provider/vm/minimal-vm.ts +101 -0
- package/src/internal/hardhat-network/provider/vm/types.ts +31 -0
- package/src/internal/hardhat-network/stack-traces/consoleLogger.ts +40 -21
- package/src/internal/hardhat-network/stack-traces/contracts-identifier.ts +10 -12
- package/src/internal/hardhat-network/stack-traces/debug.ts +6 -6
- package/src/internal/hardhat-network/stack-traces/error-inferrer.ts +15 -8
- package/src/internal/hardhat-network/stack-traces/message-trace.ts +40 -4
- package/src/internal/hardhat-network/stack-traces/model.ts +61 -0
- package/src/internal/hardhat-network/stack-traces/opcodes.ts +4 -0
- package/src/internal/hardhat-network/stack-traces/solidity-errors.ts +2 -2
- package/src/internal/hardhat-network/stack-traces/solidityTracer.ts +6 -5
- package/src/internal/hardhat-network/stack-traces/vm-trace-decoder.ts +113 -4
- package/src/internal/hardhat-network/stack-traces/vm-tracer.ts +67 -95
- package/src/internal/util/date.ts +4 -0
- package/src/internal/util/hardforks.ts +52 -0
- package/src/internal/hardhat-network/provider/BlockchainBase.ts +0 -185
- package/src/internal/hardhat-network/provider/BlockchainData.ts +0 -261
- package/src/internal/hardhat-network/provider/HardhatBlockchain.ts +0 -140
- package/src/internal/hardhat-network/provider/PoolState.ts +0 -48
- package/src/internal/hardhat-network/provider/TransactionQueue.ts +0 -158
- package/src/internal/hardhat-network/provider/TxPool.ts +0 -715
- package/src/internal/hardhat-network/provider/ethereumjs-workarounds.ts +0 -21
- package/src/internal/hardhat-network/provider/filter.ts +0 -142
- package/src/internal/hardhat-network/provider/fork/ForkBlockchain.ts +0 -433
- package/src/internal/hardhat-network/provider/fork/ForkStateManager.ts +0 -480
- package/src/internal/hardhat-network/provider/fork/rpcToBlockData.ts +0 -35
- package/src/internal/hardhat-network/provider/fork/rpcToTxData.ts +0 -44
- package/src/internal/hardhat-network/provider/modules/base.ts +0 -156
- package/src/internal/hardhat-network/provider/modules/debug.ts +0 -104
- package/src/internal/hardhat-network/provider/modules/eth.ts +0 -1781
- package/src/internal/hardhat-network/provider/modules/evm.ts +0 -249
- package/src/internal/hardhat-network/provider/modules/hardhat.ts +0 -481
- package/src/internal/hardhat-network/provider/modules/net.ts +0 -60
- package/src/internal/hardhat-network/provider/modules/personal.ts +0 -40
- package/src/internal/hardhat-network/provider/modules/web3.ts +0 -49
- package/src/internal/hardhat-network/provider/node.ts +0 -2993
- package/src/internal/hardhat-network/provider/transactions/FakeSenderAccessListEIP2930Transaction.ts +0 -226
- package/src/internal/hardhat-network/provider/transactions/FakeSenderEIP1559Transaction.ts +0 -224
- package/src/internal/hardhat-network/provider/transactions/FakeSenderTransaction.ts +0 -216
- package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.ts +0 -143
- package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.ts +0 -144
- package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidTransaction.ts +0 -171
- package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.ts +0 -169
- package/src/internal/hardhat-network/provider/types/HardhatBlockchainInterface.ts +0 -25
- package/src/internal/hardhat-network/provider/utils/makeFakeSignature.ts +0 -60
- package/src/internal/hardhat-network/provider/utils/makeStateTrie.ts +0 -29
- package/src/internal/hardhat-network/provider/utils/putGenesisBlock.ts +0 -61
- package/src/internal/hardhat-network/provider/utils/reorganizeTransactionsLists.ts +0 -45
- package/src/internal/hardhat-network/provider/utils/txMapToArray.ts +0 -7
- package/src/internal/hardhat-network/stack-traces/vm-debug-tracer.ts +0 -630
package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP1559Transaction.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { Common } from "@nomicfoundation/ethereumjs-common";
|
|
2
|
-
import {
|
|
3
|
-
FeeMarketEIP1559Transaction,
|
|
4
|
-
TransactionType,
|
|
5
|
-
TxOptions,
|
|
6
|
-
TxValuesArray,
|
|
7
|
-
} from "@nomicfoundation/ethereumjs-tx";
|
|
8
|
-
import { Address } from "@nomicfoundation/ethereumjs-util";
|
|
9
|
-
|
|
10
|
-
import { FeeMarketEIP1559TxData } from "@nomicfoundation/ethereumjs-tx/src/types";
|
|
11
|
-
import { InternalError } from "../../../core/providers/errors";
|
|
12
|
-
import * as BigIntUtils from "../../../util/bigint";
|
|
13
|
-
|
|
14
|
-
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* This class is like `ReadOnlyValidTransaction` but for EIP-1559 transactions.
|
|
18
|
-
*/
|
|
19
|
-
export class ReadOnlyValidEIP1559Transaction extends FeeMarketEIP1559Transaction {
|
|
20
|
-
public static fromTxData(
|
|
21
|
-
_txData: FeeMarketEIP1559TxData,
|
|
22
|
-
_opts?: TxOptions
|
|
23
|
-
): never {
|
|
24
|
-
throw new InternalError(
|
|
25
|
-
"`fromTxData` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public static fromSerializedTx(
|
|
30
|
-
_serialized: Uint8Array,
|
|
31
|
-
_opts?: TxOptions
|
|
32
|
-
): never {
|
|
33
|
-
throw new InternalError(
|
|
34
|
-
"`fromSerializedTx` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public static fromRlpSerializedTx(
|
|
39
|
-
_serialized: Uint8Array,
|
|
40
|
-
_opts?: TxOptions
|
|
41
|
-
): never {
|
|
42
|
-
throw new InternalError(
|
|
43
|
-
"`fromRlpSerializedTx` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
public static fromValuesArray(
|
|
48
|
-
_values: TxValuesArray[TransactionType.FeeMarketEIP1559],
|
|
49
|
-
_opts?: TxOptions
|
|
50
|
-
): never {
|
|
51
|
-
throw new InternalError(
|
|
52
|
-
"`fromRlpSerializedTx` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public readonly common: Common;
|
|
57
|
-
|
|
58
|
-
private readonly _sender: Address;
|
|
59
|
-
|
|
60
|
-
constructor(sender: Address, data: FeeMarketEIP1559TxData = {}) {
|
|
61
|
-
const fakeCommon = Common.custom(
|
|
62
|
-
{
|
|
63
|
-
chainId: BigIntUtils.fromBigIntLike(data.chainId),
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
hardfork: "london",
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
super(data, {
|
|
71
|
-
freeze: false,
|
|
72
|
-
allowUnlimitedInitCodeSize: true,
|
|
73
|
-
common: fakeCommon,
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
this.common = fakeCommon;
|
|
77
|
-
this._sender = sender;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
public verifySignature(): boolean {
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
public getSenderAddress(): Address {
|
|
85
|
-
return this._sender;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
public sign(): never {
|
|
89
|
-
throw new InternalError(
|
|
90
|
-
"`sign` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public getDataFee(): never {
|
|
95
|
-
throw new InternalError(
|
|
96
|
-
"`getDataFee` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
public getBaseFee(): never {
|
|
101
|
-
throw new InternalError(
|
|
102
|
-
"`getBaseFee` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
public getUpfrontCost(): never {
|
|
107
|
-
throw new InternalError(
|
|
108
|
-
"`getUpfrontCost` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
public validate(stringError?: false): never;
|
|
113
|
-
public validate(stringError: true): never;
|
|
114
|
-
public validate(_stringError: boolean = false): never {
|
|
115
|
-
throw new InternalError(
|
|
116
|
-
"`validate` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
public toCreationAddress(): never {
|
|
121
|
-
throw new InternalError(
|
|
122
|
-
"`toCreationAddress` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
public getSenderPublicKey(): never {
|
|
127
|
-
throw new InternalError(
|
|
128
|
-
"`getSenderPublicKey` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
public getMessageToVerifySignature(): never {
|
|
133
|
-
throw new InternalError(
|
|
134
|
-
"`getMessageToVerifySignature` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
public getMessageToSign(): never {
|
|
139
|
-
throw new InternalError(
|
|
140
|
-
"`getMessageToSign` is not implemented in ReadOnlyValidEIP1559Transaction"
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
}
|
package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidEIP2930Transaction.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { Common } from "@nomicfoundation/ethereumjs-common";
|
|
2
|
-
import {
|
|
3
|
-
AccessListEIP2930Transaction,
|
|
4
|
-
AccessListEIP2930TxData,
|
|
5
|
-
TransactionType,
|
|
6
|
-
TxOptions,
|
|
7
|
-
TxValuesArray,
|
|
8
|
-
} from "@nomicfoundation/ethereumjs-tx";
|
|
9
|
-
import { Address } from "@nomicfoundation/ethereumjs-util";
|
|
10
|
-
|
|
11
|
-
import { InternalError } from "../../../core/providers/errors";
|
|
12
|
-
import * as BigIntUtils from "../../../util/bigint";
|
|
13
|
-
|
|
14
|
-
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* This class is like `ReadOnlyValidTransaction` but for
|
|
18
|
-
* EIP-2930 (access list) transactions.
|
|
19
|
-
*/
|
|
20
|
-
export class ReadOnlyValidEIP2930Transaction extends AccessListEIP2930Transaction {
|
|
21
|
-
public static fromTxData(
|
|
22
|
-
_txData: AccessListEIP2930TxData,
|
|
23
|
-
_opts?: TxOptions
|
|
24
|
-
): never {
|
|
25
|
-
throw new InternalError(
|
|
26
|
-
"`fromTxData` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public static fromSerializedTx(
|
|
31
|
-
_serialized: Uint8Array,
|
|
32
|
-
_opts?: TxOptions
|
|
33
|
-
): never {
|
|
34
|
-
throw new InternalError(
|
|
35
|
-
"`fromSerializedTx` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public static fromRlpSerializedTx(
|
|
40
|
-
_serialized: Uint8Array,
|
|
41
|
-
_opts?: TxOptions
|
|
42
|
-
): never {
|
|
43
|
-
throw new InternalError(
|
|
44
|
-
"`fromRlpSerializedTx` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public static fromValuesArray(
|
|
49
|
-
_values: TxValuesArray[TransactionType.AccessListEIP2930],
|
|
50
|
-
_opts?: TxOptions
|
|
51
|
-
): never {
|
|
52
|
-
throw new InternalError(
|
|
53
|
-
"`fromRlpSerializedTx` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
public readonly common: Common;
|
|
58
|
-
|
|
59
|
-
private readonly _sender: Address;
|
|
60
|
-
|
|
61
|
-
constructor(sender: Address, data: AccessListEIP2930TxData = {}) {
|
|
62
|
-
const fakeCommon = Common.custom(
|
|
63
|
-
{
|
|
64
|
-
chainId: BigIntUtils.fromBigIntLike(data.chainId),
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
hardfork: "berlin",
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
super(data, {
|
|
72
|
-
freeze: false,
|
|
73
|
-
allowUnlimitedInitCodeSize: true,
|
|
74
|
-
common: fakeCommon,
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
this.common = fakeCommon;
|
|
78
|
-
this._sender = sender;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
public verifySignature(): boolean {
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
public getSenderAddress(): Address {
|
|
86
|
-
return this._sender;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
public sign(): never {
|
|
90
|
-
throw new InternalError(
|
|
91
|
-
"`sign` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
public getDataFee(): never {
|
|
96
|
-
throw new InternalError(
|
|
97
|
-
"`getDataFee` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
public getBaseFee(): never {
|
|
102
|
-
throw new InternalError(
|
|
103
|
-
"`getBaseFee` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
public getUpfrontCost(): never {
|
|
108
|
-
throw new InternalError(
|
|
109
|
-
"`getUpfrontCost` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
public validate(stringError?: false): never;
|
|
114
|
-
public validate(stringError: true): never;
|
|
115
|
-
public validate(_stringError: boolean = false): never {
|
|
116
|
-
throw new InternalError(
|
|
117
|
-
"`validate` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
public toCreationAddress(): never {
|
|
122
|
-
throw new InternalError(
|
|
123
|
-
"`toCreationAddress` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
public getSenderPublicKey(): never {
|
|
128
|
-
throw new InternalError(
|
|
129
|
-
"`getSenderPublicKey` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
public getMessageToVerifySignature(): never {
|
|
134
|
-
throw new InternalError(
|
|
135
|
-
"`getMessageToVerifySignature` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
public getMessageToSign(): never {
|
|
140
|
-
throw new InternalError(
|
|
141
|
-
"`getMessageToSign` is not implemented in ReadOnlyValidEIP2930Transaction"
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { Common } from "@nomicfoundation/ethereumjs-common";
|
|
2
|
-
import {
|
|
3
|
-
LegacyTransaction,
|
|
4
|
-
LegacyTxData,
|
|
5
|
-
TxOptions,
|
|
6
|
-
} from "@nomicfoundation/ethereumjs-tx";
|
|
7
|
-
import { Address } from "@nomicfoundation/ethereumjs-util";
|
|
8
|
-
|
|
9
|
-
import { InternalError } from "../../../core/providers/errors";
|
|
10
|
-
|
|
11
|
-
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* This class represents a transaction that is assumed to be valid.
|
|
15
|
-
*
|
|
16
|
-
* This transaction is not meant to be run. It can only be used to read
|
|
17
|
-
* from its values.
|
|
18
|
-
*
|
|
19
|
-
* The transaction's signature is never validated, but assumed to be valid.
|
|
20
|
-
*
|
|
21
|
-
* The sender's private key is never recovered from the signature. Instead,
|
|
22
|
-
* the sender's address is received as parameter.
|
|
23
|
-
*
|
|
24
|
-
* This class doesn't use its Common instance, so there's no need to provide
|
|
25
|
-
* one.
|
|
26
|
-
*/
|
|
27
|
-
export class ReadOnlyValidTransaction extends LegacyTransaction {
|
|
28
|
-
public static fromTxData(_txData: LegacyTxData, _opts?: TxOptions): never {
|
|
29
|
-
throw new InternalError(
|
|
30
|
-
"`fromTxData` is not implemented in ReadOnlyValidTransaction"
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public static fromSerializedTx(
|
|
35
|
-
_serialized: Uint8Array,
|
|
36
|
-
_opts?: TxOptions
|
|
37
|
-
): never {
|
|
38
|
-
throw new InternalError(
|
|
39
|
-
"`fromSerializedTx` is not implemented in ReadOnlyValidTransaction"
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
public static fromRlpSerializedTx(
|
|
44
|
-
_serialized: Uint8Array,
|
|
45
|
-
_opts?: TxOptions
|
|
46
|
-
): never {
|
|
47
|
-
throw new InternalError(
|
|
48
|
-
"`fromRlpSerializedTx` is not implemented in ReadOnlyValidTransaction"
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public static fromValuesArray(
|
|
53
|
-
_values: Uint8Array[],
|
|
54
|
-
_opts?: TxOptions
|
|
55
|
-
): never {
|
|
56
|
-
throw new InternalError(
|
|
57
|
-
"`fromRlpSerializedTx` is not implemented in ReadOnlyValidTransaction"
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public readonly common: Common;
|
|
62
|
-
|
|
63
|
-
private readonly _sender: Address;
|
|
64
|
-
|
|
65
|
-
constructor(sender: Address, data: LegacyTxData = {}) {
|
|
66
|
-
super(data, { freeze: false, allowUnlimitedInitCodeSize: true });
|
|
67
|
-
|
|
68
|
-
this.common = this._getCommon();
|
|
69
|
-
this._sender = sender;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public verifySignature(): boolean {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public getSenderAddress(): Address {
|
|
77
|
-
return this._sender;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
public sign(): never {
|
|
81
|
-
throw new InternalError(
|
|
82
|
-
"`sign` is not implemented in ReadOnlyValidTransaction"
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
public getDataFee(): never {
|
|
87
|
-
throw new InternalError(
|
|
88
|
-
"`getDataFee` is not implemented in ReadOnlyValidTransaction"
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
public getBaseFee(): never {
|
|
93
|
-
throw new InternalError(
|
|
94
|
-
"`getBaseFee` is not implemented in ReadOnlyValidTransaction"
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
public getUpfrontCost(): never {
|
|
99
|
-
throw new InternalError(
|
|
100
|
-
"`getUpfrontCost` is not implemented in ReadOnlyValidTransaction"
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
public validate(_stringError?: false): never;
|
|
105
|
-
public validate(_stringError: true): never;
|
|
106
|
-
public validate(_stringError: boolean = false): never {
|
|
107
|
-
throw new InternalError(
|
|
108
|
-
"`validate` is not implemented in ReadOnlyValidTransaction"
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
public toCreationAddress(): never {
|
|
113
|
-
throw new InternalError(
|
|
114
|
-
"`toCreationAddress` is not implemented in ReadOnlyValidTransaction"
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
public getSenderPublicKey(): never {
|
|
119
|
-
throw new InternalError(
|
|
120
|
-
"`getSenderPublicKey` is not implemented in ReadOnlyValidTransaction"
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
public getMessageToVerifySignature(): never {
|
|
125
|
-
throw new InternalError(
|
|
126
|
-
"`getMessageToVerifySignature` is not implemented in ReadOnlyValidTransaction"
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
public getMessageToSign(): never {
|
|
131
|
-
throw new InternalError(
|
|
132
|
-
"`getMessageToSign` is not implemented in ReadOnlyValidTransaction"
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Override private methods
|
|
138
|
-
|
|
139
|
-
const ReadOnlyValidTransactionPrototype: any =
|
|
140
|
-
ReadOnlyValidTransaction.prototype;
|
|
141
|
-
|
|
142
|
-
ReadOnlyValidTransactionPrototype._validateTxV = function (
|
|
143
|
-
_v: any,
|
|
144
|
-
common: any
|
|
145
|
-
) {
|
|
146
|
-
return this._getCommon(common);
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
ReadOnlyValidTransactionPrototype._signedTxImplementsEIP155 = function () {
|
|
150
|
-
throw new InternalError(
|
|
151
|
-
"`_signedTxImplementsEIP155` is not implemented in ReadOnlyValidTransaction"
|
|
152
|
-
);
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
ReadOnlyValidTransactionPrototype._unsignedTxImplementsEIP155 = function () {
|
|
156
|
-
throw new InternalError(
|
|
157
|
-
"`_unsignedTxImplementsEIP155` is not implemented in ReadOnlyValidTransaction"
|
|
158
|
-
);
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
ReadOnlyValidTransactionPrototype._getMessageToSign = function () {
|
|
162
|
-
throw new InternalError(
|
|
163
|
-
"`_getMessageToSign` is not implemented in ReadOnlyValidTransaction"
|
|
164
|
-
);
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
ReadOnlyValidTransactionPrototype._processSignature = function () {
|
|
168
|
-
throw new InternalError(
|
|
169
|
-
"`_processSignature` is not implemented in ReadOnlyValidTransaction"
|
|
170
|
-
);
|
|
171
|
-
};
|
package/src/internal/hardhat-network/provider/transactions/ReadOnlyValidUnknownTypeTransaction.ts
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { Common } from "@nomicfoundation/ethereumjs-common";
|
|
2
|
-
import {
|
|
3
|
-
LegacyTransaction,
|
|
4
|
-
LegacyTxData,
|
|
5
|
-
TxOptions,
|
|
6
|
-
} from "@nomicfoundation/ethereumjs-tx";
|
|
7
|
-
import { Address } from "@nomicfoundation/ethereumjs-util";
|
|
8
|
-
|
|
9
|
-
import { InternalError } from "../../../core/providers/errors";
|
|
10
|
-
|
|
11
|
-
/* eslint-disable @nomicfoundation/hardhat-internal-rules/only-hardhat-error */
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* This class is like `ReadOnlyValidTransaction` but for
|
|
15
|
-
* a transaction with an unknown tx type.
|
|
16
|
-
*/
|
|
17
|
-
export class ReadOnlyValidUnknownTypeTransaction extends LegacyTransaction {
|
|
18
|
-
public static fromTxData(_txData: LegacyTxData, _opts?: TxOptions): never {
|
|
19
|
-
throw new InternalError(
|
|
20
|
-
"`fromTxData` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public static fromSerializedTx(
|
|
25
|
-
_serialized: Uint8Array,
|
|
26
|
-
_opts?: TxOptions
|
|
27
|
-
): never {
|
|
28
|
-
throw new InternalError(
|
|
29
|
-
"`fromSerializedTx` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public static fromRlpSerializedTx(
|
|
34
|
-
_serialized: Uint8Array,
|
|
35
|
-
_opts?: TxOptions
|
|
36
|
-
): never {
|
|
37
|
-
throw new InternalError(
|
|
38
|
-
"`fromRlpSerializedTx` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public static fromValuesArray(
|
|
43
|
-
_values: Uint8Array[],
|
|
44
|
-
_opts?: TxOptions
|
|
45
|
-
): never {
|
|
46
|
-
throw new InternalError(
|
|
47
|
-
"`fromRlpSerializedTx` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
public readonly common: Common;
|
|
52
|
-
|
|
53
|
-
private readonly _sender: Address;
|
|
54
|
-
private readonly _actualType: number;
|
|
55
|
-
|
|
56
|
-
constructor(sender: Address, type: number, data: LegacyTxData = {}) {
|
|
57
|
-
super(data, { freeze: false, allowUnlimitedInitCodeSize: true });
|
|
58
|
-
|
|
59
|
-
this.common = this._getCommon();
|
|
60
|
-
this._sender = sender;
|
|
61
|
-
this._actualType = type;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public get type(): number {
|
|
65
|
-
return this._actualType;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public verifySignature(): boolean {
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public getSenderAddress(): Address {
|
|
73
|
-
return this._sender;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public sign(): never {
|
|
77
|
-
throw new InternalError(
|
|
78
|
-
"`sign` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
public getDataFee(): never {
|
|
83
|
-
throw new InternalError(
|
|
84
|
-
"`getDataFee` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
public getBaseFee(): never {
|
|
89
|
-
throw new InternalError(
|
|
90
|
-
"`getBaseFee` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public getUpfrontCost(): never {
|
|
95
|
-
throw new InternalError(
|
|
96
|
-
"`getUpfrontCost` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
public validate(_stringError?: false): never;
|
|
101
|
-
public validate(_stringError: true): never;
|
|
102
|
-
public validate(_stringError: boolean = false): never {
|
|
103
|
-
throw new InternalError(
|
|
104
|
-
"`validate` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
public toCreationAddress(): never {
|
|
109
|
-
throw new InternalError(
|
|
110
|
-
"`toCreationAddress` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
public getSenderPublicKey(): never {
|
|
115
|
-
throw new InternalError(
|
|
116
|
-
"`getSenderPublicKey` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
public getMessageToVerifySignature(): never {
|
|
121
|
-
throw new InternalError(
|
|
122
|
-
"`getMessageToVerifySignature` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
public getMessageToSign(): never {
|
|
127
|
-
throw new InternalError(
|
|
128
|
-
"`getMessageToSign` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Override private methods
|
|
134
|
-
|
|
135
|
-
const ReadOnlyValidUnknownTypeTransactionPrototype: any =
|
|
136
|
-
ReadOnlyValidUnknownTypeTransaction.prototype;
|
|
137
|
-
|
|
138
|
-
ReadOnlyValidUnknownTypeTransactionPrototype._validateTxV = function (
|
|
139
|
-
_v: any,
|
|
140
|
-
common: any
|
|
141
|
-
) {
|
|
142
|
-
return this._getCommon(common);
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
ReadOnlyValidUnknownTypeTransactionPrototype._signedTxImplementsEIP155 =
|
|
146
|
-
function () {
|
|
147
|
-
throw new InternalError(
|
|
148
|
-
"`_signedTxImplementsEIP155` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
149
|
-
);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
ReadOnlyValidUnknownTypeTransactionPrototype._unsignedTxImplementsEIP155 =
|
|
153
|
-
function () {
|
|
154
|
-
throw new InternalError(
|
|
155
|
-
"`_unsignedTxImplementsEIP155` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
156
|
-
);
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
ReadOnlyValidUnknownTypeTransactionPrototype._getMessageToSign = function () {
|
|
160
|
-
throw new InternalError(
|
|
161
|
-
"`_getMessageToSign` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
162
|
-
);
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
ReadOnlyValidUnknownTypeTransactionPrototype._processSignature = function () {
|
|
166
|
-
throw new InternalError(
|
|
167
|
-
"`_processSignature` is not implemented in ReadOnlyValidUnknownTypeTransaction"
|
|
168
|
-
);
|
|
169
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Block } from "@nomicfoundation/ethereumjs-block";
|
|
2
|
-
import { BlockchainInterface } from "@nomicfoundation/ethereumjs-blockchain";
|
|
3
|
-
|
|
4
|
-
import { FilterParams } from "../node-types";
|
|
5
|
-
import { RpcLogOutput, RpcReceiptOutput } from "../output";
|
|
6
|
-
|
|
7
|
-
export interface HardhatBlockchainInterface extends BlockchainInterface {
|
|
8
|
-
addTransactionReceipts(receipts: RpcReceiptOutput[]): void;
|
|
9
|
-
reserveBlocks(
|
|
10
|
-
count: bigint,
|
|
11
|
-
interval: bigint,
|
|
12
|
-
previousBlockStateRoot: Uint8Array,
|
|
13
|
-
previousBlockTotalDifficulty: bigint,
|
|
14
|
-
previousBlockBaseFeePerGas: bigint | undefined
|
|
15
|
-
): void;
|
|
16
|
-
deleteLaterBlocks(block: Block): void;
|
|
17
|
-
getBlockByTransactionHash(transactionHash: Uint8Array): Promise<Block | null>;
|
|
18
|
-
getLatestBlock(): Promise<Block>;
|
|
19
|
-
getLatestBlockNumber(): bigint;
|
|
20
|
-
getLogs(filterParams: FilterParams): Promise<RpcLogOutput[]>;
|
|
21
|
-
getTotalDifficulty(blockHash: Uint8Array): Promise<bigint>;
|
|
22
|
-
getTransactionReceipt(
|
|
23
|
-
transactionHash: Uint8Array
|
|
24
|
-
): Promise<RpcReceiptOutput | null>;
|
|
25
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AccessListEIP2930TxData,
|
|
3
|
-
FeeMarketEIP1559TxData,
|
|
4
|
-
LegacyTxData,
|
|
5
|
-
} from "@nomicfoundation/ethereumjs-tx";
|
|
6
|
-
import { Address } from "@nomicfoundation/ethereumjs-util";
|
|
7
|
-
|
|
8
|
-
import { createNonCryptographicHashBasedIdentifier } from "../../../util/hash";
|
|
9
|
-
|
|
10
|
-
// Produces a signature with r and s values taken from a hash of the inputs.
|
|
11
|
-
export function makeFakeSignature(
|
|
12
|
-
tx: LegacyTxData | AccessListEIP2930TxData | FeeMarketEIP1559TxData,
|
|
13
|
-
sender: Address
|
|
14
|
-
): {
|
|
15
|
-
r: number;
|
|
16
|
-
s: number;
|
|
17
|
-
} {
|
|
18
|
-
const hashInputString = [
|
|
19
|
-
sender,
|
|
20
|
-
tx.nonce,
|
|
21
|
-
tx.gasLimit,
|
|
22
|
-
tx.value,
|
|
23
|
-
tx.to,
|
|
24
|
-
tx.data,
|
|
25
|
-
"gasPrice" in tx ? tx.gasPrice : "",
|
|
26
|
-
"chainId" in tx ? tx.chainId : "",
|
|
27
|
-
"maxPriorityFeePerGas" in tx ? tx.maxPriorityFeePerGas : "",
|
|
28
|
-
"maxFeePerGas" in tx ? tx.maxFeePerGas : "",
|
|
29
|
-
"accessList" in tx
|
|
30
|
-
? tx.accessList?.map((accessListItem) => {
|
|
31
|
-
let address: string;
|
|
32
|
-
let storageKeys: string[];
|
|
33
|
-
if (Array.isArray(accessListItem)) {
|
|
34
|
-
address = Buffer.from(accessListItem[0]).toString("hex");
|
|
35
|
-
storageKeys = accessListItem[1].map((b) =>
|
|
36
|
-
Buffer.from(b).toString("hex")
|
|
37
|
-
);
|
|
38
|
-
} else {
|
|
39
|
-
address = accessListItem.address;
|
|
40
|
-
storageKeys = accessListItem.storageKeys;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return [address, ...storageKeys]
|
|
44
|
-
.map((b) => Buffer.from(b).toString("hex"))
|
|
45
|
-
.join(";");
|
|
46
|
-
})
|
|
47
|
-
: "",
|
|
48
|
-
]
|
|
49
|
-
.map((a) => a?.toString() ?? "")
|
|
50
|
-
.join(",");
|
|
51
|
-
|
|
52
|
-
const hashDigest = createNonCryptographicHashBasedIdentifier(
|
|
53
|
-
Buffer.from(hashInputString)
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
r: hashDigest.readUInt32LE(),
|
|
58
|
-
s: hashDigest.readUInt32LE(4),
|
|
59
|
-
};
|
|
60
|
-
}
|