@atomiqlabs/chain-starknet 1.0.6 → 1.0.8
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.
|
@@ -15,12 +15,12 @@ class StarknetTransactions extends StarknetModule_1.StarknetModule {
|
|
|
15
15
|
async confirmTransaction(tx, abortSignal) {
|
|
16
16
|
let state = "pending";
|
|
17
17
|
while (state === "pending" || state === "not_found") {
|
|
18
|
-
await (0, Utils_1.timeoutPromise)(
|
|
18
|
+
await (0, Utils_1.timeoutPromise)(3000, abortSignal);
|
|
19
19
|
state = await this.getTxIdStatus(tx.txId);
|
|
20
20
|
if (state === "not_found" && tx.signed != null)
|
|
21
21
|
await this.sendSignedTransaction(tx, undefined, undefined, false).catch(e => {
|
|
22
|
-
if (e.
|
|
23
|
-
return;
|
|
22
|
+
if (e.baseError?.code === 59)
|
|
23
|
+
return; //Transaction already in the mempool
|
|
24
24
|
console.error("Error on transaction re-send: ", e);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -25,7 +25,7 @@ function serializeBlockHeader(e) {
|
|
|
25
25
|
const GAS_PER_BLOCKHEADER = 750;
|
|
26
26
|
const GAS_PER_BLOCKHEADER_FORK = 750;
|
|
27
27
|
const btcRelayAddreses = {
|
|
28
|
-
[starknet_1.constants.StarknetChainId.SN_SEPOLIA]: "
|
|
28
|
+
[starknet_1.constants.StarknetChainId.SN_SEPOLIA]: "0x068601c79da2231d21e015ccfd59c243861156fa523a12c9f987ec28eb8dbc8c",
|
|
29
29
|
[starknet_1.constants.StarknetChainId.SN_MAIN]: "0x057b14a4231b82f1e525ff35a722d893ca3dd2bde0baa6cee97937c5be861dbc"
|
|
30
30
|
};
|
|
31
31
|
function serializeCalldata(headers, storedHeader, span) {
|
package/package.json
CHANGED
|
@@ -36,10 +36,10 @@ export class StarknetTransactions extends StarknetModule {
|
|
|
36
36
|
private async confirmTransaction(tx: StarknetTx, abortSignal?: AbortSignal) {
|
|
37
37
|
let state = "pending";
|
|
38
38
|
while(state==="pending" || state==="not_found") {
|
|
39
|
-
await timeoutPromise(
|
|
39
|
+
await timeoutPromise(3000, abortSignal);
|
|
40
40
|
state = await this.getTxIdStatus(tx.txId);
|
|
41
41
|
if(state==="not_found" && tx.signed!=null) await this.sendSignedTransaction(tx, undefined, undefined, false).catch(e => {
|
|
42
|
-
if(e.
|
|
42
|
+
if(e.baseError?.code === 59) return; //Transaction already in the mempool
|
|
43
43
|
console.error("Error on transaction re-send: ", e);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -33,7 +33,7 @@ const GAS_PER_BLOCKHEADER = 750;
|
|
|
33
33
|
const GAS_PER_BLOCKHEADER_FORK = 750;
|
|
34
34
|
|
|
35
35
|
const btcRelayAddreses = {
|
|
36
|
-
[constants.StarknetChainId.SN_SEPOLIA]: "
|
|
36
|
+
[constants.StarknetChainId.SN_SEPOLIA]: "0x068601c79da2231d21e015ccfd59c243861156fa523a12c9f987ec28eb8dbc8c",
|
|
37
37
|
[constants.StarknetChainId.SN_MAIN]: "0x057b14a4231b82f1e525ff35a722d893ca3dd2bde0baa6cee97937c5be861dbc"
|
|
38
38
|
};
|
|
39
39
|
|