@hyperbridge/sdk 2.5.0 → 2.6.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.
@@ -1,5 +1,5 @@
1
- import { I as IChain, H as HexString, a as IEvmConfig, C as ChainConfigService, b as IMessage, S as StateMachineIdParams, c as StateMachineHeight, d as IIsmpMessage, e as IPostRequest, f as IGetRequest, O as Order, E as EstimateGasCallData, R as RetryConfig, g as IPolkadotHubConfig, h as IPharosConfig, i as StateMachineUpdate, P as PostRequestWithStatus, G as GetRequestWithStatus, j as ResponseCommitmentWithValues, k as RequestStatusWithMetadata, l as PostRequestTimeoutStatus, m as SubstrateChain, n as ClientConfig, o as IndexerQueryClient, A as AssetTeleported, T as Transaction, p as IProof, q as IEvmChain, r as IntentsCoprocessor, s as AvailableLiquiditySnapshot, t as IntentOrderStatusUpdate, u as SelectBidResult, v as ResumeIntentOrderOptions, w as CancelOrderOptions, x as CancelQuote, y as SubmitBidOptions, z as PackedUserOperation, F as FillerBid, B as Bid, D as EstimateFillOrderParams, J as FillOrderEstimate, K as ERC7821Call, L as OrderWithStatus, M as OrderStatus, N as TokenGatewayAssetTeleportedWithStatus, Q as TeleportStatus, U as DecodedOrderPlacedLog, V as DecodedPostRequestEvent, W as DecodedPostResponseEvent } from './IntentGatewayV2-tYGohDdW.cjs';
2
- export { X as AllStatusKey, Y as AssetTeleportedResponse, Z as AvailableLiquidityByChain, _ as BidStorageEntry, $ as BidSubmissionResult, a0 as BlockMetadata, a1 as BytesLikeHex, a2 as CancelOptions, a3 as ChainConfig, a4 as ChainConfigData, a5 as Chains, a6 as ConfiguredAssetSymbol, a7 as Deployment, a8 as DispatchGet, a9 as DispatchInfo, aa as DispatchPost, ab as ExecuteIntentOrderOptions, ac as ExecutionResult, ad as FillOptions, ae as FillerConfig, af as GetRequestResponse, ag as GetResponseByRequestIdResponse, ah as GetResponseStorageValues, ai as HostParams, aj as HyperClientStatus, ak as IBatchConsensusAndGetResponseMessage, al as IBatchConsensusAndPostRequestMessage, am as IConfig, an as IConsensusMessage, ao as IGetRequestMessage, ap as IGetResponse, aq as IGetResponseMessage, ar as IHyperbridgeConfig, as as IPostResponse, at as IRequestMessage, au as ISubstrateConfig, av as ITimeoutPostRequestMessage, aw as IntentGatewayABI, ax as IntentGatewayParams, ay as IntentOrderStatus, az as IntentOrderStatusKey, aA as IsmpRequest, aB as OrderResponse, aC as OrderStatusMetadata, aD as PaymentInfo, aE as PhantomOrderEvent, aF as PhantomOrderPriceSnapshot, aG as PhantomOrderPriceSnapshotsResponse, aH as PollPhantomOrdersOptions, aI as PostRequestStatus, aJ as RequestBody, aK as RequestCommitment, aL as RequestKind, aM as RequestResponse, aN as RequestStatus, aO as RequestStatusKey, aP as SelectOptions, aQ as SigningAccount, aR as StateMachineId, aS as StateMachineResponse, aT as StorageFacade, aU as TimeoutStatus, aV as TimeoutStatusKey, aW as TokenGatewayAssetTeleportedResponse, aX as TokenInfo, aY as TokenPrice, aZ as TokenPricesResponse, a_ as UniswapV4PoolConfigData, a$ as chainConfigs, b0 as convertCodecToIGetRequest, b1 as convertCodecToIProof, b2 as convertIGetRequestToCodec, b3 as convertIProofToCodec, b4 as convertStateIdToStateMachineId, b5 as convertStateMachineEnumToString, b6 as convertStateMachineIdToEnum, b7 as decodeERC7821ExecuteBatch, b8 as decodeUserOpScale, b9 as encodeERC7821ExecuteBatch, ba as encodeISMPMessage, bb as encodeUserOpScale, bc as getChainId, bd as getConfigByStateMachineId, be as getViemChain, bf as hyperbridgeAddress, bg as pharosAtlantic, bh as pharosMainnet, bi as polkadotAssetHubPaseo, bj as polkadotHubMainnet, bk as tronChainIds, bl as tronNile } from './IntentGatewayV2-tYGohDdW.cjs';
1
+ import { I as IChain, H as HexString, a as IEvmConfig, C as ChainConfigService, b as IMessage, S as StateMachineIdParams, c as StateMachineHeight, d as IIsmpMessage, e as IPostRequest, f as IGetRequest, O as Order, E as EstimateGasCallData, R as RetryConfig, g as IPolkadotHubConfig, h as IPharosConfig, i as StateMachineUpdate, P as PostRequestWithStatus, G as GetRequestWithStatus, j as ResponseCommitmentWithValues, k as RequestStatusWithMetadata, l as PostRequestTimeoutStatus, m as SubstrateChain, n as ClientConfig, o as IndexerQueryClient, A as AssetTeleported, T as Transaction, p as IProof, q as IEvmChain, r as IntentsCoprocessor, s as AvailableLiquiditySnapshot, t as IntentOrderStatusUpdate, u as SelectBidResult, v as ResumeIntentOrderOptions, w as CancelOrderOptions, x as CancelQuote, y as SubmitBidOptions, z as PackedUserOperation, F as FillerBid, B as Bid, D as EstimateFillOrderParams, J as FillOrderEstimate, K as ERC7821Call, L as OrderWithStatus, M as OrderStatus, N as TokenGatewayAssetTeleportedWithStatus, Q as TeleportStatus, U as DecodedOrderPlacedLog, V as DecodedPostRequestEvent, W as DecodedPostResponseEvent } from './IntentGatewayV2-DuSwlT02.cjs';
2
+ export { X as AllStatusKey, Y as AssetTeleportedResponse, Z as AvailableLiquidityByChain, _ as BidStorageEntry, $ as BidSubmissionResult, a0 as BlockMetadata, a1 as BytesLikeHex, a2 as CancelOptions, a3 as ChainConfig, a4 as ChainConfigData, a5 as Chains, a6 as ConfiguredAssetSymbol, a7 as Deployment, a8 as DispatchGet, a9 as DispatchInfo, aa as DispatchPost, ab as ExecuteIntentOrderOptions, ac as ExecutionResult, ad as FillOptions, ae as FillerConfig, af as GetRequestResponse, ag as GetResponseByRequestIdResponse, ah as GetResponseStorageValues, ai as HostParams, aj as HyperClientStatus, ak as IBatchConsensusAndGetResponseMessage, al as IBatchConsensusAndPostRequestMessage, am as IConfig, an as IConsensusMessage, ao as IGetRequestMessage, ap as IGetResponse, aq as IGetResponseMessage, ar as IHyperbridgeConfig, as as IPostResponse, at as IRequestMessage, au as ISubstrateConfig, av as ITimeoutPostRequestMessage, aw as IntentGatewayABI, ax as IntentGatewayParams, ay as IntentOrderStatus, az as IntentOrderStatusKey, aA as IsmpRequest, aB as OrderResponse, aC as OrderStatusMetadata, aD as PaymentInfo, aE as PhantomOrderEvent, aF as PhantomOrderPriceSnapshot, aG as PhantomOrderPriceSnapshotsResponse, aH as PollPhantomOrdersOptions, aI as PostRequestStatus, aJ as RequestBody, aK as RequestCommitment, aL as RequestKind, aM as RequestResponse, aN as RequestStatus, aO as RequestStatusKey, aP as SelectOptions, aQ as SigningAccount, aR as StateMachineId, aS as StateMachineResponse, aT as StorageFacade, aU as TimeoutStatus, aV as TimeoutStatusKey, aW as TokenGatewayAssetTeleportedResponse, aX as TokenInfo, aY as TokenPrice, aZ as TokenPricesResponse, a_ as UniswapV4PoolConfigData, a$ as chainConfigs, b0 as convertCodecToIGetRequest, b1 as convertCodecToIProof, b2 as convertIGetRequestToCodec, b3 as convertIProofToCodec, b4 as convertStateIdToStateMachineId, b5 as convertStateMachineEnumToString, b6 as convertStateMachineIdToEnum, b7 as decodeERC7821ExecuteBatch, b8 as decodeUserOpScale, b9 as encodeERC7821ExecuteBatch, ba as encodeISMPMessage, bb as encodeUserOpScale, bc as getChainId, bd as getConfigByStateMachineId, be as getViemChain, bf as hyperbridgeAddress, bg as pharosAtlantic, bh as pharosMainnet, bi as polkadotAssetHubPaseo, bj as polkadotHubMainnet, bk as tronChainIds, bl as tronNile } from './IntentGatewayV2-DuSwlT02.cjs';
3
3
  import { ConsolaInstance } from 'consola';
