@aztec/ethereum 0.0.0-test.1 → 0.0.1-commit.017a351
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 +2 -0
- package/dest/account.d.ts.map +1 -0
- package/dest/account.js +4 -0
- package/dest/chain.d.ts +1 -1
- package/dest/client.d.ts +28 -4
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +73 -3
- package/dest/config.d.ts +70 -23
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +151 -34
- 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 +25 -8
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +75 -2
- package/dest/contracts/errors.d.ts +7 -0
- package/dest/contracts/errors.d.ts.map +1 -0
- package/dest/contracts/errors.js +12 -0
- package/dest/contracts/fee_asset_handler.d.ts +20 -0
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -0
- package/dest/contracts/fee_asset_handler.js +59 -0
- 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 +6 -7
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/fee_juice.js +27 -20
- package/dest/contracts/governance.d.ts +131 -43
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +281 -87
- package/dest/contracts/governance_proposer.d.ts +49 -13
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +483 -26
- package/dest/contracts/gse.d.ts +32 -0
- package/dest/contracts/gse.d.ts.map +1 -0
- package/dest/contracts/gse.js +72 -0
- package/dest/contracts/inbox.d.ts +47 -0
- package/dest/contracts/inbox.d.ts.map +1 -0
- package/dest/contracts/inbox.js +85 -0
- package/dest/contracts/index.d.ts +11 -2
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +10 -1
- 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 +136 -0
- package/dest/contracts/multicall.d.ts.map +1 -0
- package/dest/contracts/multicall.js +264 -0
- 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 +12 -5
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +74 -17
- package/dest/contracts/rollup.d.ts +5526 -52
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +1446 -118
- package/dest/contracts/slasher_contract.d.ts +44 -0
- package/dest/contracts/slasher_contract.d.ts.map +1 -0
- package/dest/contracts/slasher_contract.js +75 -0
- package/dest/contracts/slashing_proposer.d.ts +133 -15
- package/dest/contracts/slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/slashing_proposer.js +293 -22
- package/dest/contracts/utils.d.ts +3 -0
- package/dest/contracts/utils.d.ts.map +1 -0
- package/dest/contracts/utils.js +11 -0
- package/dest/deploy_aztec_l1_contracts.d.ts +256 -0
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
- package/dest/deploy_aztec_l1_contracts.js +411 -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 +21 -0
- package/dest/eth-signer/eth-signer.d.ts.map +1 -0
- package/dest/eth-signer/eth-signer.js +5 -0
- package/dest/eth-signer/index.d.ts +2 -0
- package/dest/eth-signer/index.d.ts.map +1 -0
- package/dest/eth-signer/index.js +1 -0
- 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/generated/l1-contracts-defaults.d.ts +30 -0
- package/dest/generated/l1-contracts-defaults.d.ts.map +1 -0
- package/dest/generated/l1-contracts-defaults.js +30 -0
- package/dest/l1_artifacts.d.ts +79270 -0
- package/dest/l1_artifacts.d.ts.map +1 -0
- package/dest/l1_artifacts.js +151 -0
- package/dest/l1_contract_addresses.d.ts +61 -45
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +99 -76
- package/dest/l1_reader.d.ts +8 -6
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +20 -12
- package/dest/l1_tx_utils/config.d.ts +65 -0
- package/dest/l1_tx_utils/config.d.ts.map +1 -0
- package/dest/l1_tx_utils/config.js +109 -0
- package/dest/l1_tx_utils/constants.d.ts +12 -0
- package/dest/l1_tx_utils/constants.d.ts.map +1 -0
- package/dest/l1_tx_utils/constants.js +39 -0
- package/dest/l1_tx_utils/factory.d.ts +32 -0
- package/dest/l1_tx_utils/factory.d.ts.map +1 -0
- package/dest/l1_tx_utils/factory.js +22 -0
- 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 +13 -0
- package/dest/l1_tx_utils/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/index.js +13 -0
- package/dest/l1_tx_utils/interfaces.d.ts +76 -0
- package/dest/l1_tx_utils/interfaces.d.ts.map +1 -0
- package/dest/l1_tx_utils/interfaces.js +4 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts +233 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.js +506 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +113 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.js +658 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +83 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +328 -0
- package/dest/l1_tx_utils/signer.d.ts +4 -0
- package/dest/l1_tx_utils/signer.d.ts.map +1 -0
- package/dest/l1_tx_utils/signer.js +16 -0
- 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/l1_tx_utils/tx_delayer.js +223 -0
- package/dest/l1_tx_utils/types.d.ts +67 -0
- package/dest/l1_tx_utils/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/types.js +26 -0
- package/dest/l1_tx_utils/utils.d.ts +4 -0
- package/dest/l1_tx_utils/utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/utils.js +14 -0
- package/dest/l1_types.d.ts +6 -0
- package/dest/l1_types.d.ts.map +1 -0
- package/dest/l1_types.js +1 -0
- package/dest/publisher_manager.d.ts +30 -0
- package/dest/publisher_manager.d.ts.map +1 -0
- package/dest/publisher_manager.js +162 -0
- package/dest/queries.d.ts +17 -4
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +120 -12
- package/dest/test/chain_monitor.d.ts +95 -0
- package/dest/test/chain_monitor.d.ts.map +1 -0
- package/dest/test/chain_monitor.js +249 -0
- package/dest/test/eth_cheat_codes.d.ts +237 -0
- package/dest/test/eth_cheat_codes.d.ts.map +1 -0
- package/dest/test/eth_cheat_codes.js +573 -0
- package/dest/test/eth_cheat_codes_with_state.d.ts +2 -2
- package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes_with_state.js +1 -1
- package/dest/test/index.d.ts +4 -3
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +3 -2
- package/dest/test/rollup_cheat_codes.d.ts +118 -0
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -0
- package/dest/test/rollup_cheat_codes.js +344 -0
- package/dest/test/start_anvil.d.ts +30 -2
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +147 -24
- package/dest/test/upgrade_utils.d.ts +6 -5
- package/dest/test/upgrade_utils.d.ts.map +1 -1
- package/dest/test/upgrade_utils.js +23 -16
- package/dest/types.d.ts +62 -8
- package/dest/types.d.ts.map +1 -1
- package/dest/types.js +3 -1
- package/dest/utils.d.ts +25 -4
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +142 -91
- package/dest/zkPassportVerifierAddress.d.ts +15 -0
- package/dest/zkPassportVerifierAddress.d.ts.map +1 -0
- package/dest/zkPassportVerifierAddress.js +11 -0
- package/package.json +52 -26
- package/src/account.ts +5 -0
- package/src/client.ts +107 -5
- package/src/config.ts +218 -43
- package/src/contracts/README.md +157 -0
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +77 -7
- package/src/contracts/errors.ts +13 -0
- package/src/contracts/fee_asset_handler.ts +66 -0
- package/src/contracts/fee_asset_price_oracle.ts +285 -0
- package/src/contracts/fee_juice.ts +29 -15
- package/src/contracts/governance.ts +343 -74
- package/src/contracts/governance_proposer.ts +128 -25
- package/src/contracts/gse.ts +88 -0
- package/src/contracts/inbox.ts +123 -0
- package/src/contracts/index.ts +10 -1
- package/src/contracts/log.ts +13 -0
- package/src/contracts/multicall.ts +296 -0
- package/src/contracts/outbox.ts +132 -0
- package/src/contracts/registry.ts +81 -26
- package/src/contracts/rollup.ts +1246 -90
- package/src/contracts/slasher_contract.ts +89 -0
- package/src/contracts/slashing_proposer.ts +296 -27
- package/src/contracts/utils.ts +14 -0
- package/src/deploy_aztec_l1_contracts.ts +646 -0
- package/src/deploy_l1_contract.ts +362 -0
- package/src/eth-signer/eth-signer.ts +25 -0
- package/src/eth-signer/index.ts +1 -0
- package/src/forwarder_proxy.ts +108 -0
- package/src/generated/l1-contracts-defaults.ts +32 -0
- package/src/l1_artifacts.ts +231 -0
- package/src/l1_contract_addresses.ts +121 -80
- package/src/l1_reader.ts +31 -16
- package/src/l1_tx_utils/README.md +177 -0
- package/src/l1_tx_utils/config.ts +181 -0
- package/src/l1_tx_utils/constants.ts +29 -0
- package/src/l1_tx_utils/factory.ts +64 -0
- 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 +15 -0
- package/src/l1_tx_utils/interfaces.ts +86 -0
- package/src/l1_tx_utils/l1_fee_analyzer.ts +803 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +789 -0
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +424 -0
- package/src/l1_tx_utils/signer.ts +28 -0
- package/src/l1_tx_utils/tx_delayer.ts +303 -0
- package/src/l1_tx_utils/types.ts +85 -0
- package/src/l1_tx_utils/utils.ts +16 -0
- package/src/l1_types.ts +6 -0
- package/src/publisher_manager.ts +203 -0
- package/src/queries.ts +149 -17
- package/src/test/chain_monitor.ts +307 -0
- package/src/test/eth_cheat_codes.ts +600 -0
- package/src/test/eth_cheat_codes_with_state.ts +1 -1
- package/src/test/index.ts +3 -2
- package/src/test/rollup_cheat_codes.ts +388 -0
- package/src/test/start_anvil.ts +189 -22
- package/src/test/upgrade_utils.ts +30 -21
- package/src/types.ts +71 -7
- package/src/utils.ts +164 -96
- package/src/zkPassportVerifierAddress.ts +15 -0
- package/dest/contracts/forwarder.d.ts +0 -24
- package/dest/contracts/forwarder.d.ts.map +0 -1
- package/dest/contracts/forwarder.js +0 -101
- package/dest/deploy_l1_contracts.d.ts +0 -21210
- package/dest/deploy_l1_contracts.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.js +0 -687
- package/dest/eth_cheat_codes.d.ts +0 -147
- package/dest/eth_cheat_codes.d.ts.map +0 -1
- package/dest/eth_cheat_codes.js +0 -303
- package/dest/index.d.ts +0 -14
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -13
- package/dest/l1_tx_utils.d.ts +0 -192
- package/dest/l1_tx_utils.d.ts.map +0 -1
- package/dest/l1_tx_utils.js +0 -641
- package/dest/l1_tx_utils_with_blobs.d.ts +0 -12
- package/dest/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils_with_blobs.js +0 -64
- package/dest/test/delayed_tx_utils.d.ts +0 -8
- package/dest/test/delayed_tx_utils.d.ts.map +0 -1
- package/dest/test/delayed_tx_utils.js +0 -21
- package/dest/test/tx_delayer.d.ts +0 -25
- package/dest/test/tx_delayer.d.ts.map +0 -1
- package/dest/test/tx_delayer.js +0 -116
- package/src/contracts/forwarder.ts +0 -132
- package/src/deploy_l1_contracts.ts +0 -948
- package/src/eth_cheat_codes.ts +0 -314
- package/src/index.ts +0 -13
- package/src/l1_tx_utils.ts +0 -847
- package/src/l1_tx_utils_with_blobs.ts +0 -86
- package/src/test/delayed_tx_utils.ts +0 -24
- package/src/test/tx_delayer.ts +0 -163
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import {
|
|
2
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
3
3
|
import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
4
|
+
import { TestERC20Abi as StakingAssetAbi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
4
5
|
|
|
5
6
|
import { type GetContractReturnType, type PrivateKeyAccount, getContract } from 'viem';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import { extractProposalIdFromLogs } from '../contracts/governance.js';
|
|
8
9
|
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
|
9
|
-
import
|
|
10
|
+
import { createL1TxUtils } from '../l1_tx_utils/index.js';
|
|
11
|
+
import type { ExtendedViemWalletClient, ViemPublicClient } from '../types.js';
|
|
12
|
+
import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
10
13
|
|
|
11
14
|
export async function executeGovernanceProposal(
|
|
12
15
|
proposalId: bigint,
|
|
13
|
-
governance: GetContractReturnType<typeof GovernanceAbi,
|
|
16
|
+
governance: GetContractReturnType<typeof GovernanceAbi, ViemPublicClient>,
|
|
14
17
|
voteAmount: bigint,
|
|
15
18
|
privateKey: PrivateKeyAccount,
|
|
16
|
-
|
|
17
|
-
walletClient: L1Clients['walletClient'],
|
|
19
|
+
l1Client: ExtendedViemWalletClient,
|
|
18
20
|
rpcUrls: string[],
|
|
19
21
|
logger: Logger,
|
|
20
22
|
) {
|
|
21
23
|
const proposal = await governance.read.getProposal([proposalId]);
|
|
22
24
|
|
|
25
|
+
const l1TxUtils = createL1TxUtils(l1Client);
|
|
26
|
+
|
|
23
27
|
const waitL1Block = async () => {
|
|
24
|
-
await
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
value: 1n,
|
|
28
|
-
account: privateKey,
|
|
29
|
-
}),
|
|
28
|
+
await l1TxUtils.sendAndMonitorTransaction({
|
|
29
|
+
to: l1Client.account.address,
|
|
30
|
+
value: 1n,
|
|
30
31
|
});
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, logger);
|
|
34
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), logger);
|
|
34
35
|
|
|
35
36
|
const timeToActive = proposal.creation + proposal.config.votingDelay;
|
|
36
37
|
logger.info(`Warping to ${timeToActive + 1n}`);
|
|
@@ -40,7 +41,7 @@ export async function executeGovernanceProposal(
|
|
|
40
41
|
|
|
41
42
|
logger.info(`Voting`);
|
|
42
43
|
const voteTx = await governance.write.vote([proposalId, voteAmount, true], { account: privateKey });
|
|
43
|
-
await
|
|
44
|
+
await l1Client.waitForTransactionReceipt({ hash: voteTx });
|
|
44
45
|
logger.info(`Voted`);
|
|
45
46
|
|
|
46
47
|
const timeToExecutable = timeToActive + proposal.config.votingDuration + proposal.config.executionDelay + 1n;
|
|
@@ -50,7 +51,7 @@ export async function executeGovernanceProposal(
|
|
|
50
51
|
await waitL1Block();
|
|
51
52
|
|
|
52
53
|
const executeTx = await governance.write.execute([proposalId], { account: privateKey });
|
|
53
|
-
await
|
|
54
|
+
await l1Client.waitForTransactionReceipt({ hash: executeTx });
|
|
54
55
|
logger.info(`Executed proposal`);
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -58,12 +59,16 @@ export async function createGovernanceProposal(
|
|
|
58
59
|
payloadAddress: `0x${string}`,
|
|
59
60
|
addresses: L1ContractAddresses,
|
|
60
61
|
privateKey: PrivateKeyAccount,
|
|
61
|
-
publicClient:
|
|
62
|
+
publicClient: ViemPublicClient,
|
|
62
63
|
logger: Logger,
|
|
63
|
-
): Promise<{
|
|
64
|
+
): Promise<{
|
|
65
|
+
governance: GetContractReturnType<typeof GovernanceAbi, ViemPublicClient>;
|
|
66
|
+
voteAmount: bigint;
|
|
67
|
+
proposalId: bigint;
|
|
68
|
+
}> {
|
|
64
69
|
const token = getContract({
|
|
65
|
-
address: addresses.
|
|
66
|
-
abi:
|
|
70
|
+
address: addresses.stakingAssetAddress.toString(),
|
|
71
|
+
abi: StakingAssetAbi,
|
|
67
72
|
client: publicClient,
|
|
68
73
|
});
|
|
69
74
|
|
|
@@ -92,9 +97,13 @@ export async function createGovernanceProposal(
|
|
|
92
97
|
await publicClient.waitForTransactionReceipt({ hash: depositTx });
|
|
93
98
|
logger.info(`Deposited tokens`);
|
|
94
99
|
|
|
95
|
-
await governance.write.proposeWithLock([payloadAddress, privateKey.address], {
|
|
100
|
+
const proposeTx = await governance.write.proposeWithLock([payloadAddress, privateKey.address], {
|
|
96
101
|
account: privateKey,
|
|
97
102
|
});
|
|
103
|
+
const receipt = await publicClient.waitForTransactionReceipt({ hash: proposeTx });
|
|
104
|
+
logger.info(`Proposed upgrade`);
|
|
105
|
+
|
|
106
|
+
const proposalId = extractProposalIdFromLogs(receipt.logs);
|
|
98
107
|
|
|
99
|
-
return { governance, voteAmount };
|
|
108
|
+
return { governance, voteAmount, proposalId };
|
|
100
109
|
}
|
package/src/types.ts
CHANGED
|
@@ -1,21 +1,82 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
Abi,
|
|
2
3
|
Account,
|
|
3
4
|
Chain,
|
|
4
5
|
Client,
|
|
5
6
|
FallbackTransport,
|
|
7
|
+
GetContractReturnType,
|
|
8
|
+
Hex,
|
|
6
9
|
HttpTransport,
|
|
7
10
|
PublicActions,
|
|
8
11
|
PublicClient,
|
|
9
12
|
PublicRpcSchema,
|
|
10
13
|
WalletActions,
|
|
11
|
-
WalletClient,
|
|
12
14
|
WalletRpcSchema,
|
|
13
15
|
} from 'viem';
|
|
14
16
|
|
|
15
17
|
/** Type for a viem public client */
|
|
16
18
|
export type ViemPublicClient = PublicClient<FallbackTransport<HttpTransport[]>, Chain>;
|
|
17
19
|
|
|
18
|
-
export type
|
|
20
|
+
export type PublicRpcDebugSchema = [
|
|
21
|
+
{
|
|
22
|
+
Method: 'debug_traceTransaction';
|
|
23
|
+
Parameters: [txHash: `0x${string}`, options: { tracer: 'callTracer' }];
|
|
24
|
+
ReturnType: DebugCallTrace;
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
Method: 'trace_transaction';
|
|
28
|
+
Parameters: [txHash: `0x${string}`];
|
|
29
|
+
ReturnType: TraceTransactionResponse[];
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
/** Return type for a debug_traceTransaction call */
|
|
34
|
+
export type DebugCallTrace = {
|
|
35
|
+
from: Hex;
|
|
36
|
+
to?: Hex;
|
|
37
|
+
type: string;
|
|
38
|
+
input?: Hex;
|
|
39
|
+
output?: Hex;
|
|
40
|
+
gas?: Hex;
|
|
41
|
+
gasUsed?: Hex;
|
|
42
|
+
value?: Hex;
|
|
43
|
+
error?: string;
|
|
44
|
+
calls?: DebugCallTrace[];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** Action object for a trace_transaction call */
|
|
48
|
+
export type TraceAction = {
|
|
49
|
+
from: Hex;
|
|
50
|
+
to?: Hex;
|
|
51
|
+
callType: string;
|
|
52
|
+
gas?: Hex;
|
|
53
|
+
input?: Hex;
|
|
54
|
+
value?: Hex;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** Result object for a trace_transaction call */
|
|
58
|
+
export type TraceResult = {
|
|
59
|
+
gasUsed?: Hex;
|
|
60
|
+
output?: Hex;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** Return type for a single trace in trace_transaction response */
|
|
64
|
+
export type TraceTransactionResponse = {
|
|
65
|
+
action: TraceAction;
|
|
66
|
+
result?: TraceResult;
|
|
67
|
+
error?: string;
|
|
68
|
+
subtraces: number;
|
|
69
|
+
traceAddress: number[];
|
|
70
|
+
type: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** Type for a viem public client with support for debug methods */
|
|
74
|
+
export type ViemPublicDebugClient = PublicClient<
|
|
75
|
+
FallbackTransport<HttpTransport[]>,
|
|
76
|
+
Chain,
|
|
77
|
+
undefined,
|
|
78
|
+
[...PublicRpcSchema, ...PublicRpcDebugSchema]
|
|
79
|
+
>;
|
|
19
80
|
|
|
20
81
|
export type ExtendedViemWalletClient = Client<
|
|
21
82
|
FallbackTransport<readonly HttpTransport[]>,
|
|
@@ -25,9 +86,12 @@ export type ExtendedViemWalletClient = Client<
|
|
|
25
86
|
PublicActions<FallbackTransport<readonly HttpTransport[]>, Chain> & WalletActions<Chain, Account>
|
|
26
87
|
>;
|
|
27
88
|
|
|
28
|
-
|
|
89
|
+
/** Type for a viem client that can be either public or extended with wallet capabilities */
|
|
90
|
+
export type ViemClient = ViemPublicClient | ExtendedViemWalletClient;
|
|
29
91
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
92
|
+
/** Type for a viem contract that can be used with an extended viem client */
|
|
93
|
+
export type ViemContract<TAbi extends Abi> = GetContractReturnType<TAbi, ExtendedViemWalletClient>;
|
|
94
|
+
|
|
95
|
+
export function isExtendedClient(client: ViemClient): client is ExtendedViemWalletClient {
|
|
96
|
+
return 'account' in client && client.account !== undefined;
|
|
97
|
+
}
|
package/src/utils.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import type { Logger } from '@aztec/foundation/log';
|
|
3
|
-
import { ErrorsAbi } from '@aztec/l1-artifacts';
|
|
3
|
+
import { ErrorsAbi } from '@aztec/l1-artifacts/ErrorsAbi';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
type Abi,
|
|
7
|
+
type AbiItem,
|
|
7
8
|
BaseError,
|
|
8
9
|
type ContractEventName,
|
|
9
10
|
ContractFunctionRevertedError,
|
|
10
11
|
type DecodeEventLogReturnType,
|
|
12
|
+
type FormattedTransaction,
|
|
11
13
|
type Hex,
|
|
12
14
|
type Log,
|
|
13
15
|
decodeErrorResult,
|
|
14
16
|
decodeEventLog,
|
|
15
17
|
} from 'viem';
|
|
18
|
+
import { formatAbiItem, formatAbiParams } from 'viem/utils';
|
|
16
19
|
|
|
17
20
|
export interface L2Claim {
|
|
18
21
|
claimSecret: Fr;
|
|
@@ -24,8 +27,8 @@ export interface L2Claim {
|
|
|
24
27
|
export class FormattedViemError extends Error {
|
|
25
28
|
metaMessages?: any[];
|
|
26
29
|
|
|
27
|
-
constructor(message: string, metaMessages?: any[]) {
|
|
28
|
-
super(message);
|
|
30
|
+
constructor(message: string, metaMessages?: any[], options?: ErrorOptions) {
|
|
31
|
+
super(message, options);
|
|
29
32
|
this.name = 'FormattedViemError';
|
|
30
33
|
this.metaMessages = metaMessages;
|
|
31
34
|
}
|
|
@@ -50,7 +53,7 @@ export function extractEvent<
|
|
|
50
53
|
return event;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
function tryExtractEvent<
|
|
56
|
+
export function tryExtractEvent<
|
|
54
57
|
const TAbi extends Abi | readonly unknown[],
|
|
55
58
|
TEventName extends ContractEventName<TAbi>,
|
|
56
59
|
TEventType = DecodeEventLogReturnType<TAbi, TEventName, Hex[], undefined, true>,
|
|
@@ -92,6 +95,57 @@ export function prettyLogViemErrorMsg(err: any) {
|
|
|
92
95
|
return err?.message ?? err;
|
|
93
96
|
}
|
|
94
97
|
|
|
98
|
+
export function mergeAbis(abis: Abi[]): Abi {
|
|
99
|
+
let merged: Abi = [];
|
|
100
|
+
const seen = new Set<string>();
|
|
101
|
+
|
|
102
|
+
for (const abi of abis) {
|
|
103
|
+
for (const item of abi) {
|
|
104
|
+
const key = getAbiItemKey(item);
|
|
105
|
+
if (!seen.has(key)) {
|
|
106
|
+
seen.add(key);
|
|
107
|
+
merged = [...merged, item];
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return merged;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function getAbiItemKey(item: AbiItem): string {
|
|
116
|
+
if (item.type === 'function') {
|
|
117
|
+
const signature = formatAbiItem(item);
|
|
118
|
+
const outputs = formatAbiParams(item.outputs);
|
|
119
|
+
const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
|
|
120
|
+
return `function:${signature}:${outputs}:${stateMutability}`;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (item.type === 'event') {
|
|
124
|
+
const signature = formatAbiItem(item);
|
|
125
|
+
const indexed = (item.inputs ?? []).map(input => ((input as { indexed?: boolean }).indexed ? '1' : '0')).join('');
|
|
126
|
+
const anonymous = item.anonymous ? 'anonymous' : 'not-anonymous';
|
|
127
|
+
return `event:${signature}:${indexed}:${anonymous}`;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (item.type === 'error') {
|
|
131
|
+
const signature = formatAbiItem(item);
|
|
132
|
+
return `error:${signature}`;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (item.type === 'constructor') {
|
|
136
|
+
const inputs = formatAbiParams(item.inputs);
|
|
137
|
+
const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
|
|
138
|
+
return `constructor::${inputs}:${stateMutability}`;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (item.type === 'fallback' || item.type === 'receive') {
|
|
142
|
+
const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
|
|
143
|
+
return `${item.type}:::${stateMutability}`;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return 'unknown';
|
|
147
|
+
}
|
|
148
|
+
|
|
95
149
|
function getNestedErrorData(error: unknown): string | undefined {
|
|
96
150
|
// If nothing, bail
|
|
97
151
|
if (!error) {
|
|
@@ -116,6 +170,21 @@ function getNestedErrorData(error: unknown): string | undefined {
|
|
|
116
170
|
return undefined;
|
|
117
171
|
}
|
|
118
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Truncates an error message to a safe length for log renderers.
|
|
175
|
+
* LogExplorer can only render up to 2500 characters in its summary view.
|
|
176
|
+
* We cap at 2000 to leave room for decorating context added by callers.
|
|
177
|
+
*/
|
|
178
|
+
function truncateErrorMessage(message: string): string {
|
|
179
|
+
const MAX = 2000;
|
|
180
|
+
const CHUNK = 950;
|
|
181
|
+
if (message.length <= MAX) {
|
|
182
|
+
return message;
|
|
183
|
+
}
|
|
184
|
+
const truncated = message.length - 2 * CHUNK;
|
|
185
|
+
return message.slice(0, CHUNK) + `...${truncated} characters truncated...` + message.slice(-CHUNK);
|
|
186
|
+
}
|
|
187
|
+
|
|
119
188
|
/**
|
|
120
189
|
* Formats a Viem error into a FormattedViemError instance.
|
|
121
190
|
* @param error - The error to format.
|
|
@@ -128,6 +197,8 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
|
|
|
128
197
|
return error;
|
|
129
198
|
}
|
|
130
199
|
|
|
200
|
+
const originalError = error;
|
|
201
|
+
|
|
131
202
|
// First try to decode as a custom error using the ABI
|
|
132
203
|
try {
|
|
133
204
|
const data = getNestedErrorData(error);
|
|
@@ -138,7 +209,9 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
|
|
|
138
209
|
data: data as Hex,
|
|
139
210
|
});
|
|
140
211
|
if (decoded) {
|
|
141
|
-
return new FormattedViemError(`${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`, error?.metaMessages
|
|
212
|
+
return new FormattedViemError(`${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`, error?.metaMessages, {
|
|
213
|
+
cause: originalError,
|
|
214
|
+
});
|
|
142
215
|
}
|
|
143
216
|
}
|
|
144
217
|
|
|
@@ -155,109 +228,76 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
|
|
|
155
228
|
revertError.metaMessages && revertError.metaMessages?.length > 1
|
|
156
229
|
? revertError.metaMessages[1].trimStart()
|
|
157
230
|
: '';
|
|
158
|
-
return new FormattedViemError(`${errorName}${args}`, error?.metaMessages);
|
|
231
|
+
return new FormattedViemError(`${errorName}${args}`, error?.metaMessages, { cause: originalError });
|
|
159
232
|
}
|
|
160
233
|
}
|
|
161
|
-
} catch
|
|
234
|
+
} catch {
|
|
162
235
|
// If decoding fails, we fall back to the original formatting
|
|
163
236
|
}
|
|
164
237
|
|
|
165
|
-
//
|
|
166
|
-
if (error
|
|
167
|
-
|
|
168
|
-
|
|
238
|
+
// Strip ABI from the error object before formatting
|
|
239
|
+
if (error && typeof error === 'object') {
|
|
240
|
+
// Create a clone to avoid modifying the original
|
|
241
|
+
const errorClone = structuredClone(error);
|
|
169
242
|
|
|
170
|
-
|
|
171
|
-
const truncateHex = (hex: string, length = 100) => {
|
|
172
|
-
if (!hex || typeof hex !== 'string') {
|
|
173
|
-
return hex;
|
|
174
|
-
}
|
|
175
|
-
if (!hex.startsWith('0x')) {
|
|
176
|
-
return hex;
|
|
177
|
-
}
|
|
178
|
-
if (hex.length <= length * 2) {
|
|
179
|
-
return hex;
|
|
180
|
-
}
|
|
181
|
-
return `${hex.slice(0, length)}...${hex.slice(-length)}`;
|
|
182
|
-
};
|
|
243
|
+
// Helper function to recursively remove ABI properties
|
|
183
244
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
const parsed = JSON.parse(body);
|
|
245
|
+
// Strip ABIs from the clone
|
|
246
|
+
stripAbis(errorClone);
|
|
187
247
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
return obj.map(item => processParams(item));
|
|
192
|
-
}
|
|
193
|
-
if (typeof obj === 'object' && obj !== null) {
|
|
194
|
-
const result: any = {};
|
|
195
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
196
|
-
result[key] = processParams(value);
|
|
197
|
-
}
|
|
198
|
-
return result;
|
|
199
|
-
}
|
|
200
|
-
if (typeof obj === 'string') {
|
|
201
|
-
if (obj.startsWith('0x')) {
|
|
202
|
-
return truncateHex(obj);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
return obj;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
// Process the entire request body
|
|
209
|
-
const processed = processParams(parsed);
|
|
210
|
-
return JSON.stringify(processed, null, 2);
|
|
211
|
-
} catch {
|
|
212
|
-
return body;
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
const truncateHexStringsInText = (text: string): string => {
|
|
217
|
-
const hexRegex = /\b0x[a-fA-F0-9]{10,}/g;
|
|
218
|
-
return text.replace(hexRegex, hex => truncateHex(hex));
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
const extractAndFormatRequestBody = (message: string): string => {
|
|
222
|
-
// First handle Request body JSON
|
|
223
|
-
const requestBodyRegex = /Request body: ({[\s\S]*?})\n/g;
|
|
224
|
-
let result = message.replace(requestBodyRegex, (match, body) => {
|
|
225
|
-
return `Request body: ${formatRequestBody(body)}\n`;
|
|
226
|
-
});
|
|
248
|
+
// Use the cleaned clone for further processing
|
|
249
|
+
error = errorClone;
|
|
250
|
+
}
|
|
227
251
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
const processedLines = lines.map(line => {
|
|
233
|
-
// Check if line contains a colon followed by content
|
|
234
|
-
const colonIndex = line.indexOf(':');
|
|
235
|
-
if (colonIndex !== -1) {
|
|
236
|
-
const [prefix, content] = [line.slice(0, colonIndex + 1), line.slice(colonIndex + 1).trim()];
|
|
237
|
-
// If content contains a hex string, truncate it
|
|
238
|
-
if (content.includes('0x')) {
|
|
239
|
-
const hexMatches = content.match(/0x[a-fA-F0-9]+/g) || [];
|
|
240
|
-
let processedContent = content;
|
|
241
|
-
hexMatches.forEach(hex => {
|
|
242
|
-
processedContent = processedContent.replace(hex, truncateHex(hex));
|
|
243
|
-
});
|
|
244
|
-
return `${prefix} ${processedContent}`;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
return line;
|
|
248
|
-
});
|
|
249
|
-
return processedLines.join('\n');
|
|
252
|
+
// If it's a regular Error instance, return it with its message
|
|
253
|
+
if (error instanceof Error) {
|
|
254
|
+
return new FormattedViemError(truncateErrorMessage(error.message), (error as any)?.metaMessages, {
|
|
255
|
+
cause: originalError,
|
|
250
256
|
});
|
|
257
|
+
}
|
|
251
258
|
|
|
252
|
-
|
|
253
|
-
|
|
259
|
+
return new FormattedViemError(truncateErrorMessage(String(error)), undefined, { cause: originalError });
|
|
260
|
+
}
|
|
254
261
|
|
|
255
|
-
|
|
256
|
-
|
|
262
|
+
function stripAbis(obj: any) {
|
|
263
|
+
if (!obj || typeof obj !== 'object') {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
257
266
|
|
|
258
|
-
|
|
267
|
+
// Delete ABI property at current level
|
|
268
|
+
if ('abi' in obj) {
|
|
269
|
+
delete obj.abi;
|
|
270
|
+
}
|
|
259
271
|
|
|
260
|
-
|
|
272
|
+
// Process cause property
|
|
273
|
+
if (obj.cause) {
|
|
274
|
+
stripAbis(obj.cause);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Process arrays and objects
|
|
278
|
+
Object.values(obj).forEach(value => {
|
|
279
|
+
if (value && typeof value === 'object') {
|
|
280
|
+
stripAbis(value);
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Best-effort decode of a raw revert payload (`0x...`) against an ABI.
|
|
287
|
+
* Returns a human-readable `ErrorName(arg1, arg2, ...)` string, or `undefined` if the selector
|
|
288
|
+
* is unknown or the payload is empty. Use to surface decoded error names alongside the raw
|
|
289
|
+
* payload in log lines for operators.
|
|
290
|
+
*/
|
|
291
|
+
export function tryDecodeRevertReason(data: Hex | undefined, abi: Abi): string | undefined {
|
|
292
|
+
if (!data || data === '0x') {
|
|
293
|
+
return undefined;
|
|
294
|
+
}
|
|
295
|
+
try {
|
|
296
|
+
const decoded = decodeErrorResult({ abi, data });
|
|
297
|
+
return `${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`;
|
|
298
|
+
} catch {
|
|
299
|
+
return undefined;
|
|
300
|
+
}
|
|
261
301
|
}
|
|
262
302
|
|
|
263
303
|
export function tryGetCustomErrorName(err: any) {
|
|
@@ -270,7 +310,35 @@ export function tryGetCustomErrorName(err: any) {
|
|
|
270
310
|
return (revertError as ContractFunctionRevertedError).data?.errorName;
|
|
271
311
|
}
|
|
272
312
|
}
|
|
273
|
-
} catch
|
|
313
|
+
} catch {
|
|
274
314
|
return undefined;
|
|
275
315
|
}
|
|
276
316
|
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Type guard to check if a transaction is a blob transaction (EIP-4844).
|
|
320
|
+
* Blob transactions have maxFeePerBlobGas and blobVersionedHashes fields.
|
|
321
|
+
*/
|
|
322
|
+
export function isBlobTransaction(tx: FormattedTransaction): tx is FormattedTransaction & {
|
|
323
|
+
maxFeePerBlobGas: bigint;
|
|
324
|
+
blobVersionedHashes: readonly Hex[];
|
|
325
|
+
} {
|
|
326
|
+
return (
|
|
327
|
+
'maxFeePerBlobGas' in tx &&
|
|
328
|
+
tx.maxFeePerBlobGas !== undefined &&
|
|
329
|
+
'blobVersionedHashes' in tx &&
|
|
330
|
+
tx.blobVersionedHashes !== undefined
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Calculates a percentile from an array of bigints
|
|
336
|
+
*/
|
|
337
|
+
export function calculatePercentile(values: bigint[], percentile: number): bigint {
|
|
338
|
+
if (values.length === 0) {
|
|
339
|
+
return 0n;
|
|
340
|
+
}
|
|
341
|
+
const sorted = [...values].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
|
|
342
|
+
const index = Math.ceil((sorted.length - 1) * (percentile / 100));
|
|
343
|
+
return sorted[index];
|
|
344
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The address of the zk passport verifier on sepolia
|
|
5
|
+
* get address from: ROOT/l1-contracts/lib/circuits/src/solidity/deployments/deployment-11155111.json
|
|
6
|
+
*/
|
|
7
|
+
export const ZK_PASSPORT_VERIFIER_ADDRESS = EthAddress.fromString('0x3101Bad9eA5fACadA5554844a1a88F7Fe48D4DE0');
|
|
8
|
+
/**
|
|
9
|
+
* The default domain of the zk passport site
|
|
10
|
+
*/
|
|
11
|
+
export const ZK_PASSPORT_DOMAIN = 'testnet.aztec.network';
|
|
12
|
+
/**
|
|
13
|
+
* The default scope of the zk passport proofs
|
|
14
|
+
*/
|
|
15
|
+
export const ZK_PASSPORT_SCOPE = 'personhood';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import { type Hex } from 'viem';
|
|
3
|
-
import type { L1BlobInputs, L1GasConfig, L1TxRequest, L1TxUtils } from '../l1_tx_utils.js';
|
|
4
|
-
import type { L1Clients, ViemPublicClient, ViemWalletClient } from '../types.js';
|
|
5
|
-
export declare class ForwarderContract {
|
|
6
|
-
readonly client: L1Clients['publicClient'];
|
|
7
|
-
readonly rollupAddress: Hex;
|
|
8
|
-
private readonly forwarder;
|
|
9
|
-
constructor(client: L1Clients['publicClient'], address: Hex, rollupAddress: Hex);
|
|
10
|
-
static create(owner: Hex, walletClient: ViemWalletClient, publicClient: ViemPublicClient, logger: Logger, rollupAddress: Hex): Promise<ForwarderContract>;
|
|
11
|
-
getAddress(): `0x${string}`;
|
|
12
|
-
forward(requests: L1TxRequest[], l1TxUtils: L1TxUtils, gasConfig: L1GasConfig | undefined, blobConfig: L1BlobInputs | undefined, logger: Logger): Promise<{
|
|
13
|
-
receipt: import("viem").TransactionReceipt;
|
|
14
|
-
gasPrice: import("../l1_tx_utils.js").GasPrice;
|
|
15
|
-
stats: import("../l1_tx_utils.js").TransactionStats | undefined;
|
|
16
|
-
errorMsg?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
receipt: import("viem").TransactionReceipt;
|
|
19
|
-
gasPrice: import("../l1_tx_utils.js").GasPrice;
|
|
20
|
-
errorMsg: string | undefined;
|
|
21
|
-
stats?: undefined;
|
|
22
|
-
}>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=forwarder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forwarder.d.ts","sourceRoot":"","sources":["../../src/contracts/forwarder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EAGL,KAAK,GAAG,EAGT,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGjF,qBAAa,iBAAiB;aAGA,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC;aAAgC,aAAa,EAAE,GAAG;IAF/G,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+D;gBAE7D,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,EAAkB,aAAa,EAAE,GAAG;WAIlG,MAAM,CACjB,KAAK,EAAE,GAAG,EACV,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,GAAG;IAwBb,UAAU;IAIJ,OAAO,CAClB,QAAQ,EAAE,WAAW,EAAE,EACvB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,UAAU,EAAE,YAAY,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM;;;;;;;;;;;CAqEjB"}
|