@aztec/ethereum 0.0.1-commit.b655e406 → 0.0.1-commit.b8a057fa
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/dest/account.d.ts +1 -1
- package/dest/chain.d.ts +1 -1
- package/dest/client.d.ts +25 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +60 -4
- package/dest/config.d.ts +48 -73
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +120 -386
- package/dest/constants.d.ts +1 -1
- package/dest/contracts/chain_state_override.d.ts +78 -0
- package/dest/contracts/chain_state_override.d.ts.map +1 -0
- package/dest/contracts/chain_state_override.js +137 -0
- package/dest/contracts/empire_base.d.ts +7 -5
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +1 -1
- package/dest/contracts/errors.d.ts +1 -1
- package/dest/contracts/errors.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.d.ts +6 -5
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.js +11 -9
- package/dest/contracts/fee_asset_price_oracle.d.ts +105 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -0
- package/dest/contracts/fee_asset_price_oracle.js +656 -0
- package/dest/contracts/fee_juice.d.ts +1 -1
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/governance.d.ts +113 -36
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +207 -16
- package/dest/contracts/governance_proposer.d.ts +38 -4
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +455 -12
- package/dest/contracts/gse.d.ts +4 -2
- package/dest/contracts/gse.d.ts.map +1 -1
- package/dest/contracts/gse.js +2 -2
- package/dest/contracts/inbox.d.ts +24 -3
- package/dest/contracts/inbox.d.ts.map +1 -1
- package/dest/contracts/inbox.js +42 -2
- package/dest/contracts/index.d.ts +6 -3
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +5 -2
- package/dest/contracts/log.d.ts +13 -0
- package/dest/contracts/log.d.ts.map +1 -0
- package/dest/contracts/log.js +1 -0
- package/dest/contracts/multicall.d.ts +130 -13
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +203 -93
- package/dest/contracts/outbox.d.ts +64 -0
- package/dest/contracts/outbox.d.ts.map +1 -0
- package/dest/contracts/outbox.js +113 -0
- package/dest/contracts/registry.d.ts +3 -1
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +30 -1
- package/dest/contracts/rollup.d.ts +5591 -131
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +1125 -232
- package/dest/contracts/slasher_contract.d.ts +1 -1
- package/dest/contracts/slasher_contract.d.ts.map +1 -1
- package/dest/contracts/{tally_slashing_proposer.d.ts → slashing_proposer.d.ts} +11 -10
- package/dest/contracts/slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/{tally_slashing_proposer.js → slashing_proposer.js} +21 -16
- package/dest/contracts/utils.d.ts +1 -1
- package/dest/deploy_aztec_l1_contracts.d.ts +267 -0
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
- package/dest/deploy_aztec_l1_contracts.js +417 -0
- package/dest/deploy_l1_contract.d.ts +68 -0
- package/dest/deploy_l1_contract.d.ts.map +1 -0
- package/dest/deploy_l1_contract.js +312 -0
- package/dest/eth-signer/eth-signer.d.ts +1 -1
- package/dest/eth-signer/index.d.ts +1 -1
- package/dest/forwarder_proxy.d.ts +32 -0
- package/dest/forwarder_proxy.d.ts.map +1 -0
- package/dest/forwarder_proxy.js +93 -0
- package/dest/l1_artifacts.d.ts +21007 -16779
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_artifacts.js +9 -24
- package/dest/l1_contract_addresses.d.ts +61 -65
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +99 -80
- package/dest/l1_reader.d.ts +7 -5
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +15 -7
- package/dest/l1_tx_utils/config.d.ts +11 -5
- package/dest/l1_tx_utils/config.d.ts.map +1 -1
- package/dest/l1_tx_utils/config.js +46 -10
- package/dest/l1_tx_utils/constants.d.ts +8 -2
- package/dest/l1_tx_utils/constants.d.ts.map +1 -1
- package/dest/l1_tx_utils/constants.js +27 -2
- package/dest/l1_tx_utils/factory.d.ts +18 -10
- package/dest/l1_tx_utils/factory.d.ts.map +1 -1
- package/dest/l1_tx_utils/factory.js +17 -7
- package/dest/l1_tx_utils/fee-strategies/index.d.ts +10 -0
- package/dest/l1_tx_utils/fee-strategies/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/index.js +12 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts +8 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +129 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts +23 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +191 -0
- package/dest/l1_tx_utils/fee-strategies/types.d.ts +51 -0
- package/dest/l1_tx_utils/fee-strategies/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/types.js +3 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +41 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +42 -0
- package/dest/l1_tx_utils/index-blobs.d.ts +3 -0
- package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/index-blobs.js +2 -0
- package/dest/l1_tx_utils/index.d.ts +4 -1
- package/dest/l1_tx_utils/index.d.ts.map +1 -1
- package/dest/l1_tx_utils/index.js +3 -0
- package/dest/l1_tx_utils/interfaces.d.ts +2 -2
- package/dest/l1_tx_utils/interfaces.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts +252 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.js +568 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +26 -8
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +202 -92
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +19 -30
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +65 -168
- package/dest/l1_tx_utils/signer.d.ts +1 -1
- package/dest/l1_tx_utils/tx_delayer.d.ts +58 -0
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -0
- package/dest/{test → l1_tx_utils}/tx_delayer.js +70 -39
- package/dest/l1_tx_utils/types.d.ts +27 -1
- package/dest/l1_tx_utils/types.d.ts.map +1 -1
- package/dest/l1_tx_utils/types.js +10 -0
- package/dest/l1_tx_utils/utils.d.ts +1 -1
- package/dest/l1_types.d.ts +1 -1
- package/dest/publisher_manager.d.ts +34 -7
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +119 -8
- package/dest/queries.d.ts +14 -3
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +84 -9
- package/dest/test/blob_kzg_warmup.d.ts +19 -0
- package/dest/test/blob_kzg_warmup.d.ts.map +1 -0
- package/dest/test/blob_kzg_warmup.js +64 -0
- package/dest/test/chain_monitor.d.ts +80 -26
- package/dest/test/chain_monitor.d.ts.map +1 -1
- package/dest/test/chain_monitor.js +137 -39
- package/dest/test/eth_cheat_codes.d.ts +47 -8
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +100 -44
- package/dest/test/eth_cheat_codes_with_state.d.ts +1 -1
- package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
- package/dest/test/index.d.ts +2 -3
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +1 -2
- package/dest/test/rollup_cheat_codes.d.ts +75 -14
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +145 -42
- package/dest/test/start_anvil.d.ts +25 -2
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +143 -28
- package/dest/test/upgrade_utils.d.ts +1 -1
- package/dest/test/upgrade_utils.js +2 -2
- package/dest/types.d.ts +57 -2
- package/dest/types.d.ts.map +1 -1
- package/dest/utils.d.ts +24 -4
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +112 -16
- package/dest/zkPassportVerifierAddress.d.ts +1 -1
- package/package.json +34 -17
- package/src/client.ts +66 -2
- package/src/config.ts +162 -470
- package/src/contracts/README.md +157 -0
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +6 -5
- package/src/contracts/fee_asset_handler.ts +10 -7
- package/src/contracts/fee_asset_price_oracle.ts +285 -0
- package/src/contracts/governance.ts +279 -13
- package/src/contracts/governance_proposer.ts +74 -7
- package/src/contracts/gse.ts +7 -2
- package/src/contracts/inbox.ts +64 -4
- package/src/contracts/index.ts +5 -2
- package/src/contracts/log.ts +13 -0
- package/src/contracts/multicall.ts +247 -103
- package/src/contracts/outbox.ts +132 -0
- package/src/contracts/registry.ts +31 -1
- package/src/contracts/rollup.ts +830 -194
- package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +26 -21
- package/src/deploy_aztec_l1_contracts.ts +652 -0
- package/src/deploy_l1_contract.ts +362 -0
- package/src/forwarder_proxy.ts +108 -0
- package/src/l1_artifacts.ts +12 -35
- package/src/l1_contract_addresses.ts +120 -92
- package/src/l1_reader.ts +25 -10
- package/src/l1_tx_utils/config.ts +55 -14
- package/src/l1_tx_utils/constants.ts +13 -2
- package/src/l1_tx_utils/factory.ts +31 -31
- package/src/l1_tx_utils/fee-strategies/index.ts +22 -0
- package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +163 -0
- package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +245 -0
- package/src/l1_tx_utils/fee-strategies/types.ts +56 -0
- package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +108 -0
- package/src/l1_tx_utils/index-blobs.ts +2 -0
- package/src/l1_tx_utils/index.ts +3 -0
- package/src/l1_tx_utils/interfaces.ts +1 -1
- package/src/l1_tx_utils/l1_fee_analyzer.ts +875 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +194 -72
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +79 -214
- package/src/{test → l1_tx_utils}/tx_delayer.ts +97 -58
- package/src/l1_tx_utils/types.ts +32 -0
- package/src/publisher_manager.ts +145 -12
- package/src/queries.ts +93 -10
- package/src/test/blob_kzg_warmup.ts +65 -0
- package/src/test/chain_monitor.ts +198 -51
- package/src/test/eth_cheat_codes.ts +91 -48
- package/src/test/index.ts +1 -2
- package/src/test/rollup_cheat_codes.ts +174 -45
- package/src/test/start_anvil.ts +179 -27
- package/src/test/upgrade_utils.ts +2 -2
- package/src/types.ts +62 -0
- package/src/utils.ts +128 -19
- package/dest/contracts/empire_slashing_proposer.d.ts +0 -65
- package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/empire_slashing_proposer.js +0 -194
- package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.d.ts +0 -226
- package/dest/deploy_l1_contracts.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.js +0 -1473
- package/dest/index.d.ts +0 -18
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -17
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +0 -26
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +0 -26
- package/dest/test/delayed_tx_utils.d.ts +0 -13
- package/dest/test/delayed_tx_utils.d.ts.map +0 -1
- package/dest/test/delayed_tx_utils.js +0 -28
- package/dest/test/tx_delayer.d.ts +0 -36
- package/dest/test/tx_delayer.d.ts.map +0 -1
- package/src/contracts/empire_slashing_proposer.ts +0 -259
- package/src/deploy_l1_contracts.ts +0 -1849
- package/src/index.ts +0 -17
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +0 -77
- package/src/test/delayed_tx_utils.ts +0 -52
|
@@ -2,32 +2,57 @@ import { maxBigint } from '@aztec/foundation/bigint';
|
|
|
2
2
|
import { merge, pick } from '@aztec/foundation/collection';
|
|
3
3
|
import { InterruptError, TimeoutError } from '@aztec/foundation/error';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
-
import {
|
|
5
|
+
import { Semaphore } from '@aztec/foundation/queue';
|
|
6
|
+
import { makeBackoff, retry, retryUntil } from '@aztec/foundation/retry';
|
|
6
7
|
import { sleep } from '@aztec/foundation/sleep';
|
|
7
8
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
8
9
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
9
10
|
import pickBy from 'lodash.pickby';
|
|
10
|
-
import {
|
|
11
|
-
import { jsonRpc } from 'viem/nonce';
|
|
11
|
+
import { formatGwei, serializeTransaction } from 'viem';
|
|
12
12
|
import { formatViemError } from '../utils.js';
|
|
13
13
|
import { l1TxUtilsConfigMappings } from './config.js';
|
|
14
|
-
import {
|
|
14
|
+
import { MAX_L1_TX_LIMIT } from './constants.js';
|
|
15
15
|
import { ReadOnlyL1TxUtils } from './readonly_l1_tx_utils.js';
|
|
16
|
-
import {
|
|
16
|
+
import { createDelayer, wrapClientWithDelayer } from './tx_delayer.js';
|
|
17
|
+
import { DroppedTransactionError, L1TxTimeoutError, TerminalTxUtilsState, TxUtilsState, UnknownMinedTxError } from './types.js';
|
|
17
18
|
const MAX_L1_TX_STATES = 32;
|
|
19
|
+
// Backoff (in seconds) for retrying the read-only RPC calls that prepare a tx cancellation. A
|
|
20
|
+
// cancellation is fired in the background after a tx times out and is important (it frees the stuck
|
|
21
|
+
// nonce), so a transient RPC failure while reading the pending nonce or gas price must not abandon it.
|
|
22
|
+
const CANCELLATION_PREP_RETRY_BACKOFF_S = [
|
|
23
|
+
1,
|
|
24
|
+
2,
|
|
25
|
+
4,
|
|
26
|
+
8
|
|
27
|
+
];
|
|
18
28
|
export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
19
29
|
client;
|
|
20
30
|
address;
|
|
21
31
|
signer;
|
|
22
32
|
store;
|
|
23
33
|
metrics;
|
|
24
|
-
nonceManager;
|
|
25
34
|
txs;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
/** Last nonce successfully sent to the chain. Used as a lower bound when a fallback RPC node returns a stale count. */ lastSentNonce;
|
|
36
|
+
/** Mutex to prevent concurrent sendTransaction calls from racing on the same nonce. */ sendMutex;
|
|
37
|
+
/** Tx delayer for testing. Only set when enableDelayer config is true. */ delayer;
|
|
38
|
+
/** KZG instance for blob operations. */ kzg;
|
|
39
|
+
constructor(client, address, signer, logger = createLogger('ethereum:publisher'), dateProvider = new DateProvider(), config, debugMaxGasLimit = false, store, metrics, kzg, delayer){
|
|
40
|
+
super(client, logger, dateProvider, config, debugMaxGasLimit), this.client = client, this.address = address, this.signer = signer, this.store = store, this.metrics = metrics, this.txs = [], this.sendMutex = new Semaphore(1);
|
|
41
|
+
this.kzg = kzg;
|
|
42
|
+
// Set up delayer: use provided one or create new
|
|
43
|
+
if (config?.enableDelayer && config?.ethereumSlotDuration) {
|
|
44
|
+
this.delayer = delayer ?? this.createDelayer({
|
|
45
|
+
ethereumSlotDuration: config.ethereumSlotDuration
|
|
46
|
+
}, logger.getBindings());
|
|
47
|
+
this.client = wrapClientWithDelayer(this.client, this.delayer);
|
|
48
|
+
if (config.txDelayerMaxInclusionTimeIntoSlot !== undefined) {
|
|
49
|
+
this.delayer.setMaxInclusionTimeIntoSlot(config.txDelayerMaxInclusionTimeIntoSlot);
|
|
50
|
+
}
|
|
51
|
+
} else if (delayer) {
|
|
52
|
+
// Delayer provided but enableDelayer not set — just store it without wrapping
|
|
53
|
+
logger.warn('Delayer provided but enableDelayer config is not set; delayer will not be used');
|
|
54
|
+
this.delayer = delayer;
|
|
55
|
+
}
|
|
31
56
|
}
|
|
32
57
|
get state() {
|
|
33
58
|
return this.txs.at(-1)?.status ?? TxUtilsState.IDLE;
|
|
@@ -46,6 +71,11 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
46
71
|
this.metrics?.recordMinedTx(l1TxState, new Date(l1Timestamp));
|
|
47
72
|
} else if (newState === TxUtilsState.NOT_MINED) {
|
|
48
73
|
this.metrics?.recordDroppedTx(l1TxState);
|
|
74
|
+
// The tx was dropped: the chain nonce reverted to l1TxState.nonce, so our lower bound is
|
|
75
|
+
// no longer valid. Clear it so the next send fetches the real nonce from the chain.
|
|
76
|
+
if (this.lastSentNonce === l1TxState.nonce) {
|
|
77
|
+
this.lastSentNonce = undefined;
|
|
78
|
+
}
|
|
49
79
|
}
|
|
50
80
|
// Update state in the store
|
|
51
81
|
await this.store?.saveState(sender, l1TxState).catch((err)=>this.logger.error('Failed to persist L1 tx state', err));
|
|
@@ -54,6 +84,12 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
54
84
|
this.config = merge(this.config, newConfig);
|
|
55
85
|
this.logger.info('Updated L1TxUtils config', pickBy(newConfig, (_, key)=>key in l1TxUtilsConfigMappings));
|
|
56
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Clears the cached `lastSentNonce` so the next `sendTransaction` call fetches the real
|
|
89
|
+
* nonce from the chain. Call this after an L1 reorg to prevent stale nonce references.
|
|
90
|
+
*/ resetNonce() {
|
|
91
|
+
this.lastSentNonce = undefined;
|
|
92
|
+
}
|
|
57
93
|
getSenderAddress() {
|
|
58
94
|
return this.address;
|
|
59
95
|
}
|
|
@@ -75,11 +111,24 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
75
111
|
this.logger.debug(`No states to rehydrate for account ${account}`);
|
|
76
112
|
return;
|
|
77
113
|
}
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
114
|
+
// Clean up excess states if we have more than MAX_L1_TX_STATES
|
|
115
|
+
if (loadedStates.length > MAX_L1_TX_STATES) {
|
|
116
|
+
this.logger.warn(`Found ${loadedStates.length} tx states for account ${account}, pruning to most recent ${MAX_L1_TX_STATES}`);
|
|
117
|
+
// Keep only the most recent MAX_L1_TX_STATES
|
|
118
|
+
const statesToKeep = loadedStates.slice(-MAX_L1_TX_STATES);
|
|
119
|
+
const statesToDelete = loadedStates.slice(0, -MAX_L1_TX_STATES);
|
|
120
|
+
// Batch delete old states in a transaction for efficiency
|
|
121
|
+
const idsToDelete = statesToDelete.map((s)=>s.id);
|
|
122
|
+
await this.store.deleteState(account, ...idsToDelete);
|
|
123
|
+
this.txs = statesToKeep;
|
|
124
|
+
this.logger.info(`Cleaned up ${statesToDelete.length} old tx states, kept ${statesToKeep.length} for account ${account}`);
|
|
125
|
+
} else {
|
|
126
|
+
// Convert loaded states (which have id) to the txs format
|
|
127
|
+
this.txs = loadedStates;
|
|
128
|
+
this.logger.info(`Rehydrated ${loadedStates.length} tx states for account ${account}`);
|
|
129
|
+
}
|
|
81
130
|
// Find all pending states and resume monitoring
|
|
82
|
-
const pendingStates =
|
|
131
|
+
const pendingStates = this.txs.filter((state)=>!TerminalTxUtilsState.includes(state.status));
|
|
83
132
|
if (pendingStates.length === 0) {
|
|
84
133
|
return;
|
|
85
134
|
}
|
|
@@ -107,21 +156,32 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
107
156
|
const txRequest = await this.client.prepareTransactionRequest(txData);
|
|
108
157
|
return await this.signTransaction(txRequest);
|
|
109
158
|
}
|
|
159
|
+
async checkInterruptedOrTimedOut(gasConfig) {
|
|
160
|
+
if (this.interrupted) {
|
|
161
|
+
throw new InterruptError(`Transaction sending is interrupted`);
|
|
162
|
+
}
|
|
163
|
+
const now = new Date(await this.getL1Timestamp());
|
|
164
|
+
if (gasConfig.txTimeoutAt && now > gasConfig.txTimeoutAt) {
|
|
165
|
+
throw new TimeoutError(`Transaction timed out before sending (now ${now.toISOString()} > timeoutAt ${gasConfig.txTimeoutAt.toISOString()})`);
|
|
166
|
+
}
|
|
167
|
+
return now;
|
|
168
|
+
}
|
|
110
169
|
/**
|
|
111
170
|
* Sends a transaction with gas estimation and pricing
|
|
112
171
|
* @param request - The transaction request (to, data, value)
|
|
113
172
|
* @param gasConfig - Optional gas configuration
|
|
114
173
|
* @returns The transaction hash and parameters used
|
|
115
174
|
*/ async sendTransaction(request, gasConfigOverrides, blobInputs, stateChange = TxUtilsState.SENT) {
|
|
116
|
-
if (this.interrupted) {
|
|
117
|
-
throw new InterruptError(`Transaction sending is interrupted`);
|
|
118
|
-
}
|
|
119
175
|
try {
|
|
120
176
|
const gasConfig = merge(this.config, gasConfigOverrides);
|
|
121
177
|
const account = this.getSenderAddress().toString();
|
|
178
|
+
// Fail fast before doing any work (gas estimation, balance check) if we've been interrupted
|
|
179
|
+
// or if the caller's deadline has already passed. The same check is repeated after gas
|
|
180
|
+
// estimation in case it took long enough to push us past the deadline.
|
|
181
|
+
await this.checkInterruptedOrTimedOut(gasConfig);
|
|
122
182
|
let gasLimit;
|
|
123
183
|
if (this.debugMaxGasLimit) {
|
|
124
|
-
gasLimit =
|
|
184
|
+
gasLimit = MAX_L1_TX_LIMIT;
|
|
125
185
|
} else if (gasConfig.gasLimit) {
|
|
126
186
|
gasLimit = gasConfig.gasLimit;
|
|
127
187
|
} else {
|
|
@@ -132,37 +192,41 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
132
192
|
...request
|
|
133
193
|
});
|
|
134
194
|
const gasPrice = await this.getGasPrice(gasConfig, !!blobInputs);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
195
|
+
const now = await this.checkInterruptedOrTimedOut(gasConfig);
|
|
196
|
+
let txHash;
|
|
197
|
+
let nonce;
|
|
198
|
+
let baseState;
|
|
199
|
+
await this.sendMutex.acquire();
|
|
200
|
+
try {
|
|
201
|
+
const chainNonce = await this.client.getTransactionCount({
|
|
202
|
+
address: account,
|
|
203
|
+
blockTag: 'pending'
|
|
204
|
+
});
|
|
205
|
+
// If a fallback RPC node returns a stale count (lower than what we last sent), use our
|
|
206
|
+
// local lower bound to avoid sending a duplicate of an already-pending transaction.
|
|
207
|
+
nonce = this.lastSentNonce !== undefined && chainNonce <= this.lastSentNonce ? this.lastSentNonce + 1 : chainNonce;
|
|
208
|
+
baseState = {
|
|
209
|
+
request,
|
|
210
|
+
gasLimit,
|
|
211
|
+
blobInputs,
|
|
212
|
+
gasPrice,
|
|
213
|
+
nonce
|
|
214
|
+
};
|
|
215
|
+
const txData = this.makeTxData(baseState, {
|
|
216
|
+
isCancelTx: false
|
|
217
|
+
});
|
|
218
|
+
const signedRequest = await this.prepareSignedTransaction(txData);
|
|
219
|
+
txHash = await this.client.sendRawTransaction({
|
|
220
|
+
serializedTransaction: signedRequest
|
|
221
|
+
});
|
|
222
|
+
this.lastSentNonce = nonce;
|
|
223
|
+
} finally{
|
|
224
|
+
this.sendMutex.release();
|
|
156
225
|
}
|
|
157
|
-
// Send the new tx
|
|
158
|
-
const signedRequest = await this.prepareSignedTransaction(txData);
|
|
159
|
-
const txHash = await this.client.sendRawTransaction({
|
|
160
|
-
serializedTransaction: signedRequest
|
|
161
|
-
});
|
|
162
226
|
// Create the new state for monitoring
|
|
163
227
|
const l1TxState = {
|
|
164
228
|
...baseState,
|
|
165
|
-
id: await this.store?.consumeNextStateId(account) ?? Math.max(...this.txs.map((tx)=>tx.id),
|
|
229
|
+
id: await this.store?.consumeNextStateId(account) ?? Math.max(...this.txs.map((tx)=>tx.id), -1) + 1,
|
|
166
230
|
txHashes: [
|
|
167
231
|
txHash
|
|
168
232
|
],
|
|
@@ -170,7 +234,10 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
170
234
|
status: TxUtilsState.IDLE,
|
|
171
235
|
txConfigOverrides: gasConfigOverrides ?? {},
|
|
172
236
|
sentAtL1Ts: now,
|
|
173
|
-
lastSentAtL1Ts: now
|
|
237
|
+
lastSentAtL1Ts: now,
|
|
238
|
+
gasPriceHistory: [
|
|
239
|
+
baseState.gasPrice
|
|
240
|
+
]
|
|
174
241
|
};
|
|
175
242
|
// And persist it
|
|
176
243
|
await this.updateState(l1TxState, stateChange);
|
|
@@ -204,7 +271,7 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
204
271
|
};
|
|
205
272
|
} catch (err) {
|
|
206
273
|
const viemError = formatViemError(err, request.abi);
|
|
207
|
-
this.logger.error(`Failed to send L1 transaction`, viemError, {
|
|
274
|
+
this.logger.error(`Failed to send L1 transaction: ${viemError.message}`, viemError, {
|
|
208
275
|
request: pick(request, 'to', 'value')
|
|
209
276
|
});
|
|
210
277
|
throw viemError;
|
|
@@ -294,9 +361,25 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
294
361
|
const account = this.getSenderAddress().toString();
|
|
295
362
|
const initialTxHash = txHashes[0];
|
|
296
363
|
let currentTxHash = txHashes.at(-1);
|
|
297
|
-
let l1Timestamp;
|
|
364
|
+
let l1Timestamp = 0;
|
|
298
365
|
while(true){
|
|
299
|
-
|
|
366
|
+
try {
|
|
367
|
+
l1Timestamp = await this.getL1Timestamp();
|
|
368
|
+
} catch (err) {
|
|
369
|
+
// A transient RPC failure here must not abort monitoring with a rejection: callers that
|
|
370
|
+
// fire this loop in the background would surface it as an unhandled rejection (e.g. when a
|
|
371
|
+
// test tears down its L1 node while a monitor iteration is in flight). Exit quietly if we
|
|
372
|
+
// are shutting down, otherwise retry on the next interval.
|
|
373
|
+
if (this.interrupted) {
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
this.logger.error(`Error fetching L1 timestamp while monitoring tx ${currentTxHash}`, err, {
|
|
377
|
+
nonce,
|
|
378
|
+
account
|
|
379
|
+
});
|
|
380
|
+
await sleep(gasConfig.checkIntervalMs);
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
300
383
|
try {
|
|
301
384
|
const timePassed = l1Timestamp - state.lastSentAtL1Ts.getTime();
|
|
302
385
|
const [currentNonce, pendingNonce] = await Promise.all([
|
|
@@ -333,10 +416,6 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
333
416
|
timePassed
|
|
334
417
|
});
|
|
335
418
|
await this.updateState(state, TxUtilsState.NOT_MINED);
|
|
336
|
-
this.nonceManager.reset({
|
|
337
|
-
address: account,
|
|
338
|
-
chainId: this.client.chain.id
|
|
339
|
-
});
|
|
340
419
|
throw new DroppedTransactionError(nonce, account);
|
|
341
420
|
}
|
|
342
421
|
// Break if the tx has timed out (ie expired)
|
|
@@ -348,6 +427,7 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
348
427
|
if (timePassed >= stallTimeMs && attempts <= maxSpeedUpAttempts) {
|
|
349
428
|
const newGasPrice = await this.getGasPrice(gasConfig, isBlobTx, attempts, state.gasPrice);
|
|
350
429
|
state.gasPrice = newGasPrice;
|
|
430
|
+
state.gasPriceHistory?.push(newGasPrice);
|
|
351
431
|
this.logger.debug(`Tx ${currentTxHash} with nonce ${nonce} from ${account} appears stuck. ` + `Attempting speed-up ${attempts}/${maxSpeedUpAttempts} ` + `with new priority fee ${formatGwei(newGasPrice.maxPriorityFeePerGas)} gwei.`, {
|
|
352
432
|
account,
|
|
353
433
|
nonce,
|
|
@@ -408,15 +488,7 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
408
488
|
}
|
|
409
489
|
// Oh no, the transaction has timed out!
|
|
410
490
|
if (isCancelTx || !gasConfig.cancelTxOnTimeout) {
|
|
411
|
-
// If this was already a cancellation tx, or we are configured to not cancel txs, we just mark it as NOT_MINED
|
|
412
|
-
// and reset the nonce manager, so the next tx that comes along can reuse the nonce if/when this tx gets dropped.
|
|
413
|
-
// This is the nastiest scenario for us, since the new tx could acquire the next nonce, but then this tx is dropped,
|
|
414
|
-
// and the new tx would never get mined. Eventually, the new tx would also drop.
|
|
415
491
|
await this.updateState(state, TxUtilsState.NOT_MINED);
|
|
416
|
-
this.nonceManager.reset({
|
|
417
|
-
address: account,
|
|
418
|
-
chainId: this.client.chain.id
|
|
419
|
-
});
|
|
420
492
|
} else {
|
|
421
493
|
// Otherwise we fire the cancellation without awaiting to avoid blocking the caller,
|
|
422
494
|
// and monitor it in the background so we can speed it up as needed.
|
|
@@ -491,11 +563,27 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
491
563
|
* @returns The receipt of the successful transaction
|
|
492
564
|
*/ async sendAndMonitorTransaction(request, gasConfig, blobInputs) {
|
|
493
565
|
const { state } = await this.sendTransaction(request, gasConfig, blobInputs);
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
566
|
+
try {
|
|
567
|
+
const receipt = await this.monitorTransaction(state);
|
|
568
|
+
return {
|
|
569
|
+
receipt,
|
|
570
|
+
state
|
|
571
|
+
};
|
|
572
|
+
} catch (err) {
|
|
573
|
+
if (err instanceof TimeoutError) {
|
|
574
|
+
// Snapshot the ladder now: the fire-and-forget cancellation mutates state.gasPrice moments later.
|
|
575
|
+
throw new L1TxTimeoutError(err.message, {
|
|
576
|
+
gasPriceHistory: state.gasPriceHistory ? [
|
|
577
|
+
...state.gasPriceHistory
|
|
578
|
+
] : undefined,
|
|
579
|
+
finalGasPrice: state.gasPrice,
|
|
580
|
+
attempts: state.txHashes.length,
|
|
581
|
+
nonce: state.nonce,
|
|
582
|
+
gasLimit: state.gasLimit
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
throw err;
|
|
586
|
+
}
|
|
499
587
|
}
|
|
500
588
|
async simulate(request, _blockOverrides = {}, stateOverrides = [], abi = RollupAbi, _gasConfig) {
|
|
501
589
|
const blockOverrides = {
|
|
@@ -509,11 +597,11 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
509
597
|
from: request.from ?? this.getSenderAddress().toString(),
|
|
510
598
|
maxFeePerGas: gasPrice.maxFeePerGas,
|
|
511
599
|
maxPriorityFeePerGas: gasPrice.maxPriorityFeePerGas,
|
|
512
|
-
gas: request.gas ??
|
|
600
|
+
gas: request.gas ?? MAX_L1_TX_LIMIT
|
|
513
601
|
};
|
|
514
602
|
if (!request.gas && !gasConfig.ignoreBlockGasLimit) {
|
|
515
|
-
//
|
|
516
|
-
blockOverrides.gasLimit =
|
|
603
|
+
// MAX_L1_TX_LIMIT is set as call.gas, ensure block gasLimit is sufficient
|
|
604
|
+
blockOverrides.gasLimit = MAX_L1_TX_LIMIT;
|
|
517
605
|
}
|
|
518
606
|
return this._simulate(call, blockOverrides, stateOverrides, gasConfig, abi);
|
|
519
607
|
}
|
|
@@ -532,36 +620,45 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
532
620
|
account
|
|
533
621
|
});
|
|
534
622
|
await this.updateState(state, TxUtilsState.NOT_MINED);
|
|
535
|
-
this.nonceManager.reset({
|
|
536
|
-
address: account,
|
|
537
|
-
chainId: this.client.chain.id
|
|
538
|
-
});
|
|
539
623
|
return;
|
|
540
624
|
}
|
|
541
|
-
//
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
625
|
+
// Resolve the pending nonce and cancellation gas price up front. These are read-only RPC calls, so
|
|
626
|
+
// they are safe to retry; a transient RPC failure here must not permanently abandon the cancellation
|
|
627
|
+
// (which would leave the nonce stuck and the tx state stranded short of CANCELLED). We retry with a
|
|
628
|
+
// real backoff before giving up, unlike getGasPrice's tight internal retry which can be exhausted by
|
|
629
|
+
// a brief node hiccup. The retried block performs no state-changing send, so retrying cannot
|
|
630
|
+
// double-send the cancellation tx.
|
|
631
|
+
const { currentNonce, cancelGasPrice } = await retry(async ()=>{
|
|
632
|
+
const currentNonce = await this.client.getTransactionCount({
|
|
633
|
+
address: account,
|
|
634
|
+
blockTag: 'pending'
|
|
635
|
+
});
|
|
636
|
+
if (currentNonce >= nonce) {
|
|
637
|
+
// Get gas price with higher priority fee for cancellation
|
|
638
|
+
const cancelGasPrice = await this.getGasPrice({
|
|
639
|
+
...this.config,
|
|
640
|
+
// Use high bump for cancellation to ensure it replaces the original tx
|
|
641
|
+
priorityFeeRetryBumpPercentage: 150
|
|
642
|
+
}, isBlobTx, state.txHashes.length, previousGasPrice);
|
|
643
|
+
return {
|
|
644
|
+
currentNonce,
|
|
645
|
+
cancelGasPrice
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
return {
|
|
649
|
+
currentNonce,
|
|
650
|
+
cancelGasPrice: undefined
|
|
651
|
+
};
|
|
652
|
+
}, `Preparing cancellation for L1 tx from account ${account} with nonce ${nonce}`, makeBackoff(CANCELLATION_PREP_RETRY_BACKOFF_S), this.logger);
|
|
653
|
+
if (cancelGasPrice === undefined) {
|
|
547
654
|
this.logger.verbose(`Not sending cancellation for L1 tx from account ${account} with nonce ${nonce} as it is dropped`, {
|
|
548
655
|
nonce,
|
|
549
656
|
account,
|
|
550
657
|
currentNonce
|
|
551
658
|
});
|
|
552
659
|
await this.updateState(state, TxUtilsState.NOT_MINED);
|
|
553
|
-
this.nonceManager.reset({
|
|
554
|
-
address: account,
|
|
555
|
-
chainId: this.client.chain.id
|
|
556
|
-
});
|
|
557
660
|
return;
|
|
558
661
|
}
|
|
559
|
-
// Get gas price with higher priority fee for cancellation
|
|
560
|
-
const cancelGasPrice = await this.getGasPrice({
|
|
561
|
-
...this.config,
|
|
562
|
-
// Use high bump for cancellation to ensure it replaces the original tx
|
|
563
|
-
priorityFeeRetryBumpPercentage: 150
|
|
564
|
-
}, isBlobTx, state.txHashes.length, previousGasPrice);
|
|
565
662
|
const { maxFeePerGas, maxPriorityFeePerGas, maxFeePerBlobGas } = cancelGasPrice;
|
|
566
663
|
this.logger.verbose(`Attempting to cancel L1 ${isBlobTx ? 'blob' : 'vanilla'} transaction from account ${account} with nonce ${nonce} after time out`, {
|
|
567
664
|
maxFeePerGas: formatGwei(maxFeePerGas),
|
|
@@ -604,7 +701,20 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
604
701
|
});
|
|
605
702
|
return Number(timestamp) * 1000;
|
|
606
703
|
}
|
|
607
|
-
/** Makes empty blob inputs for the cancellation tx.
|
|
608
|
-
|
|
704
|
+
/** Makes empty blob inputs for the cancellation tx. */ makeEmptyBlobInputs(maxFeePerBlobGas) {
|
|
705
|
+
if (!this.kzg) {
|
|
706
|
+
throw new Error('Cannot make empty blob inputs for cancellation without kzg');
|
|
707
|
+
}
|
|
708
|
+
const blobData = new Uint8Array(131072).fill(0);
|
|
709
|
+
return {
|
|
710
|
+
blobs: [
|
|
711
|
+
blobData
|
|
712
|
+
],
|
|
713
|
+
kzg: this.kzg,
|
|
714
|
+
maxFeePerBlobGas
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
/** Creates a new delayer instance. */ createDelayer(opts, bindings) {
|
|
718
|
+
return createDelayer(this.dateProvider, opts, bindings);
|
|
609
719
|
}
|
|
610
720
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
1
2
|
import { type Logger } from '@aztec/foundation/log';
|
|
2
3
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
3
|
-
import { type Abi, type Account, type BlockOverrides, type Hex, type StateOverride } from 'viem';
|
|
4
|
+
import { type Abi, type Account, type BlockOverrides, type GetCodeReturnType, type Hex, type StateOverride } from 'viem';
|
|
4
5
|
import type { ViemClient } from '../types.js';
|
|
5
6
|
import { type L1TxUtilsConfig } from './config.js';
|
|
6
7
|
import type { GasPrice, L1BlobInputs, L1TxRequest, TransactionStats } from './types.js';
|
|
@@ -15,44 +16,36 @@ export declare class ReadOnlyL1TxUtils {
|
|
|
15
16
|
interrupt(): void;
|
|
16
17
|
restart(): void;
|
|
17
18
|
getBlock(): Promise<{
|
|
18
|
-
number: bigint;
|
|
19
|
-
hash: `0x${string}`;
|
|
20
|
-
nonce: `0x${string}`;
|
|
21
|
-
logsBloom: `0x${string}`;
|
|
22
19
|
baseFeePerGas: bigint | null;
|
|
23
20
|
blobGasUsed: bigint;
|
|
24
21
|
difficulty: bigint;
|
|
25
22
|
excessBlobGas: bigint;
|
|
26
|
-
extraData:
|
|
23
|
+
extraData: `0x${string}`;
|
|
27
24
|
gasLimit: bigint;
|
|
28
25
|
gasUsed: bigint;
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
hash: `0x${string}`;
|
|
27
|
+
logsBloom: `0x${string}`;
|
|
28
|
+
miner: `0x${string}`;
|
|
29
|
+
mixHash: `0x${string}`;
|
|
30
|
+
nonce: `0x${string}`;
|
|
31
|
+
number: bigint;
|
|
31
32
|
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
32
|
-
parentHash:
|
|
33
|
-
receiptsRoot:
|
|
34
|
-
sealFields:
|
|
35
|
-
sha3Uncles:
|
|
33
|
+
parentHash: `0x${string}`;
|
|
34
|
+
receiptsRoot: `0x${string}`;
|
|
35
|
+
sealFields: `0x${string}`[];
|
|
36
|
+
sha3Uncles: `0x${string}`;
|
|
36
37
|
size: bigint;
|
|
37
|
-
stateRoot:
|
|
38
|
+
stateRoot: `0x${string}`;
|
|
38
39
|
timestamp: bigint;
|
|
39
40
|
totalDifficulty: bigint | null;
|
|
40
|
-
transactionsRoot:
|
|
41
|
-
uncles:
|
|
42
|
-
withdrawals?: import("viem").Withdrawal[] | undefined
|
|
41
|
+
transactionsRoot: `0x${string}`;
|
|
42
|
+
uncles: `0x${string}`[];
|
|
43
|
+
withdrawals?: import("viem").Withdrawal[] | undefined;
|
|
43
44
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
44
45
|
transactions: `0x${string}`[];
|
|
45
46
|
}>;
|
|
46
47
|
getBlockNumber(): Promise<bigint>;
|
|
47
|
-
|
|
48
|
-
* Analyzes pending transactions and recent fee history to determine a competitive priority fee.
|
|
49
|
-
* Falls back to network estimate if data is unavailable or fails.
|
|
50
|
-
* @param networkEstimateResult - Result from estimateMaxPriorityFeePerGas RPC call
|
|
51
|
-
* @param pendingBlockResult - Result from getBlock with pending tag RPC call
|
|
52
|
-
* @param feeHistoryResult - Result from getFeeHistory RPC call
|
|
53
|
-
* @returns A competitive priority fee based on pending txs and recent block history
|
|
54
|
-
*/
|
|
55
|
-
protected getCompetitivePriorityFee(networkEstimateResult: PromiseSettledResult<bigint | null>, pendingBlockResult: PromiseSettledResult<Awaited<ReturnType<ViemClient['getBlock']>> | null>, feeHistoryResult: PromiseSettledResult<Awaited<ReturnType<ViemClient['getFeeHistory']>> | null>): bigint;
|
|
48
|
+
getCode(address: EthAddress): Promise<GetCodeReturnType>;
|
|
56
49
|
/**
|
|
57
50
|
* Gets the current gas price with bounds checking
|
|
58
51
|
*/
|
|
@@ -86,9 +79,5 @@ export declare class ReadOnlyL1TxUtils {
|
|
|
86
79
|
result: `0x${string}`;
|
|
87
80
|
}>;
|
|
88
81
|
bumpGasLimit(gasLimit: bigint, _gasConfig?: L1TxUtilsConfig): bigint;
|
|
89
|
-
/**
|
|
90
|
-
* Helper function to retry RPC calls twice
|
|
91
|
-
*/
|
|
92
|
-
private tryTwice;
|
|
93
82
|
}
|
|
94
|
-
//# sourceMappingURL=
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,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csTUFBTSxDQVcxRTtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readonly_l1_tx_utils.d.ts","sourceRoot":"","sources":["../../src/l1_tx_utils/readonly_l1_tx_utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"readonly_l1_tx_utils.d.ts","sourceRoot":"","sources":["../../src/l1_tx_utils/readonly_l1_tx_utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAKvD,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EAEZ,KAAK,cAAc,EAEnB,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAGR,KAAK,aAAa,EAKnB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,eAAe,EAAmD,MAAM,aAAa,CAAC;AASpG,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMxF,qBAAa,iBAAiB;IAKnB,MAAM,EAAE,UAAU;IACzB,SAAS,CAAC,MAAM,EAAE,MAAM;aACR,YAAY,EAAE,YAAY;IAE1C,SAAS,CAAC,gBAAgB,EAAE,OAAO;IAR9B,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IACzC,SAAS,CAAC,WAAW,UAAS;IAE9B,YACS,MAAM,EAAE,UAAU,EACf,MAAM,oBAAqD,EACrD,YAAY,EAAE,YAAY,EAC1C,MAAM,CAAC,EAAE,OAAO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