4
4
  import { GraphQLClient } from 'graphql-request';
5
5
  import { PublicClient, TransactionReceipt, Hex, Address } from 'viem';
@@ -1917,10 +1917,12 @@ declare class IntentGateway {
1917
1917
  * placement, fee estimation, bid collection, and execution.
1918
1918
  *
1919
1919
  * **Yield/receive protocol:**
1920
- * 1. If `order.fees` is unset or zero, estimates gas on an internal copy and sets
1921
- * same-chain fees to twice the estimate. Cross-chain orders retain a 1% buffer
1922
- * and include an additional 600k-gas fee uplift, while the wei cost used for
1923
- * the `value` field receives a 2% buffer.
1920
+ * 1. If `order.fees` is unset or zero, estimates gas on an internal copy and
1921
+ * sets same-chain fees to twice the estimate. Cross-chain orders attach
1922
+ * (fill gas + a settlement-message uplift of `RELAYER_MESSAGE_GAS`, the
1923
+ * same gas budget the solver's relayer fee uses) with a 5% buffer over
1924
+ * the whole sum — strictly above the solver's unpadded requirement. The
1925
+ * wei cost used for the `value` field receives a 2% buffer.
1924
1926
  * 2. Yields `AWAITING_PLACE_ORDER` with `{ to, data, value, sessionPrivateKey }`.
1925
1927
  * The caller must sign the transaction and pass it back via `gen.next(signedTx)`.
1926
1928
  * 3. Yields `ORDER_PLACED` with the finalised order and transaction hash once
@@ -1,5 +1,5 @@
1
- import { I as IChain, H as HexString, a as IEvmConfig, C as ChainConfigService, b as IMessage, S as StateMachineIdParams, c as StateMachineHeight, d as IIsmpMessage, e as IPostRequest, f as IGetRequest, O as Order, E as EstimateGasCallData, R as RetryConfig, g as IPolkadotHubConfig, h as IPharosConfig, i as StateMachineUpdate, P as PostRequestWithStatus, G as GetRequestWithStatus, j as ResponseCommitmentWithValues, k as RequestStatusWithMetadata, l as PostRequestTimeoutStatus, m as SubstrateChain, n as ClientConfig, o as IndexerQueryClient, A as AssetTeleported, T as Transaction, p as IProof, q as IEvmChain, r as IntentsCoprocessor, s as AvailableLiquiditySnapshot, t as IntentOrderStatusUpdate, u as SelectBidResult, v as ResumeIntentOrderOptions, w as CancelOrderOptions, x as CancelQuote, y as SubmitBidOptions, z as PackedUserOperation, F as FillerBid, B as Bid, D as EstimateFillOrderParams, J as FillOrderEstimate, K as ERC7821Call, L as OrderWithStatus, M as OrderStatus, N as TokenGatewayAssetTeleportedWithStatus, Q as TeleportStatus, U as DecodedOrderPlacedLog, V as DecodedPostRequestEvent, W as DecodedPostResponseEvent } from './IntentGatewayV2-tYGohDdW.js';
2
- export { X as AllStatusKey, Y as AssetTeleportedResponse, Z as AvailableLiquidityByChain, _ as BidStorageEntry, $ as BidSubmissionResult, a0 as BlockMetadata, a1 as BytesLikeHex, a2 as CancelOptions, a3 as ChainConfig, a4 as ChainConfigData, a5 as Chains, a6 as ConfiguredAssetSymbol, a7 as Deployment, a8 as DispatchGet, a9 as DispatchInfo, aa as DispatchPost, ab as ExecuteIntentOrderOptions, ac as ExecutionResult, ad as FillOptions, ae as FillerConfig, af as GetRequestResponse, ag as GetResponseByRequestIdResponse, ah as GetResponseStorageValues, ai as HostParams, aj as HyperClientStatus, ak as IBatchConsensusAndGetResponseMessage, al as IBatchConsensusAndPostRequestMessage, am as IConfig, an as IConsensusMessage, ao as IGetRequestMessage, ap as IGetResponse, aq as IGetResponseMessage, ar as IHyperbridgeConfig, as as IPostResponse, at as IRequestMessage, au as ISubstrateConfig, av as ITimeoutPostRequestMessage, aw as IntentGatewayABI, ax as IntentGatewayParams, ay as IntentOrderStatus, az as IntentOrderStatusKey, aA as IsmpRequest, aB as OrderResponse, aC as OrderStatusMetadata, aD as PaymentInfo, aE as PhantomOrderEvent, aF as PhantomOrderPriceSnapshot, aG as PhantomOrderPriceSnapshotsResponse, aH as PollPhantomOrdersOptions, aI as PostRequestStatus, aJ as RequestBody, aK as RequestCommitment, aL as RequestKind, aM as RequestResponse, aN as RequestStatus, aO as RequestStatusKey, aP as SelectOptions, aQ as SigningAccount, aR as StateMachineId, aS as StateMachineResponse, aT as StorageFacade, aU as TimeoutStatus, aV as TimeoutStatusKey, aW as TokenGatewayAssetTeleportedResponse, aX as TokenInfo, aY as TokenPrice, aZ as TokenPricesResponse, a_ as UniswapV4PoolConfigData, a$ as chainConfigs, b0 as convertCodecToIGetRequest, b1 as convertCodecToIProof, b2 as convertIGetRequestToCodec, b3 as convertIProofToCodec, b4 as convertStateIdToStateMachineId, b5 as convertStateMachineEnumToString, b6 as convertStateMachineIdToEnum, b7 as decodeERC7821ExecuteBatch, b8 as decodeUserOpScale, b9 as encodeERC7821ExecuteBatch, ba as encodeISMPMessage, bb as encodeUserOpScale, bc as getChainId, bd as getConfigByStateMachineId, be as getViemChain, bf as hyperbridgeAddress, bg as pharosAtlantic, bh as pharosMainnet, bi as polkadotAssetHubPaseo, bj as polkadotHubMainnet, bk as tronChainIds, bl as tronNile } from './IntentGatewayV2-tYGohDdW.js';
1
+ import { I as IChain, H as HexString, a as IEvmConfig, C as ChainConfigService, b as IMessage, S as StateMachineIdParams, c as StateMachineHeight, d as IIsmpMessage, e as IPostRequest, f as IGetRequest, O as Order, E as EstimateGasCallData, R as RetryConfig, g as IPolkadotHubConfig, h as IPharosConfig, i as StateMachineUpdate, P as PostRequestWithStatus, G as GetRequestWithStatus, j as ResponseCommitmentWithValues, k as RequestStatusWithMetadata, l as PostRequestTimeoutStatus, m as SubstrateChain, n as ClientConfig, o as IndexerQueryClient, A as AssetTeleported, T as Transaction, p as IProof, q as IEvmChain, r as IntentsCoprocessor, s as AvailableLiquiditySnapshot, t as IntentOrderStatusUpdate, u as SelectBidResult, v as ResumeIntentOrderOptions, w as CancelOrderOptions, x as CancelQuote, y as SubmitBidOptions, z as PackedUserOperation, F as FillerBid, B as Bid, D as EstimateFillOrderParams, J as FillOrderEstimate, K as ERC7821Call, L as OrderWithStatus, M as OrderStatus, N as TokenGatewayAssetTeleportedWithStatus, Q as TeleportStatus, U as DecodedOrderPlacedLog, V as DecodedPostRequestEvent, W as DecodedPostResponseEvent } from './IntentGatewayV2-DuSwlT02.js';
2
+ export { X as AllStatusKey, Y as AssetTeleportedResponse, Z as AvailableLiquidityByChain, _ as BidStorageEntry, $ as BidSubmissionResult, a0 as BlockMetadata, a1 as BytesLikeHex, a2 as CancelOptions, a3 as ChainConfig, a4 as ChainConfigData, a5 as Chains, a6 as ConfiguredAssetSymbol, a7 as Deployment, a8 as DispatchGet, a9 as DispatchInfo, aa as DispatchPost, ab as ExecuteIntentOrderOptions, ac as ExecutionResult, ad as FillOptions, ae as FillerConfig, af as GetRequestResponse, ag as GetResponseByRequestIdResponse, ah as GetResponseStorageValues, ai as HostParams, aj as HyperClientStatus, ak as IBatchConsensusAndGetResponseMessage, al as IBatchConsensusAndPostRequestMessage, am as IConfig, an as IConsensusMessage, ao as IGetRequestMessage, ap as IGetResponse, aq as IGetResponseMessage, ar as IHyperbridgeConfig, as as IPostResponse, at as IRequestMessage, au as ISubstrateConfig, av as ITimeoutPostRequestMessage, aw as IntentGatewayABI, ax as IntentGatewayParams, ay as IntentOrderStatus, az as IntentOrderStatusKey, aA as IsmpRequest, aB as OrderResponse, aC as OrderStatusMetadata, aD as PaymentInfo, aE as PhantomOrderEvent, aF as PhantomOrderPriceSnapshot, aG as PhantomOrderPriceSnapshotsResponse, aH as PollPhantomOrdersOptions, aI as PostRequestStatus, aJ as RequestBody, aK as RequestCommitment, aL as RequestKind, aM as RequestResponse, aN as RequestStatus, aO as RequestStatusKey, aP as SelectOptions, aQ as SigningAccount, aR as StateMachineId, aS as StateMachineResponse, aT as StorageFacade, aU as TimeoutStatus, aV as TimeoutStatusKey, aW as TokenGatewayAssetTeleportedResponse, aX as TokenInfo, aY as TokenPrice, aZ as TokenPricesResponse, a_ as UniswapV4PoolConfigData, a$ as chainConfigs, b0 as convertCodecToIGetRequest, b1 as convertCodecToIProof, b2 as convertIGetRequestToCodec, b3 as convertIProofToCodec, b4 as convertStateIdToStateMachineId, b5 as convertStateMachineEnumToString, b6 as convertStateMachineIdToEnum, b7 as decodeERC7821ExecuteBatch, b8 as decodeUserOpScale, b9 as encodeERC7821ExecuteBatch, ba as encodeISMPMessage, bb as encodeUserOpScale, bc as getChainId, bd as getConfigByStateMachineId, be as getViemChain, bf as hyperbridgeAddress, bg as pharosAtlantic, bh as pharosMainnet, bi as polkadotAssetHubPaseo, bj as polkadotHubMainnet, bk as tronChainIds, bl as tronNile } from './IntentGatewayV2-DuSwlT02.js';
3
3
  import { ConsolaInstance } from 'consola';
4
4
  import { GraphQLClient } from 'graphql-request';
5
5
  import { PublicClient, TransactionReceipt, Hex, Address } from 'viem';
@@ -1917,10 +1917,12 @@ declare class IntentGateway {
1917
1917
  * placement, fee estimation, bid collection, and execution.
1918
1918
  *
1919
1919
  * **Yield/receive protocol:**
1920
- * 1. If `order.fees` is unset or zero, estimates gas on an internal copy and sets
1921
- * same-chain fees to twice the estimate. Cross-chain orders retain a 1% buffer
1922
- * and include an additional 600k-gas fee uplift, while the wei cost used for
1923
- * the `value` field receives a 2% buffer.
1920
+ * 1. If `order.fees` is unset or zero, estimates gas on an internal copy and
1921
+ * sets same-chain fees to twice the estimate. Cross-chain orders attach
1922
+ * (fill gas + a settlement-message uplift of `RELAYER_MESSAGE_GAS`, the
1923
+ * same gas budget the solver's relayer fee uses) with a 5% buffer over
1924
+ * the whole sum — strictly above the solver's unpadded requirement. The
1925
+ * wei cost used for the `value` field receives a 2% buffer.
1924
1926
  * 2. Yields `AWAITING_PLACE_ORDER` with `{ to, data, value, sessionPrivateKey }`.
1925
1927
  * The caller must sign the transaction and pass it back via `gen.next(signedTx)`.
1926
1928
  * 3. Yields `ORDER_PLACED` with the finalised order and transaction hash once
@@ -2678,7 +2678,11 @@ var chainConfigs = {
2678
2678
  DAI: "0x6b175474e89094c44da98b954eedeac495271d0f",
2679
2679
  USDC: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
2680
2680
  USDT: "0xdac17f958d2ee523a2206206994597c13d831ec7",
2681
- cNGN: "0x17CDB2a01e7a34CbB3DD4b83260B05d0274C8dab"
2681
+ cNGN: "0x17CDB2a01e7a34CbB3DD4b83260B05d0274C8dab",
2682
+ ZARP: "0xb755506531786C8aC63B756BaB1ac387bACB0C04",
2683
+ EURC: "0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",
2684
+ XSGD: "0x70e8dE73cE538DA2bEEd35d14187F6959a8ecA96",
2685
+ TRYB: "0x2C537E5624e4af88A7ae4060C022609376C8D0EB"
2682
2686
  },
2683
2687
  tokenDecimals: {
2684
2688
  USDC: 6,
@@ -2848,7 +2852,9 @@ var chainConfigs = {
2848
2852
  USDC: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
2849
2853
  USDT: "0xfde4c96c8593536e31f229ea8f37b2ada2699bb2",
2850
2854
  EXT: "0x0e668E5127087e236578893a0e01E41837A28469",
2851
- cNGN: "0x46C85152bFe9f96829aA94755D9f915F9B10EF5F"
2855
+ cNGN: "0x46C85152bFe9f96829aA94755D9f915F9B10EF5F",
2856
+ ZARP: "0xb755506531786C8aC63B756BaB1ac387bACB0C04",
2857
+ EURC: "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42"
2852
2858
  },
2853
2859
  tokenDecimals: {
2854
2860
  USDC: 6,
@@ -2908,7 +2914,9 @@ var chainConfigs = {
2908
2914
  USDC: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
2909
2915
  USDT: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
2910
2916
  EXT: "0x7C8c11ADb8EF7cd3CFa718008Ea048445C6E7209",
2911
- cNGN: "0x52828daa48C1a9A06F37500882b42daf0bE04C3B"
2917
+ cNGN: "0x52828daa48C1a9A06F37500882b42daf0bE04C3B",
2918
+ ZARP: "0xb755506531786C8aC63B756BaB1ac387bACB0C04",
2919
+ XSGD: "0xDC3326e71D45186F113a2F448984CA0e8D201995"
2912
2920
  },
2913
2921
  tokenDecimals: {
2914
2922
  USDC: 6,
@@ -5145,6 +5153,21 @@ var ChainConfigService = class {
5145
5153
  getCNgnAsset(chain) {
5146
5154
  return this.getConfig(chain)?.assets?.cNGN;
5147
5155
  }
5156
+ /**
5157
+ * Address of `symbol` on `chain` from the per-chain asset table, matched
5158
+ * case-insensitively ("cNGN" ≡ "CNGN"). This table is the single source of
5159
+ * truth for token addresses — the simplex asset registry resolves through
5160
+ * it, so a new asset is added once in `chain.ts` and nowhere else.
5161
+ */
5162
+ getAssetBySymbol(chain, symbol) {
5163
+ const assets = this.getConfig(chain)?.assets;
5164
+ if (!assets) return void 0;
5165
+ const target = symbol.trim().toUpperCase();
5166
+ for (const [key, address] of Object.entries(assets)) {
5167
+ if (key.toUpperCase() === target) return address;
5168
+ }
5169
+ return void 0;
5170
+ }
5148
5171
  getCNgnDecimals(chain) {
5149
5172
  return this.getConfig(chain)?.tokenDecimals?.cNGN;
5150
5173
  }
@@ -17241,6 +17264,7 @@ var BidManager = class {
17241
17264
  }
17242
17265
  }
17243
17266
  };
17267
+ var RELAYER_MESSAGE_GAS = 1000000n;
17244
17268
  var GasEstimator = class {
17245
17269
  /**
17246
17270
  * @param ctx - Shared IntentsV2 context providing the source and destination
@@ -17261,7 +17285,12 @@ var GasEstimator = class {
17261
17285
  *
17262
17286
  * **Cross-chain orders:** also estimates the ISMP POST request fee required
17263
17287
  * for the solver to trigger source-chain escrow redemption after filling, and
17264
- * includes it in `fillOptions.relayerFee` and `fillOptions.nativeDispatchFee`.
17288
+ * includes it in `fillOptions.relayerFee`. The dispatch is always paid in the
17289
+ * fee token — `nativeDispatchFee` is fixed at 0. The native rail would draw
17290
+ * from the solver account's native balance, which nothing guarantees, and a
17291
+ * shortfall is invisible to estimation (the account balance is overridden
17292
+ * during simulation) — it would only surface as a reverted execution that
17293
+ * still bills the paymaster.
17265
17294
  *
17266
17295
  * **Bundler path:** constructs a mock `PackedUserOperation` signed by an
17267
17296
  * ephemeral keypair, applies state overrides, and calls
@@ -17310,24 +17339,19 @@ var GasEstimator = class {
17310
17339
  intentGatewayV2Address,
17311
17340
  entryPointAddress
17312
17341
  }),
17313
- isSameChain ? Promise.resolve({ postRequestFee: 0n, protocolFee: 0n }) : this.estimateCrossChainFees(
17314
- sourceFeeToken,
17315
- destFeeToken,
17316
- souceStateMachineId,
17317
- destStateMachineId,
17318
- order
17319
- )
17342
+ isSameChain ? Promise.resolve({ postRequestFee: 0n, relayerFeeInSourceFeeToken: 0n }) : this.estimateCrossChainFees(sourceFeeToken, destFeeToken, souceStateMachineId)
17320
17343
  ]);
17321
17344
  const { viem: stateOverrides, bundler: bundlerStateOverrides } = stateOverridesResult;
17322
17345
  const fillOptions = {
17323
17346
  relayerFee: crossChainFees.postRequestFee,
17324
- nativeDispatchFee: crossChainFees.protocolFee,
17347
+ // Always dispatch with the fee token (see the method docs).
17348
+ nativeDispatchFee: 0n,
17325
17349
  outputs: order.output.assets.map((asset) => ({
17326
17350
  ...asset,
17327
17351
  token: normalizeAddressForEvmBytes32(asset.token)
17328
17352
  }))
17329
17353
  };
17330
- const totalNativeValue = totalEthValue + fillOptions.nativeDispatchFee;
17354
+ const totalNativeValue = totalEthValue;
17331
17355
  const priorityFeeBumpPercent = params.maxPriorityFeePerGasBumpPercent ?? 8;
17332
17356
  const maxFeeBumpPercent = params.maxFeePerGasBumpPercent ?? 10;
17333
17357
  let maxPriorityFeePerGas = gasPrice + gasPrice * BigInt(priorityFeeBumpPercent) / 100n;
@@ -17494,37 +17518,32 @@ var GasEstimator = class {
17494
17518
  maxPriorityFeePerGas,
17495
17519
  totalGasCostWei,
17496
17520
  totalGasInFeeToken: totalGasInSourceFeeToken,
17521
+ relayerFeeInSourceFeeToken: crossChainFees.relayerFeeInSourceFeeToken,
17497
17522
  fillOptions
17498
17523
  };
17499
17524
  }
17500
17525
  /**
17501
- * Estimates cross-chain ISMP POST request fees by running the gas-to-fee-token
17502
- * conversion and host nonce fetch in parallel, then quoting the native dispatch cost.
17503
- */
17504
- async estimateCrossChainFees(sourceFeeToken, destFeeToken, sourceChainId, destChainId, order) {
17505
- const postRequestGas = 400000n;
17506
- const [postRequestFeeInSourceFeeToken, nonce] = await Promise.all([
17507
- convertGasToFeeToken(this.ctx, postRequestGas, "source", sourceChainId),
17508
- this.ctx.dest.getHostNonce()
17509
- ]);
17510
- let postRequestFeeInDestFeeToken = adjustDecimals(
17526
+ * Estimates the cross-chain ISMP POST request fee (the relayer fee for the
17527
+ * RedeemEscrow message), in both the source and destination fee tokens.
17528
+ * The dispatch is always paid in the fee token — the native rail was
17529
+ * removed because it silently drew on a native balance nothing guarantees.
17530
+ */
17531
+ async estimateCrossChainFees(sourceFeeToken, destFeeToken, sourceChainId) {
17532
+ const postRequestFeeInSourceFeeToken = await convertGasToFeeToken(
17533
+ this.ctx,
17534
+ RELAYER_MESSAGE_GAS,
17535
+ "source",
17536
+ sourceChainId
17537
+ );
17538
+ const postRequestFeeInDestFeeToken = adjustDecimals(
17511
17539
  postRequestFeeInSourceFeeToken,
17512
17540
  sourceFeeToken.decimals,
17513
17541
  destFeeToken.decimals
17514
17542
  );
17515
- const postRequest = {
17516
- source: destChainId,
17517
- dest: sourceChainId,
17518
- body: constructRedeemEscrowRequestBody({ ...order, id: orderCommitment(order) }, MOCK_ADDRESS),
17519
- timeoutTimestamp: 0n,
17520
- nonce,
17521
- from: this.ctx.source.configService.getIntentGatewayAddress(destChainId),
17522
- to: this.ctx.source.configService.getIntentGatewayAddress(sourceChainId)
17543
+ return {
17544
+ postRequestFee: postRequestFeeInDestFeeToken,
17545
+ relayerFeeInSourceFeeToken: postRequestFeeInSourceFeeToken
17523
17546
  };
17524
- postRequestFeeInDestFeeToken = postRequestFeeInDestFeeToken * 1005n / 1000n;
17525
- let protocolFeeInNativeToken = await this.ctx.dest.quoteNative(postRequest, postRequestFeeInDestFeeToken).catch(() => 0n);
17526
- protocolFeeInNativeToken = protocolFeeInNativeToken * 1005n / 1000n;
17527
- return { postRequestFee: postRequestFeeInDestFeeToken, protocolFee: protocolFeeInNativeToken };
17528
17547
  }
17529
17548
  /**
17530
17549
  * Builds EVM state override objects for gas estimation of the `fillOrder`
@@ -18284,7 +18303,6 @@ function isConfiguredAddress(address) {
18284
18303
  }
18285
18304
 
18286
18305
  // src/protocols/intents/IntentGateway.ts
18287
- var CROSS_CHAIN_ORDER_FEE_GAS_BUMP = 600000n;
18288
18306
  var IntentGateway = class _IntentGateway {
18289
18307
  /** EVM chain on which orders are placed and escrowed. */
18290
18308
  source;
@@ -18471,10 +18489,12 @@ var IntentGateway = class _IntentGateway {
18471
18489
  * placement, fee estimation, bid collection, and execution.
18472
18490
  *
18473
18491
  * **Yield/receive protocol:**
18474
- * 1. If `order.fees` is unset or zero, estimates gas on an internal copy and sets
18475
- * same-chain fees to twice the estimate. Cross-chain orders retain a 1% buffer
18476
- * and include an additional 600k-gas fee uplift, while the wei cost used for
18477
- * the `value` field receives a 2% buffer.
18492
+ * 1. If `order.fees` is unset or zero, estimates gas on an internal copy and
18493
+ * sets same-chain fees to twice the estimate. Cross-chain orders attach
18494
+ * (fill gas + a settlement-message uplift of `RELAYER_MESSAGE_GAS`, the
18495
+ * same gas budget the solver's relayer fee uses) with a 5% buffer over
18496
+ * the whole sum — strictly above the solver's unpadded requirement. The
18497
+ * wei cost used for the `value` field receives a 2% buffer.
18478
18498
  * 2. Yields `AWAITING_PLACE_ORDER` with `{ to, data, value, sessionPrivateKey }`.
18479
18499
  * The caller must sign the transaction and pass it back via `gen.next(signedTx)`.
18480
18500
  * 3. Yields `ORDER_PLACED` with the finalised order and transaction hash once
@@ -18511,11 +18531,11 @@ var IntentGateway = class _IntentGateway {
18511
18531
  value = estimate.totalGasCostWei + estimate.totalGasCostWei * 2n / 100n;
18512
18532
  const crossChainFeeBump = isSameChain ? 0n : await convertGasToFeeToken(
18513
18533
  this.ctx,
18514
- CROSS_CHAIN_ORDER_FEE_GAS_BUMP,
18534
+ RELAYER_MESSAGE_GAS,
18515
18535
  "source",
18516
18536
  this.source.config.stateMachineId
18517
18537
  );
18518
- executionOrder.fees = isSameChain ? estimate.totalGasInFeeToken * 2n : estimate.totalGasInFeeToken + (crossChainFeeBump + estimate.totalGasInFeeToken * 1n / 100n);
18538
+ executionOrder.fees = isSameChain ? estimate.totalGasInFeeToken * 2n : (estimate.totalGasInFeeToken + crossChainFeeBump) * 105n / 100n;
18519
18539
  }
18520
18540
  const placeOrderGen = this.orderPlacer.placeOrder(executionOrder, graffiti);
18521
18541
  const placeOrderFirst = await placeOrderGen.next();