@atomiqlabs/chain-evm 1.0.3 → 1.0.5
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/dist/chains/botanix/BotanixInitializer.js +2 -1
- package/dist/chains/citrea/CitreaInitializer.js +2 -1
- package/dist/evm/chain/EVMChainInterface.d.ts +2 -1
- package/dist/evm/chain/EVMChainInterface.js +2 -2
- package/dist/evm/chain/modules/EVMTransactions.js +1 -1
- package/package.json +1 -1
- package/src/chains/botanix/BotanixInitializer.ts +2 -1
- package/src/chains/citrea/CitreaInitializer.ts +2 -1
- package/src/evm/chain/EVMChainInterface.ts +6 -3
- package/src/evm/chain/modules/EVMTransactions.ts +1 -1
|
@@ -88,7 +88,8 @@ function initializeBotanix(options, bitcoinRpc, network) {
|
|
|
88
88
|
maxLogsBlockRange: options?.evmConfig?.maxLogsBlockRange ?? 950,
|
|
89
89
|
maxLogTopics: options?.evmConfig?.maxLogTopics ?? 64,
|
|
90
90
|
maxParallelLogRequests: options?.evmConfig?.maxParallelLogRequests ?? 5,
|
|
91
|
-
maxParallelCalls: options?.evmConfig?.maxParallelCalls ?? 5
|
|
91
|
+
maxParallelCalls: options?.evmConfig?.maxParallelCalls ?? 5,
|
|
92
|
+
useAccessLists: options?.evmConfig?.useAccessLists
|
|
92
93
|
}, options.retryPolicy, Fees);
|
|
93
94
|
const btcRelay = new EVMBtcRelay_1.EVMBtcRelay(chainInterface, bitcoinRpc, network, options.btcRelayContract ?? defaultContractAddresses.btcRelayContract, options.btcRelayDeploymentHeight ?? defaultContractAddresses.btcRelayDeploymentHeight);
|
|
94
95
|
const swapContract = new EVMSwapContract_1.EVMSwapContract(chainInterface, btcRelay, options.swapContract ?? defaultContractAddresses.swapContract, {
|
|
@@ -94,7 +94,8 @@ function initializeCitrea(options, bitcoinRpc, network) {
|
|
|
94
94
|
maxLogsBlockRange: options?.evmConfig?.maxLogsBlockRange ?? 950,
|
|
95
95
|
maxLogTopics: options?.evmConfig?.maxLogTopics ?? 64,
|
|
96
96
|
maxParallelLogRequests: options?.evmConfig?.maxParallelLogRequests ?? 5,
|
|
97
|
-
maxParallelCalls: options?.evmConfig?.maxParallelCalls ?? 5
|
|
97
|
+
maxParallelCalls: options?.evmConfig?.maxParallelCalls ?? 5,
|
|
98
|
+
useAccessLists: options?.evmConfig?.useAccessLists
|
|
98
99
|
}, options.retryPolicy, Fees);
|
|
99
100
|
chainInterface.Tokens = new CitreaTokens_1.CitreaTokens(chainInterface); //Override with custom token module allowing l1 state diff based fee calculation
|
|
100
101
|
const btcRelay = new CitreaBtcRelay_1.CitreaBtcRelay(chainInterface, bitcoinRpc, network, options.btcRelayContract ?? defaultContractAddresses.btcRelayContract, options.btcRelayDeploymentHeight ?? defaultContractAddresses.btcRelayDeploymentHeight);
|
|
@@ -20,6 +20,7 @@ export type EVMConfiguration = {
|
|
|
20
20
|
maxParallelLogRequests: number;
|
|
21
21
|
maxParallelCalls: number;
|
|
22
22
|
maxLogTopics: number;
|
|
23
|
+
useAccessLists?: boolean;
|
|
23
24
|
};
|
|
24
25
|
export declare class EVMChainInterface<ChainId extends string = string> implements ChainInterface<EVMTx, EVMSigner, ChainId, Signer> {
|
|
25
26
|
readonly chainId: ChainId;
|
|
@@ -46,7 +47,7 @@ export declare class EVMChainInterface<ChainId extends string = string> implemen
|
|
|
46
47
|
offBeforeTxSigned(callback: (tx: TransactionRequest) => Promise<void>): boolean;
|
|
47
48
|
randomAddress(): string;
|
|
48
49
|
randomSigner(): EVMSigner;
|
|
49
|
-
sendAndConfirm(signer: EVMSigner, txs: TransactionRequest[], waitForConfirmation?: boolean, abortSignal?: AbortSignal, parallel?: boolean, onBeforePublish?: (txId: string, rawTx: string) => Promise<void
|
|
50
|
+
sendAndConfirm(signer: EVMSigner, txs: TransactionRequest[], waitForConfirmation?: boolean, abortSignal?: AbortSignal, parallel?: boolean, onBeforePublish?: (txId: string, rawTx: string) => Promise<void>, useAccessLists?: boolean): Promise<string[]>;
|
|
50
51
|
serializeTx(tx: Transaction): Promise<string>;
|
|
51
52
|
deserializeTx(txData: string): Promise<Transaction>;
|
|
52
53
|
getTxIdStatus(txId: string): Promise<"not_found" | "pending" | "success" | "reverted">;
|
|
@@ -67,8 +67,8 @@ class EVMChainInterface {
|
|
|
67
67
|
}
|
|
68
68
|
////////////////////////////////////////////
|
|
69
69
|
//// Transactions
|
|
70
|
-
sendAndConfirm(signer, txs, waitForConfirmation, abortSignal, parallel, onBeforePublish) {
|
|
71
|
-
return this.Transactions.sendAndConfirm(signer, txs, waitForConfirmation, abortSignal, parallel, onBeforePublish);
|
|
70
|
+
sendAndConfirm(signer, txs, waitForConfirmation, abortSignal, parallel, onBeforePublish, useAccessLists) {
|
|
71
|
+
return this.Transactions.sendAndConfirm(signer, txs, waitForConfirmation, abortSignal, parallel, onBeforePublish, useAccessLists);
|
|
72
72
|
}
|
|
73
73
|
serializeTx(tx) {
|
|
74
74
|
return this.Transactions.serializeTx(tx);
|
|
@@ -154,7 +154,7 @@ class EVMTransactions extends EVMModule_1.EVMModule {
|
|
|
154
154
|
* @param useAccessLists
|
|
155
155
|
*/
|
|
156
156
|
async sendAndConfirm(signer, txs, waitForConfirmation, abortSignal, parallel, onBeforePublish, useAccessLists) {
|
|
157
|
-
await this.prepareTransactions(signer, txs, useAccessLists);
|
|
157
|
+
await this.prepareTransactions(signer, txs, useAccessLists ?? this.root.config.useAccessLists);
|
|
158
158
|
const signedTxs = [];
|
|
159
159
|
//Don't separate the signing process from the sending when using browser-based wallet
|
|
160
160
|
if (signer.signTransaction != null)
|
package/package.json
CHANGED
|
@@ -125,7 +125,8 @@ export function initializeBotanix(
|
|
|
125
125
|
maxLogsBlockRange: options?.evmConfig?.maxLogsBlockRange ?? 950,
|
|
126
126
|
maxLogTopics: options?.evmConfig?.maxLogTopics ?? 64,
|
|
127
127
|
maxParallelLogRequests: options?.evmConfig?.maxParallelLogRequests ?? 5,
|
|
128
|
-
maxParallelCalls: options?.evmConfig?.maxParallelCalls ?? 5
|
|
128
|
+
maxParallelCalls: options?.evmConfig?.maxParallelCalls ?? 5,
|
|
129
|
+
useAccessLists: options?.evmConfig?.useAccessLists
|
|
129
130
|
}, options.retryPolicy, Fees);
|
|
130
131
|
|
|
131
132
|
const btcRelay = new EVMBtcRelay(
|
|
@@ -131,7 +131,8 @@ export function initializeCitrea(
|
|
|
131
131
|
maxLogsBlockRange: options?.evmConfig?.maxLogsBlockRange ?? 950,
|
|
132
132
|
maxLogTopics: options?.evmConfig?.maxLogTopics ?? 64,
|
|
133
133
|
maxParallelLogRequests: options?.evmConfig?.maxParallelLogRequests ?? 5,
|
|
134
|
-
maxParallelCalls: options?.evmConfig?.maxParallelCalls ?? 5
|
|
134
|
+
maxParallelCalls: options?.evmConfig?.maxParallelCalls ?? 5,
|
|
135
|
+
useAccessLists: options?.evmConfig?.useAccessLists
|
|
135
136
|
}, options.retryPolicy, Fees);
|
|
136
137
|
chainInterface.Tokens = new CitreaTokens(chainInterface); //Override with custom token module allowing l1 state diff based fee calculation
|
|
137
138
|
|
|
@@ -32,7 +32,9 @@ export type EVMConfiguration = {
|
|
|
32
32
|
maxLogsBlockRange: number,
|
|
33
33
|
maxParallelLogRequests: number,
|
|
34
34
|
maxParallelCalls: number,
|
|
35
|
-
maxLogTopics: number
|
|
35
|
+
maxLogTopics: number,
|
|
36
|
+
|
|
37
|
+
useAccessLists?: boolean
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
export class EVMChainInterface<ChainId extends string = string> implements ChainInterface<EVMTx, EVMSigner, ChainId, Signer> {
|
|
@@ -135,9 +137,10 @@ export class EVMChainInterface<ChainId extends string = string> implements Chain
|
|
|
135
137
|
waitForConfirmation?: boolean,
|
|
136
138
|
abortSignal?: AbortSignal,
|
|
137
139
|
parallel?: boolean,
|
|
138
|
-
onBeforePublish?: (txId: string, rawTx: string) => Promise<void
|
|
140
|
+
onBeforePublish?: (txId: string, rawTx: string) => Promise<void>,
|
|
141
|
+
useAccessLists?: boolean
|
|
139
142
|
): Promise<string[]> {
|
|
140
|
-
return this.Transactions.sendAndConfirm(signer, txs, waitForConfirmation, abortSignal, parallel, onBeforePublish);
|
|
143
|
+
return this.Transactions.sendAndConfirm(signer, txs, waitForConfirmation, abortSignal, parallel, onBeforePublish, useAccessLists);
|
|
141
144
|
}
|
|
142
145
|
|
|
143
146
|
serializeTx(tx: Transaction): Promise<string> {
|
|
@@ -189,7 +189,7 @@ export class EVMTransactions extends EVMModule<any> {
|
|
|
189
189
|
abortSignal?: AbortSignal, parallel?: boolean, onBeforePublish?: (txId: string, rawTx: string) => Promise<void>,
|
|
190
190
|
useAccessLists?: boolean
|
|
191
191
|
): Promise<string[]> {
|
|
192
|
-
await this.prepareTransactions(signer, txs, useAccessLists);
|
|
192
|
+
await this.prepareTransactions(signer, txs, useAccessLists ?? this.root.config.useAccessLists);
|
|
193
193
|
const signedTxs: Transaction[] = [];
|
|
194
194
|
|
|
195
195
|
//Don't separate the signing process from the sending when using browser-based wallet
|