Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions contracts/external/interfaces/ICoreDepositWallet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,36 @@
*/
pragma solidity ^0.8.0;

/**
* @title IForwardDepositReceiver
* @notice Interface for a contract that can receive deposits from the CCTP Forwarder
* @dev Source: https://github.com/circlefin/hyperevm-circle-contracts/blob/master/src/interfaces/IForwardDepositReceiver.sol
*/
interface IForwardDepositReceiver {
/**
* @notice Deposit tokens for a recipient
* @param recipient Recipient of the deposit
* @param amount Amount of tokens to deposit
* @param destinationId Forwarding-address-specific id used in conjunction with
* recipient to route the deposit to a specific location.
*/
function depositFor(
address recipient,
uint256 amount,
uint32 destinationId
) external;
}

/**
* @title ICoreDepositWallet
* @notice Interface for the core deposit wallet
* @notice Minimal useful interface for the core deposit wallet
* @dev Source: https://github.com/circlefin/hyperevm-circle-contracts/blob/master/src/interfaces/ICoreDepositWallet.sol
*/
interface ICoreDepositWallet {
interface ICoreDepositWallet is IForwardDepositReceiver {
/**
* @notice Deposits tokens for the sender.
* @param amount The amount of tokens being deposited.
* @param destinationDex The destination dex on HyperCore.
*/
function deposit(uint256 amount, uint32 destinationDex) external;

/**
* @notice Deposit tokens for a recipient
* @param recipient Recipient of the deposit
* @param amount Amount of tokens to deposit
* @param destinationId Forwarding-address-specific id used in conjunction with
* recipient to route the deposit to a specific location.
*/
function depositFor(address recipient, uint256 amount, uint32 destinationId) external;
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ abstract contract ArbitraryEVMFlowExecutor {
// This means the swap did happen, so we check the balance of the output token and send it.
finalAmount = finalBalance - finalAmountSnapshot;
} else {
// If we somehow lost final tokens(e.g. by depositing into some contract), just set the finalAmount to 0.
// If we somehow lost final tokens (e.g. by depositing into some contract), just set the finalAmount to 0.
finalAmount = 0;
}
}
Expand Down
Loading