|
| 1 | +// SPDX-License-Identifier: MIT |
| 2 | +pragma solidity ^0.8.23; |
| 3 | + |
| 4 | +/// @title AcrossFacetPackedV3 |
| 5 | +/// @author LI.FI (https://li.fi) |
| 6 | +/// @notice Provides functionality for bridging through Across in a gas-optimized way |
| 7 | +/// @notice taken from LiFi contracts https://github.com/lifinance/contracts and stripped down to needs |
| 8 | +/// @notice !WARNING ALREADY BLACKLISTED |
| 9 | +/// @custom:version 1.0.0 |
| 10 | +contract AcrossFacetPackedV3 { |
| 11 | + /// Constructor /// |
| 12 | + |
| 13 | + /// External Methods /// |
| 14 | + |
| 15 | + /// @notice Bridges native tokens via Across (packed implementation) |
| 16 | + /// No params, all data will be extracted from manually encoded callData |
| 17 | + function startBridgeTokensViaAcrossV3NativePacked() external payable { } |
| 18 | + |
| 19 | + /// @notice Bridges native tokens via Across (minimal implementation) |
| 20 | + /// @param transactionId Custom transaction ID for tracking |
| 21 | + /// @param receiver Receiving wallet address |
| 22 | + /// @param destinationChainId Receiving chain |
| 23 | + /// @param receivingAssetId The address of the token to be received at destination chain |
| 24 | + /// @param outputAmount The amount to be received at destination chain (after fees) |
| 25 | + /// @param quoteTimestamp The timestamp of the Across quote that was used for this transaction |
| 26 | + /// @param fillDeadline The destination chain timestamp until which the order can be filled |
| 27 | + /// @param message Arbitrary data that can be used to pass additional information to the recipient along with the |
| 28 | + /// tokens |
| 29 | + function startBridgeTokensViaAcrossV3NativeMin( |
| 30 | + bytes32 transactionId, |
| 31 | + address receiver, |
| 32 | + uint256 destinationChainId, |
| 33 | + address receivingAssetId, |
| 34 | + uint256 outputAmount, |
| 35 | + uint32 quoteTimestamp, |
| 36 | + uint32 fillDeadline, |
| 37 | + bytes calldata message |
| 38 | + ) |
| 39 | + external |
| 40 | + payable |
| 41 | + { } |
| 42 | + |
| 43 | + /// @notice Bridges ERC20 tokens via Across (packed implementation) |
| 44 | + /// No params, all data will be extracted from manually encoded callData |
| 45 | + function startBridgeTokensViaAcrossV3ERC20Packed() external { } |
| 46 | + |
| 47 | + /// @notice Bridges ERC20 tokens via Across (minimal implementation) |
| 48 | + /// @param transactionId Custom transaction ID for tracking |
| 49 | + /// @param sendingAssetId The address of the asset/token to be bridged |
| 50 | + /// @param inputAmount The amount to be bridged (including fees) |
| 51 | + /// @param receiver Receiving wallet address |
| 52 | + /// @param destinationChainId Receiving chain |
| 53 | + /// @param receivingAssetId The address of the token to be received at destination chain |
| 54 | + /// @param outputAmount The amount to be received at destination chain (after fees) |
| 55 | + /// @param quoteTimestamp The timestamp of the Across quote that was used for this transaction |
| 56 | + /// @param fillDeadline The destination chain timestamp until which the order can be filled |
| 57 | + /// @param message Arbitrary data that can be used to pass additional information to the recipient along with the |
| 58 | + /// tokens |
| 59 | + function startBridgeTokensViaAcrossV3ERC20Min( |
| 60 | + bytes32 transactionId, |
| 61 | + address sendingAssetId, |
| 62 | + uint256 inputAmount, |
| 63 | + address receiver, |
| 64 | + uint64 destinationChainId, |
| 65 | + address receivingAssetId, |
| 66 | + uint256 outputAmount, |
| 67 | + uint32 quoteTimestamp, |
| 68 | + uint32 fillDeadline, |
| 69 | + bytes calldata message |
| 70 | + ) |
| 71 | + external |
| 72 | + { |
| 73 | + // Deposit assets |
| 74 | + } |
| 75 | +} |
0 commit comments