Skip to content

Conversation

@nicosampler
Copy link

@nicosampler nicosampler commented Apr 23, 2025

This PR adds Khalani integration and depends on hyperlane-xyz/hyperlane-monorepo#5845.

The core logic was added here.

Khalani has a particular flow to complete a transfer:

  1. An approval for the ERC20
  2. A deposit to a smart contract denominated assetReserves

For both of these actions, warpCore.getTransferRemoteTxs is used, ensuring the existing flow works as it does for warpRoutes.

After these two actions are completed, Khalani requires a few extra steps to complete the transfer. The current implementation does not cover these, so a new condition was added for this special case. When the token standard is Khalani, a new block of code was added that enables us to:

  1. Fetch intent-quota, which provides transfer stats.
  2. Request an EIP712 signature, signing the intent-quota from step 3.
  3. Wait for mTokens (mirror tokens on Khalani's Arcadia chain) to be minted.
  4. Send the intent to Khalani's API, called Medusa.
  5. Wait for the network of solvers to solve the intent.

It was also necessary to adapt the transaction store and modal to request the user signature and also to reflect the progress of the transaction.

@vercel
Copy link

vercel bot commented Apr 23, 2025

@nicosampler is attempting to deploy a commit to the Abacus Works Team on Vercel.

A member of the Team first needs to authorize it.

@nicosampler nicosampler marked this pull request as draft April 23, 2025 20:09
@nicosampler nicosampler force-pushed the khalani-intents-integration branch from 2304c14 to aedfb73 Compare May 8, 2025 11:55
@konraddb konraddb force-pushed the khalani-intents-integration branch from f308835 to c85c577 Compare May 29, 2025 06:12
@konraddb konraddb force-pushed the khalani-intents-integration branch from c85c577 to 8da17d4 Compare June 20, 2025 12:55
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.

1 participant