Skip to content

Conversation

@midas-myth
Copy link
Contributor

@midas-myth midas-myth commented Dec 23, 2025

Note

Modernizes GM/GLV multichain deposit/withdrawal flows with unified fee/transfer handling and signerless express tx builds.

  • Introduces TechnicalGmFees (sourceChain/gmxAccount/settlementChain) and rewires fee usage across deposit/withdrawal paths, logical fee calc, and submit-state validation
  • Replaces ad‑hoc transfer logic with buildDepositTransferRequests and buildWithdrawalTransferRequests
  • Updates express builders (useMultichain*ExpressTxnParams) and market tx creators to support emptySignature (no signer) for payload building
  • Enhances technical fee estimation (useTechnicalFeesAsyncResult) to compute execution/relay fees for all pay sources and actions, using new relay param utilities
  • Improves relay gas estimation with state overrides; adjusts ERC20 override and max allowance usage; minor metrics/error-handling and token data sourcing tweaks
  • Selector and best‑pool logic tweaks (thresholded auto‑selection); locale files updated

Written by Cursor Bugbot for commit 7e90156. This will update automatically on new commits. Configure here.

… unified TechnicalGmFees type. Update fee estimation logic for deposits and withdrawals, enhancing clarity and maintainability. Introduce buildDepositTransferRequests and buildWithdrawalTransferRequests functions for improved transfer request management.
… unified TechnicalGmFees type. Update fee estimation logic for deposits and withdrawals, enhancing clarity and maintainability. Introduce buildDepositTransferRequests and buildWithdrawalTransferRequests functions for improved transfer request management.
…ndling and selector usage. Removed unnecessary account and marketInfo checks, streamlined conditions for order submission, and updated token data selectors for consistency. Enhanced logic for determining best GM market based on amount changes.
…, simplifying conditions for deposit creation. This enhances clarity and maintains functionality.
@midas-myth midas-myth self-assigned this Dec 23, 2025
…d optional shouldUseSignerMethod parameter. Update related fee estimation logic to use the new function signature, enhancing flexibility in signing transactions.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 23, 2025

Deploying gmx-interface-home with  Cloudflare Pages  Cloudflare Pages

Latest commit: c37acac
Status: ✅  Deploy successful!
Preview URL: https://2cb872bc.gmx-interface-home.pages.dev
Branch Preview URL: https://fedev-3074-fix-multichain-tx.gmx-interface-home.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 23, 2025

Deploying gmx-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: c37acac
Status: ✅  Deploy successful!
Preview URL: https://136d13ea.gmx-interface.pages.dev
Branch Preview URL: https://fedev-3074-fix-multichain-tx.gmx-interface.pages.dev

View logs

@midas-myth
Copy link
Contributor Author

@cursor review

…rawalTransactions hooks. Remove unnecessary fee checks and update conditions for execution fee calculation, improving clarity and maintainability.
…o fee types. Update deposit and withdrawal transaction hooks to utilize these flags for improved logic flow.
…stimateGasParameters for improved clarity and maintainability. Introduce state overrides for relayer fee token and DataStore, enhancing the handling of gas payment parameters.
@midas-myth
Copy link
Contributor Author

@cursor review

@midas-myth midas-myth changed the title Fedev 3074 fix multichain tx Fix multichain FEDEV-3074 FEDEV-3074 Dec 24, 2025
@midas-myth midas-myth marked this pull request as ready for review December 24, 2025 18:42
…use getByKey for improved safety and clarity. Add check for wrapped token data existence to prevent potential errors.
@midas-myth midas-myth requested a review from divhead December 24, 2025 20:55
}
const wrappedTokenPrice = getMidPrice(wrappedTokenData.prices);
const keeperUsd = convertToUsd(technicalFees.fees.feeTokenAmount, wrappedToken.decimals, wrappedTokenPrice)!;
logicalNetworkFeeUsd = keeperUsd * -1n;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move it to pure function from hook

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved

DATASTORE_SLOT_INDEXES.uintValues
),
value: toHex(maxUint256),
value: toHex(maxUint256 / 100n, { size: 32 }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why / 100n?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to constant and explained

@midas-myth midas-myth changed the title Fix multichain FEDEV-3074 FEDEV-3074 Fix multichain FEDEV-3074 Jan 6, 2026
@midas-myth
Copy link
Contributor Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!

divhead
divhead previously approved these changes Jan 6, 2026
- Updated the  hook to replace second token references with long and short token amounts for improved clarity.
- Adjusted the  type to reflect the new token amount structure.
- Modified the  function to utilize the updated parameters for long and short token amounts.
divhead
divhead previously approved these changes Jan 6, 2026
@midas-myth midas-myth changed the title Fix multichain FEDEV-3074 Fix multichain FEDEV-3074 FEDEV-3220 Jan 8, 2026
@midas-myth midas-myth changed the title Fix multichain FEDEV-3074 FEDEV-3220 Fix multichain FEDEV-3074 Jan 9, 2026
divhead
divhead previously approved these changes Jan 13, 2026
@midas-myth midas-myth force-pushed the fedev-3074-fix-multichain-tx branch from 74d7488 to 2841f6a Compare January 14, 2026 23:12
@midas-myth
Copy link
Contributor Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!

@midas-myth
Copy link
Contributor Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!

@midas-myth midas-myth merged commit 65f3416 into release Jan 15, 2026
5 checks passed
@midas-myth midas-myth deleted the fedev-3074-fix-multichain-tx branch January 15, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants