Closed serejke closed 1 year ago
Left a comment behind but this is basically done now: https://github.com/tvl-labs/hyperlane-cardano/commit/13857ce3fcf83c082c2c0b75e437638fcd6164c5#diff-e9fd83da91750dabec5f98baca4d27fbbdf3c3611bada9e500a64c556aa19e9aR34-R38
Overview
We have a 2-step USDC minting process: 1) Using multisig ISM post a "mint X USDC" message to Khalani recipient address — first transaction 2) Monitor new "mint X USDC" messages on the Khalani recipient address and mint the USDC — second transaction
The current
/api/inbox/estimate-message-fee
only estimates the fee of the first transaction. We should have the second fee estimation to charge the user the full gas amount on the source chain.Since currently the message delivery and USDC minting are going to be handled by the same RPC agent, we can return the total cost from the
/api/inbox/estimate-message-fee
but keep them separate in code to allow to split them later.