@argent/x-shared 1.74.2 → 1.75.0
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/index.cjs +1 -1
- package/dist/index.js +212 -209
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +12 -13
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -1
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +60 -60
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +1 -1
- package/dist/src/chains/starknet/address.cjs +1 -1
- package/dist/src/chains/starknet/address.js +16 -16
- package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.cjs +1 -1
- package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.js +27 -27
- package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.cjs +1 -1
- package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.js +22 -22
- package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.cjs +1 -1
- package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.js +14 -14
- package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.cjs +1 -1
- package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.js +9 -9
- package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.cjs +1 -1
- package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.js +13 -13
- package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.cjs +1 -1
- package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.js +24 -25
- package/dist/src/features/simulation/activity/normalize.cjs +1 -1
- package/dist/src/features/simulation/activity/normalize.js +12 -13
- package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/createNativeActivity.js +22 -24
- package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +11 -12
- package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +2 -8
- package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.js +4 -8
- package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js +4 -8
- package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +3 -9
- package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js +4 -8
- package/dist/src/features/simulation/activity/utils/isSwapActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isSwapActivity.js +9 -16
- package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +4 -8
- package/dist/src/features/simulation/fees/schema.cjs +1 -1
- package/dist/src/features/simulation/fees/schema.d.ts +16 -0
- package/dist/src/features/simulation/fees/schema.js +8 -6
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +10 -11
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/schema.d.ts +23 -0
- package/dist/src/features/simulation/transactionReview/schema.js +20 -18
- package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -1
- package/dist/src/features/swap/services/SwapTransactionService.js +46 -49
- package/dist/src/http/HttpService.cjs +1 -1
- package/dist/src/http/HttpService.js +55 -55
- package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -1
- package/dist/src/knownDapps/utils/getDapplandUrl.js +6 -8
- package/dist/src/nfts/BackendNftService.cjs +1 -1
- package/dist/src/nfts/BackendNftService.js +15 -16
- package/dist/src/tokens/service/implementation.cjs +1 -1
- package/dist/src/tokens/service/implementation.js +12 -12
- package/dist/src/transactions/estimate/utils.cjs +1 -1
- package/dist/src/transactions/estimate/utils.d.ts +33 -0
- package/dist/src/transactions/estimate/utils.js +80 -76
- package/dist/src/transactions/service/implementation.cjs +1 -1
- package/dist/src/transactions/service/implementation.d.ts +4 -0
- package/dist/src/transactions/service/implementation.js +89 -96
- package/dist/src/transactions/service/utils.cjs +1 -1
- package/dist/src/transactions/service/utils.d.ts +2 -3
- package/dist/src/transactions/service/utils.js +12 -11
- package/dist/src/transactions/transactionVersion.cjs +1 -1
- package/dist/src/transactions/transactionVersion.d.ts +2 -0
- package/dist/src/transactions/transactionVersion.js +12 -10
- package/dist/src/utils/readFileAsString.cjs +1 -1
- package/dist/src/utils/readFileAsString.js +3 -6
- package/package.json +5 -5
- package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.cjs +0 -1
- package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.js +0 -6
|
@@ -7,8 +7,8 @@ class k {
|
|
|
7
7
|
constructor(e, t) {
|
|
8
8
|
this.apiBase = e, this.httpService = t;
|
|
9
9
|
}
|
|
10
|
-
async getNfts(e, t,
|
|
11
|
-
const
|
|
10
|
+
async getNfts(e, t, o, s = 1) {
|
|
11
|
+
const a = this.normalizeAddress(o), c = n(this.apiBase, "pandora", e, t), m = this.pageToPageIndex(s), l = `${n(c, "profile", a, "nfts")}?page=${m}&size=${A}`, i = await this.httpService.get(l), r = i.content.map((p) => this.mapItem(p, o));
|
|
12
12
|
return {
|
|
13
13
|
totalPages: i.totalPages,
|
|
14
14
|
page: i.number + 1,
|
|
@@ -16,8 +16,8 @@ class k {
|
|
|
16
16
|
nfts: r
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
async getCollection(e, t,
|
|
20
|
-
const s = this.normalizeAddress(
|
|
19
|
+
async getCollection(e, t, o) {
|
|
20
|
+
const s = this.normalizeAddress(o), a = n(this.apiBase, "pandora", e, t), c = n(a, "collection", s), m = `${a}/collection/${s}`, [g, l] = await Promise.all([
|
|
21
21
|
this.httpService.get(c),
|
|
22
22
|
this.httpService.get(m)
|
|
23
23
|
]), i = h(g), r = l.content.map((p) => this.mapItem(p));
|
|
@@ -31,14 +31,14 @@ class k {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
async getNft(e, t,
|
|
35
|
-
const
|
|
34
|
+
async getNft(e, t, o, s) {
|
|
35
|
+
const a = this.normalizeAddress(o), c = n(this.apiBase, "pandora", e, t), m = n(c, "nft", a, s), g = await this.httpService.get(m);
|
|
36
36
|
return this.mapItem(g);
|
|
37
37
|
}
|
|
38
|
-
async getProfileCollections(e, t,
|
|
39
|
-
const c = this.pageToPageIndex(s), m = this.normalizeAddress(
|
|
38
|
+
async getProfileCollections(e, t, o, s = 1, a = !1) {
|
|
39
|
+
const c = this.pageToPageIndex(s), m = this.normalizeAddress(o), g = n(this.apiBase, "pandora", e, t), l = n(g, "profile", m, "collections", `?page=${c}&size=${A}`), i = await this.httpService.get(l), r = [];
|
|
40
40
|
for (const p of i.content)
|
|
41
|
-
if (
|
|
41
|
+
if (a) {
|
|
42
42
|
const u = await this.getCollectionMetrics(e, t, p.contractAddress);
|
|
43
43
|
r.push(h(p, u));
|
|
44
44
|
} else
|
|
@@ -50,8 +50,8 @@ class k {
|
|
|
50
50
|
collections: r
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
async getCollectionMetrics(e, t,
|
|
54
|
-
const s = this.normalizeAddress(
|
|
53
|
+
async getCollectionMetrics(e, t, o) {
|
|
54
|
+
const s = this.normalizeAddress(o), a = n(this.apiBase, "pandora", e, t), c = n(a, "collection", s, "metrics");
|
|
55
55
|
return this.httpService.get(c);
|
|
56
56
|
}
|
|
57
57
|
normalizeAddress(e) {
|
|
@@ -66,22 +66,21 @@ class k {
|
|
|
66
66
|
return t;
|
|
67
67
|
}
|
|
68
68
|
mapItem(e, t) {
|
|
69
|
-
|
|
70
|
-
const a = e.name ?? e.tokenId;
|
|
69
|
+
const o = e.name ?? e.tokenId;
|
|
71
70
|
return {
|
|
72
71
|
token_id: e.tokenId,
|
|
73
72
|
contract_address: e.contractAddress,
|
|
74
|
-
name:
|
|
73
|
+
name: o,
|
|
75
74
|
spec: "spec" in e ? w(e.spec) : void 0,
|
|
76
75
|
description: "",
|
|
77
76
|
best_bid_order: {
|
|
78
77
|
payment_amount: "bestListPrice" in e ? BigInt(e.bestListPrice) : void 0
|
|
79
78
|
},
|
|
80
|
-
properties: "properties" in e && e.properties.map((
|
|
79
|
+
properties: "properties" in e && e.properties.map((s) => ({ key: s.key, value: s.value })) || [],
|
|
81
80
|
image_uri: e.imageUrls.preview,
|
|
82
81
|
image_url_copy: e.imageUrls.full,
|
|
83
82
|
owner: {
|
|
84
|
-
account_address:
|
|
83
|
+
account_address: e.owner?.address || t
|
|
85
84
|
},
|
|
86
85
|
contract_name: b(e.contractAddress)
|
|
87
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),r=require("../../utils/retryUntilInitialised.cjs"),i=require("./types/backend.model.cjs"),h=require("../../utils/schemas.cjs");class d{constructor(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),r=require("../../utils/retryUntilInitialised.cjs"),i=require("./types/backend.model.cjs"),h=require("../../utils/schemas.cjs");class d{constructor(s,e){this.apiBase=s,this.httpService=e,this.TOKENS_INFO_URL="/tokens/info"}async fetchTokensInfoFromBackend(s){const e=o(this.apiBase,this.TOKENS_INFO_URL,s??"","?chain=starknet"),t=await this.httpService.get(e),n=i.apiTokensInfoResponseSchema.safeParse(t);if(n.success)return n.data.tokens;const a=i.apiTokenInfoResponseSchema.safeParse(t);if(a.success)return[a.data]}async fetchAddressTokenBalancesFromBackend(s,e,t){const n=o(this.apiBase,"activity","starknet",e,"account",s,"balance"),a=await r.retryUntilInitialised(()=>this.httpService.get(n),i.apiAccountTokenBalancesSchema,t);return(a?.status==="initialised"?a.balances:[]).map(c=>({address:c.tokenAddress,balance:c.tokenBalance,networkId:e}))}async fetchDefiDecomposition(s,e){const t=o(this.apiBase,"tokens/defi",s,"investments","?chain=starknet",`&application=${e}`),n=await this.httpService.get(t);return h.safeParseAndWarn(i.apiDefiPositionsSchema,n).success||console.error("Backend schema has changed. Make the changes to the models to prevent unknown/unhandled errors."),n.dapps}}exports.TokenServiceWeb=d;
|
|
@@ -3,37 +3,37 @@ import { retryUntilInitialised as c } from "../../utils/retryUntilInitialised.js
|
|
|
3
3
|
import { apiTokensInfoResponseSchema as r, apiTokenInfoResponseSchema as p, apiAccountTokenBalancesSchema as h, apiDefiPositionsSchema as d } from "./types/backend.model.js";
|
|
4
4
|
import { safeParseAndWarn as k } from "../../utils/schemas.js";
|
|
5
5
|
class v {
|
|
6
|
-
constructor(
|
|
7
|
-
this.apiBase =
|
|
6
|
+
constructor(s, e) {
|
|
7
|
+
this.apiBase = s, this.httpService = e, this.TOKENS_INFO_URL = "/tokens/info";
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Fetch tokens info from backend
|
|
11
11
|
* @param {Address} tokenAddress - The token address.
|
|
12
12
|
* @returns {Promise<ApiTokenInfo[]>} - The fetched tokens or undefined if there was an error or not default network
|
|
13
13
|
*/
|
|
14
|
-
async fetchTokensInfoFromBackend(
|
|
15
|
-
const e = o(this.apiBase, this.TOKENS_INFO_URL,
|
|
14
|
+
async fetchTokensInfoFromBackend(s) {
|
|
15
|
+
const e = o(this.apiBase, this.TOKENS_INFO_URL, s ?? "", "?chain=starknet"), t = await this.httpService.get(e), n = r.safeParse(t);
|
|
16
16
|
if (n.success)
|
|
17
17
|
return n.data.tokens;
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
return [
|
|
18
|
+
const a = p.safeParse(t);
|
|
19
|
+
if (a.success)
|
|
20
|
+
return [a.data];
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Fetch list of tokens and balances for given account from backend
|
|
24
24
|
* @param {Address} address - The account address.
|
|
25
25
|
* @returns {Promise<WebBaseTokenWithBalance[]>} - The fetched balances for the account address.
|
|
26
26
|
*/
|
|
27
|
-
async fetchAddressTokenBalancesFromBackend(
|
|
28
|
-
const n = o(this.apiBase, "activity", "starknet", e, "account",
|
|
29
|
-
return (
|
|
27
|
+
async fetchAddressTokenBalancesFromBackend(s, e, t) {
|
|
28
|
+
const n = o(this.apiBase, "activity", "starknet", e, "account", s, "balance"), a = await c(() => this.httpService.get(n), h, t);
|
|
29
|
+
return (a?.status === "initialised" ? a.balances : []).map((i) => ({
|
|
30
30
|
address: i.tokenAddress,
|
|
31
31
|
balance: i.tokenBalance,
|
|
32
32
|
networkId: e
|
|
33
33
|
}));
|
|
34
34
|
}
|
|
35
|
-
async fetchDefiDecomposition(
|
|
36
|
-
const
|
|
35
|
+
async fetchDefiDecomposition(s, e) {
|
|
36
|
+
const t = o(this.apiBase, "tokens/defi", s, "investments", "?chain=starknet", `&application=${e}`), n = await this.httpService.get(t);
|
|
37
37
|
return k(d, n).success || console.error("Backend schema has changed. Make the changes to the models to prevent unknown/unhandled errors."), n.dapps;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("lodash-es"),o=require("starknet"),C=require("./adjustment.cjs"),I=require("./argentMaxFee.cjs"),p=require("./error.cjs"),T=require("../../chains/starknet/constants.cjs"),g=require("../../chains/starknet/address.cjs"),D=e=>{const{transactions:t}=e;if(!t)throw new p.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});if(!Array.isArray(t))throw Error(`Unexpected simulation response. Expected array. Got ${typeof t}`);if(E.isEmpty(t))return[];if(t.length>2)throw Error(`Unexpected simulation response length. Got ${t.length}`);const a=t.map(m=>{if(!m.simulation)throw new p.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});return{...m.simulation,...M(m.simulation.feeEstimations)}}),[s,n]=a.length===1?[a[0],void 0]:[a[1],a[0]],r=y(s,n),i=x(s,n);return[...r,...i]},M=e=>{const[t,a]=E.partition(e,s=>"unit"in s&&s.unit==="FRI");return{nativeFeeEstimations:t,paymasterFeeEstimations:a}},x=(e,t)=>{if(!e)return[];if(!t)return e.paymasterFeeEstimations.map(n=>({type:"paymaster",transactions:l(n),deployment:void 0}));const a=t.paymasterFeeEstimations,s=e.paymasterFeeEstimations;if(a.length!==s.length)throw Error("Deployment and transaction fee estimations length mismatch");return s.map((n,r)=>({type:"paymaster",transactions:l(n),deployment:l(a[r])}))},y=(e,t)=>{if(!e)return[];if(!t)return e.nativeFeeEstimations.map(n=>({type:"native",transactions:F(n),deployment:void 0}));const a=t.nativeFeeEstimations,s=e.nativeFeeEstimations;if(a.length!==s.length)throw Error("Deployment and transaction fee estimations length mismatch");return s.map((n,r)=>({type:"native",transactions:F(n),deployment:F(a[r])}))},l=e=>({feeTokenAddress:e.token.address,maxFee:BigInt(e.maxFee),overallFee:BigInt(e.overallFee),tip:e.defaultTip?o.num.toBigInt(e.defaultTip):void 0}),F=e=>({feeTokenAddress:T.STRK_TOKEN_ADDRESS,overallFee:o.num.toBigInt(e.overallFee),l1Gas:{gasConsumed:o.num.toBigInt(e.resourceBounds.l1Gas.maxAmount),gasPrice:o.num.toBigInt(e.resourceBounds.l1Gas.maxPricePerUnit)},l1DataGas:{gasConsumed:o.num.toBigInt(e.resourceBounds.l1DataGas.maxAmount),gasPrice:o.num.toBigInt(e.resourceBounds.l1DataGas.maxPricePerUnit)},l2Gas:{gasConsumed:o.num.toBigInt(e.resourceBounds.l2Gas.maxAmount),gasPrice:o.num.toBigInt(e.resourceBounds.l2Gas.maxPricePerUnit)},tip:e.defaultTip?o.num.toBigInt(e.defaultTip):void 0}),S=e=>{const{l1Gas:t,l2Gas:a,l1DataGas:s}=e.resourceBounds,n=t.maxAmount*t.maxPricePerUnit+a.maxAmount*a.maxPricePerUnit+s.maxAmount*s.maxPricePerUnit;return o.num.toBigInt(n)},k=e=>{const{type:t,deployment:a,transactions:s}=e;if(t==="paymaster")return s.maxFee+(a?.maxFee??0n);if(a&&!g.isEqualAddress(a.feeTokenAddress,s.feeTokenAddress))throw Error("Cannot calculate estimated fees for different tokens");const n=!s.overallFee&&!a?.overallFee,r=d=>n?G(d):c(d),i=a?r(a):0n,m=r(s);return i+m},R=e=>e.transactions.overallFee?e.transactions.overallFee+(e.deployment?.overallFee??0n):A(e),v=(e=[])=>e.filter(a=>a.type==="native"),w=e=>e.filter(t=>t.type==="paymaster"),f=()=>T.STRK_TOKEN_ADDRESS,B=(e=[],t)=>{const a=v(e).find(s=>g.isEqualAddress(s.transactions.feeTokenAddress,t));if(!a)throw Error(`No native estimated fee found for ${t}`);return a},P=(e=[])=>{const t=f();return B(e,t)},q=(e=[])=>P(e),A=e=>{if(e.deployment&&!g.isEqualAddress(e.deployment.feeTokenAddress,e.transactions.feeTokenAddress))throw Error("Cannot calculate estimated fees for different tokens");const t=c(e.transactions),a=e.deployment?c(e.deployment):0n;return t+a},c=e=>{const{l1Gas:t,l2Gas:a,l1DataGas:s}=e;return t.gasConsumed*t.gasPrice+a.gasConsumed*a.gasPrice+s.gasConsumed*s.gasPrice},G=e=>c(h(e)),h=(e,t=C.calculateCubeRootAdjustment)=>{const a=10000n,{l1Gas:s,l2Gas:n,l1DataGas:r}=e,i=s.gasConsumed*s.gasPrice+n.gasConsumed*n.gasPrice+r.gasConsumed*r.gasPrice;if(i<0)throw Error("Cannot calculate max fee for negative fee");const m=o.num.toBigInt(I.argentMaxFee({estimatedFee:i})),d=Number(m)/Number(i),N=t(d),u=BigInt(Math.trunc(N*Number(a)));return{...e,l1Gas:{gasConsumed:s.gasConsumed*u/a,gasPrice:s.gasPrice*u/a},l2Gas:{gasConsumed:n.gasConsumed*u/a,gasPrice:n.gasPrice*u/a},l1DataGas:{gasConsumed:r.gasConsumed*u/a,gasPrice:r.gasPrice*u/a}}},_=e=>{const t=e.overallFee?e:h(e);return{...e,resourceBounds:{l1_gas:U(t.l1Gas),l2_gas:{max_amount:o.num.toHex(t.l2Gas.gasConsumed),max_price_per_unit:o.num.toHex(t.l2Gas.gasPrice)},l1_data_gas:{max_amount:o.num.toHex(t.l1DataGas.gasConsumed),max_price_per_unit:o.num.toHex(t.l1DataGas.gasPrice)}}}},V=e=>({...e,resourceBounds:o.stark.resourceBoundsToBigInt(_(e).resourceBounds)}),U=e=>({max_amount:o.num.toHex(e.gasConsumed),max_price_per_unit:o.num.toHex(e.gasPrice)});exports.estimatedFeeToMaxFeeTotal=G;exports.estimatedFeeToMaxResourceBounds=_;exports.estimatedFeeToMaxResourceBoundsBN=V;exports.estimatedFeeToTotal=c;exports.estimatedFeesToMaxFeeTotalV2=k;exports.estimatedFeesToTotal=A;exports.estimatedFeesToTotalWithOverallFee=R;exports.filterPaymasterEstimatedFees=w;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2=D;exports.getNativeEstimatedFeeByFeeToken=B;exports.getNativeEstimatedFeeByTxVersion=P;exports.getNativeEstimatedFeeForAccount=q;exports.getNativeEstimatedFees=v;exports.getNativeFeeFromSimulation=y;exports.getNativeFeeTokenAddress=f;exports.getPaymasterFeeFromSimulation=x;exports.toMaxFeeEstimation=S;
|
|
@@ -39,4 +39,37 @@ export declare const estimatedFeeToMaxResourceBounds: (estimatedFee: NativeEstim
|
|
|
39
39
|
max_price_per_unit: string;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
+
feeTokenAddress: `0x${string}`;
|
|
43
|
+
l1Gas: {
|
|
44
|
+
gasConsumed: bigint;
|
|
45
|
+
gasPrice: bigint;
|
|
46
|
+
};
|
|
47
|
+
l2Gas: {
|
|
48
|
+
gasConsumed: bigint;
|
|
49
|
+
gasPrice: bigint;
|
|
50
|
+
};
|
|
51
|
+
l1DataGas: {
|
|
52
|
+
gasConsumed: bigint;
|
|
53
|
+
gasPrice: bigint;
|
|
54
|
+
};
|
|
55
|
+
overallFee?: bigint | undefined;
|
|
56
|
+
tip?: bigint | undefined;
|
|
57
|
+
};
|
|
58
|
+
export declare const estimatedFeeToMaxResourceBoundsBN: (estimatedFee: NativeEstimatedFeeData) => {
|
|
59
|
+
resourceBounds: import('starknet').ResourceBoundsBN;
|
|
60
|
+
feeTokenAddress: `0x${string}`;
|
|
61
|
+
l1Gas: {
|
|
62
|
+
gasConsumed: bigint;
|
|
63
|
+
gasPrice: bigint;
|
|
64
|
+
};
|
|
65
|
+
l2Gas: {
|
|
66
|
+
gasConsumed: bigint;
|
|
67
|
+
gasPrice: bigint;
|
|
68
|
+
};
|
|
69
|
+
l1DataGas: {
|
|
70
|
+
gasConsumed: bigint;
|
|
71
|
+
gasPrice: bigint;
|
|
72
|
+
};
|
|
73
|
+
overallFee?: bigint | undefined;
|
|
74
|
+
tip?: bigint | undefined;
|
|
42
75
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { isEmpty as y, partition as
|
|
2
|
-
import { num as
|
|
3
|
-
import { calculateCubeRootAdjustment as
|
|
4
|
-
import { argentMaxFee as
|
|
5
|
-
import { EstimateError as
|
|
1
|
+
import { isEmpty as y, partition as v } from "lodash-es";
|
|
2
|
+
import { stark as P, num as n } from "starknet";
|
|
3
|
+
import { calculateCubeRootAdjustment as T } from "./adjustment.js";
|
|
4
|
+
import { argentMaxFee as B } from "./argentMaxFee.js";
|
|
5
|
+
import { EstimateError as F } from "./error.js";
|
|
6
6
|
import { STRK_TOKEN_ADDRESS as E } from "../../chains/starknet/constants.js";
|
|
7
|
-
import { isEqualAddress as
|
|
8
|
-
const
|
|
7
|
+
import { isEqualAddress as p } from "../../chains/starknet/address.js";
|
|
8
|
+
const j = (e) => {
|
|
9
9
|
const { transactions: t } = e;
|
|
10
10
|
if (!t)
|
|
11
|
-
throw new
|
|
11
|
+
throw new F({ code: "SIMULATE_AND_REVIEW_FAILED" });
|
|
12
12
|
if (!Array.isArray(t))
|
|
13
13
|
throw Error(`Unexpected simulation response. Expected array. Got ${typeof t}`);
|
|
14
14
|
if (y(t))
|
|
@@ -17,104 +17,103 @@ const L = (e) => {
|
|
|
17
17
|
throw Error(`Unexpected simulation response length. Got ${t.length}`);
|
|
18
18
|
const a = t.map((m) => {
|
|
19
19
|
if (!m.simulation)
|
|
20
|
-
throw new
|
|
20
|
+
throw new F({ code: "SIMULATE_AND_REVIEW_FAILED" });
|
|
21
21
|
return {
|
|
22
22
|
...m.simulation,
|
|
23
|
-
...
|
|
23
|
+
...A(m.simulation.feeEstimations)
|
|
24
24
|
};
|
|
25
|
-
}), [s,
|
|
25
|
+
}), [s, o] = a.length === 1 ? [a[0], void 0] : [a[1], a[0]], r = h(s, o), i = G(s, o);
|
|
26
26
|
return [...r, ...i];
|
|
27
|
-
},
|
|
28
|
-
const [t, a] =
|
|
27
|
+
}, A = (e) => {
|
|
28
|
+
const [t, a] = v(e, (s) => "unit" in s && s.unit === "FRI");
|
|
29
29
|
return { nativeFeeEstimations: t, paymasterFeeEstimations: a };
|
|
30
|
-
},
|
|
30
|
+
}, G = (e, t) => {
|
|
31
31
|
if (!e)
|
|
32
32
|
return [];
|
|
33
33
|
if (!t)
|
|
34
|
-
return e.paymasterFeeEstimations.map((
|
|
34
|
+
return e.paymasterFeeEstimations.map((o) => ({
|
|
35
35
|
type: "paymaster",
|
|
36
|
-
transactions: d(
|
|
36
|
+
transactions: d(o),
|
|
37
37
|
deployment: void 0
|
|
38
38
|
}));
|
|
39
39
|
const a = t.paymasterFeeEstimations, s = e.paymasterFeeEstimations;
|
|
40
40
|
if (a.length !== s.length)
|
|
41
41
|
throw Error("Deployment and transaction fee estimations length mismatch");
|
|
42
|
-
return s.map((
|
|
42
|
+
return s.map((o, r) => ({
|
|
43
43
|
type: "paymaster",
|
|
44
|
-
transactions: d(
|
|
44
|
+
transactions: d(o),
|
|
45
45
|
deployment: d(a[r])
|
|
46
46
|
}));
|
|
47
47
|
}, h = (e, t) => {
|
|
48
48
|
if (!e)
|
|
49
49
|
return [];
|
|
50
50
|
if (!t)
|
|
51
|
-
return e.nativeFeeEstimations.map((
|
|
51
|
+
return e.nativeFeeEstimations.map((o) => ({
|
|
52
52
|
type: "native",
|
|
53
|
-
transactions: g(
|
|
53
|
+
transactions: g(o),
|
|
54
54
|
deployment: void 0
|
|
55
55
|
}));
|
|
56
56
|
const a = t.nativeFeeEstimations, s = e.nativeFeeEstimations;
|
|
57
57
|
if (a.length !== s.length)
|
|
58
58
|
throw Error("Deployment and transaction fee estimations length mismatch");
|
|
59
|
-
return s.map((
|
|
59
|
+
return s.map((o, r) => ({
|
|
60
60
|
type: "native",
|
|
61
|
-
transactions: g(
|
|
61
|
+
transactions: g(o),
|
|
62
62
|
deployment: g(a[r])
|
|
63
63
|
}));
|
|
64
64
|
}, d = (e) => ({
|
|
65
65
|
feeTokenAddress: e.token.address,
|
|
66
66
|
maxFee: BigInt(e.maxFee),
|
|
67
|
-
overallFee: BigInt(e.overallFee)
|
|
67
|
+
overallFee: BigInt(e.overallFee),
|
|
68
|
+
tip: e.defaultTip ? n.toBigInt(e.defaultTip) : void 0
|
|
68
69
|
}), g = (e) => ({
|
|
69
70
|
feeTokenAddress: E,
|
|
70
|
-
overallFee:
|
|
71
|
+
overallFee: n.toBigInt(e.overallFee),
|
|
71
72
|
l1Gas: {
|
|
72
|
-
gasConsumed:
|
|
73
|
-
gasPrice:
|
|
73
|
+
gasConsumed: n.toBigInt(e.resourceBounds.l1Gas.maxAmount),
|
|
74
|
+
gasPrice: n.toBigInt(e.resourceBounds.l1Gas.maxPricePerUnit)
|
|
74
75
|
},
|
|
75
76
|
l1DataGas: {
|
|
76
|
-
gasConsumed:
|
|
77
|
-
gasPrice:
|
|
77
|
+
gasConsumed: n.toBigInt(e.resourceBounds.l1DataGas.maxAmount),
|
|
78
|
+
gasPrice: n.toBigInt(e.resourceBounds.l1DataGas.maxPricePerUnit)
|
|
78
79
|
},
|
|
79
80
|
l2Gas: {
|
|
80
|
-
gasConsumed:
|
|
81
|
-
gasPrice:
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
gasConsumed: n.toBigInt(e.resourceBounds.l2Gas.maxAmount),
|
|
82
|
+
gasPrice: n.toBigInt(e.resourceBounds.l2Gas.maxPricePerUnit)
|
|
83
|
+
},
|
|
84
|
+
tip: e.defaultTip ? n.toBigInt(e.defaultTip) : void 0
|
|
85
|
+
}), W = (e) => {
|
|
86
|
+
const { l1Gas: t, l2Gas: a, l1DataGas: s } = e.resourceBounds, o = t.maxAmount * t.maxPricePerUnit + a.maxAmount * a.maxPricePerUnit + s.maxAmount * s.maxPricePerUnit;
|
|
87
|
+
return n.toBigInt(o);
|
|
88
|
+
}, $ = (e) => {
|
|
87
89
|
const { type: t, deployment: a, transactions: s } = e;
|
|
88
90
|
if (t === "paymaster")
|
|
89
|
-
return s.maxFee + (
|
|
90
|
-
if (a && !
|
|
91
|
+
return s.maxFee + (a?.maxFee ?? 0n);
|
|
92
|
+
if (a && !p(a.feeTokenAddress, s.feeTokenAddress))
|
|
91
93
|
throw Error("Cannot calculate estimated fees for different tokens");
|
|
92
|
-
const
|
|
94
|
+
const o = !s.overallFee && !a?.overallFee, r = (u) => o ? w(u) : l(u), i = a ? r(a) : 0n, m = r(s);
|
|
93
95
|
return i + m;
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
return e.transactions.overallFee ? e.transactions.overallFee + (((t = e.deployment) == null ? void 0 : t.overallFee) ?? 0n) : D(e);
|
|
97
|
-
}, _ = (e = []) => e.filter((a) => a.type === "native"), $ = (e) => e.filter((t) => t.type === "paymaster"), B = () => E, C = (e = [], t) => {
|
|
98
|
-
const a = _(e).find((s) => F(s.transactions.feeTokenAddress, t));
|
|
96
|
+
}, K = (e) => e.transactions.overallFee ? e.transactions.overallFee + (e.deployment?.overallFee ?? 0n) : N(e), _ = (e = []) => e.filter((a) => a.type === "native"), O = (e) => e.filter((t) => t.type === "paymaster"), C = () => E, I = (e = [], t) => {
|
|
97
|
+
const a = _(e).find((s) => p(s.transactions.feeTokenAddress, t));
|
|
99
98
|
if (!a)
|
|
100
99
|
throw Error(`No native estimated fee found for ${t}`);
|
|
101
100
|
return a;
|
|
102
|
-
},
|
|
103
|
-
const t =
|
|
104
|
-
return
|
|
105
|
-
},
|
|
106
|
-
if (e.deployment && !
|
|
101
|
+
}, D = (e = []) => {
|
|
102
|
+
const t = C();
|
|
103
|
+
return I(e, t);
|
|
104
|
+
}, q = (e = []) => D(e), N = (e) => {
|
|
105
|
+
if (e.deployment && !p(e.deployment.feeTokenAddress, e.transactions.feeTokenAddress))
|
|
107
106
|
throw Error("Cannot calculate estimated fees for different tokens");
|
|
108
107
|
const t = l(e.transactions), a = e.deployment ? l(e.deployment) : 0n;
|
|
109
108
|
return t + a;
|
|
110
109
|
}, l = (e) => {
|
|
111
110
|
const { l1Gas: t, l2Gas: a, l1DataGas: s } = e;
|
|
112
111
|
return t.gasConsumed * t.gasPrice + a.gasConsumed * a.gasPrice + s.gasConsumed * s.gasPrice;
|
|
113
|
-
},
|
|
114
|
-
const a = 10000n, { l1Gas: s, l2Gas:
|
|
112
|
+
}, w = (e) => l(x(e)), x = (e, t = T) => {
|
|
113
|
+
const a = 10000n, { l1Gas: s, l2Gas: o, l1DataGas: r } = e, i = s.gasConsumed * s.gasPrice + o.gasConsumed * o.gasPrice + r.gasConsumed * r.gasPrice;
|
|
115
114
|
if (i < 0)
|
|
116
115
|
throw Error("Cannot calculate max fee for negative fee");
|
|
117
|
-
const m =
|
|
116
|
+
const m = n.toBigInt(B({ estimatedFee: i })), u = Number(m) / Number(i), f = t(u), c = BigInt(Math.trunc(f * Number(a)));
|
|
118
117
|
return {
|
|
119
118
|
...e,
|
|
120
119
|
l1Gas: {
|
|
@@ -122,48 +121,53 @@ const L = (e) => {
|
|
|
122
121
|
gasPrice: s.gasPrice * c / a
|
|
123
122
|
},
|
|
124
123
|
l2Gas: {
|
|
125
|
-
gasConsumed:
|
|
126
|
-
gasPrice:
|
|
124
|
+
gasConsumed: o.gasConsumed * c / a,
|
|
125
|
+
gasPrice: o.gasPrice * c / a
|
|
127
126
|
},
|
|
128
127
|
l1DataGas: {
|
|
129
128
|
gasConsumed: r.gasConsumed * c / a,
|
|
130
129
|
gasPrice: r.gasPrice * c / a
|
|
131
130
|
}
|
|
132
131
|
};
|
|
133
|
-
},
|
|
134
|
-
const t = e.overallFee ? e :
|
|
132
|
+
}, k = (e) => {
|
|
133
|
+
const t = e.overallFee ? e : x(e);
|
|
135
134
|
return {
|
|
135
|
+
...e,
|
|
136
136
|
resourceBounds: {
|
|
137
|
-
l1_gas:
|
|
137
|
+
l1_gas: M(t.l1Gas),
|
|
138
138
|
l2_gas: {
|
|
139
|
-
max_amount:
|
|
140
|
-
max_price_per_unit:
|
|
139
|
+
max_amount: n.toHex(t.l2Gas.gasConsumed),
|
|
140
|
+
max_price_per_unit: n.toHex(t.l2Gas.gasPrice)
|
|
141
141
|
},
|
|
142
142
|
l1_data_gas: {
|
|
143
|
-
max_amount:
|
|
144
|
-
max_price_per_unit:
|
|
143
|
+
max_amount: n.toHex(t.l1DataGas.gasConsumed),
|
|
144
|
+
max_price_per_unit: n.toHex(t.l1DataGas.gasPrice)
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
}, z = (e) => ({
|
|
149
|
+
...e,
|
|
150
|
+
resourceBounds: P.resourceBoundsToBigInt(k(e).resourceBounds)
|
|
151
|
+
}), M = (e) => ({
|
|
152
|
+
max_amount: n.toHex(e.gasConsumed),
|
|
153
|
+
max_price_per_unit: n.toHex(e.gasPrice)
|
|
151
154
|
});
|
|
152
155
|
export {
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
w as estimatedFeeToMaxFeeTotal,
|
|
157
|
+
k as estimatedFeeToMaxResourceBounds,
|
|
158
|
+
z as estimatedFeeToMaxResourceBoundsBN,
|
|
155
159
|
l as estimatedFeeToTotal,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
$ as estimatedFeesToMaxFeeTotalV2,
|
|
161
|
+
N as estimatedFeesToTotal,
|
|
162
|
+
K as estimatedFeesToTotalWithOverallFee,
|
|
163
|
+
O as filterPaymasterEstimatedFees,
|
|
164
|
+
j as getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2,
|
|
165
|
+
I as getNativeEstimatedFeeByFeeToken,
|
|
166
|
+
D as getNativeEstimatedFeeByTxVersion,
|
|
167
|
+
q as getNativeEstimatedFeeForAccount,
|
|
164
168
|
_ as getNativeEstimatedFees,
|
|
165
169
|
h as getNativeFeeFromSimulation,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
170
|
+
C as getNativeFeeTokenAddress,
|
|
171
|
+
G as getPaymasterFeeFromSimulation,
|
|
172
|
+
W as toMaxFeeEstimation
|
|
169
173
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("starknet"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("starknet"),g=require("url-join"),l=require("../../errors/review.cjs"),y=require("./utils.cjs"),C=require("../../utils/url/urlWithQuery.cjs"),h=require("../../features/simulation/transactionReview/schema.cjs"),B=require("../estimate/utils.cjs"),v=require("../../utils/arrays.cjs");class F{constructor(e,a){this.apiBase=e,this.httpService=a}async getLabels(){const e=g(this.apiBase,"reviewer","labels");return await this.httpService.get(e)}async getWarnings(){const e=g(this.apiBase,"reviewer","warnings/reasons");return await this.httpService.get(e)}async simulateAndReview(e,a,c,i,o,t){const s=a.some(r=>r.type==="DEPLOY_ACCOUNT");try{if(!("getChainId"in e))throw new Error("MISSING_METHOD");const r=s?"0x0":await e.getNonce(),n=await e.getChainId(),u={transactions:a.map(d=>({...y.getPayloadFromTransaction({transaction:d,nonce:r,chainId:n,isDeploymentTransaction:s,appDomain:i,cairoVersion:e.cairoVersion,address:e.address}),type:d.type}))},m=g(this.apiBase,"reviewer","transactions","v2","review","starknet"),w=t?C.urlWithQuery(m,{delayedTransactions:"true"}):m,_=await this.httpService.post(w,{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(u)},h.simulateAndReviewSchema);if(_.transactions?.some(d=>h.isTransactionSimulationError(d)))return _;const E=B.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2(_);return{..._,enrichedFeeEstimation:E}}catch(r){return console.error(r),this.fallbackToOnchainFeeEstimation({transactions:a,account:e,isDeploymentTransaction:s,feeTokenAddress:c,accountDeployTransaction:o})}}getCallsFromTx(e){let a;return e.calls&&(a=v.ensureArray(e.calls)),a}async fallbackToOnchainFeeEstimation({transactions:e,account:a,isDeploymentTransaction:c,feeTokenAddress:i,accountDeployTransaction:o}){try{const t=c?this.getCallsFromTx(e[1]):this.getCallsFromTx(e[0]);if(!t)throw new l.ReviewError({code:"NO_CALLS_FOUND"});const s=await this.fetchFeesOnchain({starknetAccount:a,calls:t,isDeployed:!c,feeTokenAddress:i,accountDeployTransaction:o});return{transactions:[],enrichedFeeEstimation:s,isBackendDown:!0}}catch(t){throw console.error(t),new l.ReviewError({message:`${t}`,code:"SIMULATE_AND_REVIEW_FAILED"})}}async fetchFeesOnchain({starknetAccount:e,calls:a,isDeployed:c,feeTokenAddress:i,accountDeployTransaction:o}){try{const t={type:"native",transactions:{feeTokenAddress:i,l1Gas:{gasConsumed:0n,gasPrice:0n},l2Gas:{gasConsumed:0n,gasPrice:0n},l1DataGas:{gasConsumed:0n,gasPrice:0n}}};if(!c&&o){if("estimateFeeBulk"in e){const s=[{type:p.TransactionType.DEPLOY_ACCOUNT,payload:{classHash:o.classHash,addressSalt:o.salt,constructorCalldata:o.calldata,contractAddress:e.address}},{type:p.TransactionType.INVOKE,payload:a}],[r,n]=await e.estimateFeeBulk(s).catch(u=>{throw console.error(u),u});if(!r.resourceBounds.l1_data_gas||!r.resourceBounds.l1_gas||!r.resourceBounds.l2_gas||!n.resourceBounds.l1_data_gas||!n.resourceBounds.l1_gas||!n.resourceBounds.l2_gas)throw new l.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:"Missing gas_consumed or gas_price"});t.deployment={feeTokenAddress:i,l1Gas:{gasConsumed:r.resourceBounds.l1_gas.max_amount,gasPrice:r.resourceBounds.l1_gas.max_price_per_unit},l2Gas:{gasConsumed:r.resourceBounds.l2_gas.max_amount,gasPrice:r.resourceBounds.l2_gas.max_price_per_unit},l1DataGas:{gasConsumed:r.resourceBounds.l1_data_gas.max_amount,gasPrice:r.resourceBounds.l1_data_gas.max_price_per_unit}},t.transactions={feeTokenAddress:i,l1Gas:{gasConsumed:n.resourceBounds.l1_gas.max_amount,gasPrice:n.resourceBounds.l1_gas.max_price_per_unit},l2Gas:{gasConsumed:n.resourceBounds.l2_gas.max_amount,gasPrice:n.resourceBounds.l2_gas.max_price_per_unit},l1DataGas:{gasConsumed:n.resourceBounds.l1_data_gas.max_amount,gasPrice:n.resourceBounds.l1_data_gas.max_price_per_unit}}}}else{const{resourceBounds:s}=await e.estimateInvokeFee(a);if(!s.l1_gas||!s.l2_gas||!s.l1_data_gas)throw new l.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:"Missing gas_consumed or gas_price"});t.transactions={feeTokenAddress:i,l1Gas:{gasConsumed:s.l1_gas.max_amount,gasPrice:s.l1_gas.max_price_per_unit},l2Gas:{gasConsumed:s.l2_gas.max_amount,gasPrice:s.l2_gas.max_price_per_unit},l1DataGas:{gasConsumed:s.l1_data_gas.max_amount,gasPrice:s.l1_data_gas.max_price_per_unit}}}return[t]}catch(t){throw new l.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:`${t}`})}}}exports.TransactionReviewServiceWeb=F;
|
|
@@ -50,6 +50,7 @@ export declare class TransactionReviewServiceWeb implements ITransactionReviewSe
|
|
|
50
50
|
gasPrice: bigint;
|
|
51
51
|
};
|
|
52
52
|
overallFee?: bigint | undefined;
|
|
53
|
+
tip?: bigint | undefined;
|
|
53
54
|
};
|
|
54
55
|
deployment?: {
|
|
55
56
|
feeTokenAddress: `0x${string}`;
|
|
@@ -66,6 +67,7 @@ export declare class TransactionReviewServiceWeb implements ITransactionReviewSe
|
|
|
66
67
|
gasPrice: bigint;
|
|
67
68
|
};
|
|
68
69
|
overallFee?: bigint | undefined;
|
|
70
|
+
tip?: bigint | undefined;
|
|
69
71
|
} | undefined;
|
|
70
72
|
} | {
|
|
71
73
|
type: "paymaster";
|
|
@@ -73,11 +75,13 @@ export declare class TransactionReviewServiceWeb implements ITransactionReviewSe
|
|
|
73
75
|
feeTokenAddress: `0x${string}`;
|
|
74
76
|
overallFee: bigint;
|
|
75
77
|
maxFee: bigint;
|
|
78
|
+
tip?: bigint | undefined;
|
|
76
79
|
};
|
|
77
80
|
deployment?: {
|
|
78
81
|
feeTokenAddress: `0x${string}`;
|
|
79
82
|
overallFee: bigint;
|
|
80
83
|
maxFee: bigint;
|
|
84
|
+
tip?: bigint | undefined;
|
|
81
85
|
} | undefined;
|
|
82
86
|
})[];
|
|
83
87
|
isBackendDown: boolean;
|