@atomiqlabs/chain-starknet 6.0.0-beta.3 → 6.0.0-beta.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.
|
@@ -13,7 +13,7 @@ function starknetGasAdd(a, b) {
|
|
|
13
13
|
}
|
|
14
14
|
exports.starknetGasAdd = starknetGasAdd;
|
|
15
15
|
class StarknetFees {
|
|
16
|
-
constructor(provider, maxFeeRate = { l1GasCost:
|
|
16
|
+
constructor(provider, maxFeeRate = { l1GasCost: 20000000000000000n, l2GasCost: 4000000000000000n, l1DataGasCost: 10000000000000000n }, feeMultiplier = 1.25, da) {
|
|
17
17
|
this.logger = (0, Utils_1.getLogger)("StarknetFees: ");
|
|
18
18
|
this.blockFeeCache = null;
|
|
19
19
|
this.provider = provider;
|
|
@@ -225,10 +225,10 @@ class StarknetTransactions extends StarknetModule_1.StarknetModule {
|
|
|
225
225
|
});
|
|
226
226
|
if (status == null)
|
|
227
227
|
return "not_found";
|
|
228
|
-
if (status.finality_status === starknet_1.ETransactionStatus.RECEIVED)
|
|
229
|
-
return "pending";
|
|
230
228
|
if (status.finality_status === starknet_1.ETransactionStatus.REJECTED)
|
|
231
229
|
return "rejected";
|
|
230
|
+
if (status.finality_status !== starknet_1.ETransactionStatus.ACCEPTED_ON_L2 && status.finality_status !== starknet_1.ETransactionStatus.ACCEPTED_ON_L1)
|
|
231
|
+
return "pending";
|
|
232
232
|
if (status.execution_status === starknet_1.ETransactionExecutionStatus.SUCCEEDED) {
|
|
233
233
|
return "success";
|
|
234
234
|
}
|
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@ export class StarknetFees {
|
|
|
41
41
|
|
|
42
42
|
constructor(
|
|
43
43
|
provider: Provider,
|
|
44
|
-
maxFeeRate: StarknetFeeRate = {l1GasCost:
|
|
44
|
+
maxFeeRate: StarknetFeeRate = {l1GasCost: 20_000_000_000_000_000n, l2GasCost: 4_000_000_000_000_000n, l1DataGasCost: 10_000_000_000_000_000n},
|
|
45
45
|
feeMultiplier: number = 1.25,
|
|
46
46
|
da?: {fee?: "L1" | "L2", nonce?: "L1" | "L2"}
|
|
47
47
|
) {
|
|
@@ -249,8 +249,8 @@ export class StarknetTransactions extends StarknetModule {
|
|
|
249
249
|
throw e;
|
|
250
250
|
});
|
|
251
251
|
if(status==null) return "not_found";
|
|
252
|
-
if(status.finality_status===ETransactionStatus.RECEIVED) return "pending";
|
|
253
252
|
if(status.finality_status===ETransactionStatus.REJECTED) return "rejected";
|
|
253
|
+
if(status.finality_status!==ETransactionStatus.ACCEPTED_ON_L2 && status.finality_status!==ETransactionStatus.ACCEPTED_ON_L1) return "pending";
|
|
254
254
|
if(status.execution_status===ETransactionExecutionStatus.SUCCEEDED){
|
|
255
255
|
return "success";
|
|
256
256
|
}
|