Skip to content

Commit 6722777

Browse files
authored
Merge pull request #627 from superform-xyz/fixAbstractDeploy
fix: abstract deploy
2 parents 810888a + ce76975 commit 6722777

File tree

2 files changed

+81
-1
lines changed

2 files changed

+81
-1
lines changed

script/forge-scripts/Abstract.Deploy.Single.s.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import { PayMaster } from "src/payments/PayMaster.sol";
4646
import { EmergencyQueue } from "src/EmergencyQueue.sol";
4747
import { VaultClaimer } from "src/VaultClaimer.sol";
4848
import { AcrossFacetPacked } from "./misc/blacklistedFacets/AcrossFacetPacked.sol";
49+
import { AcrossFacetPackedV3 } from "./misc/blacklistedFacets/AcrossFacetPackedV3.sol";
4950
import { AmarokFacetPacked } from "./misc/blacklistedFacets/AmarokFacetPacked.sol";
5051
import { RewardsDistributor } from "src/RewardsDistributor.sol";
5152
import "forge-std/console.sol";
@@ -607,7 +608,7 @@ abstract contract AbstractDeploySingle is BatchScript {
607608
vars.lifiValidator = address(new LiFiValidator{ salt: salt }(vars.superRegistry));
608609
vars.lv = LiFiValidator(vars.lifiValidator);
609610

610-
vars.selectorsToBlacklist = new bytes4[](8);
611+
vars.selectorsToBlacklist = new bytes4[](12);
611612

612613
/// @dev add selectors that need to be blacklisted post LiFiValidator deployment here
613614
vars.selectorsToBlacklist[0] = AcrossFacetPacked.startBridgeTokensViaAcrossNativePacked.selector;
@@ -618,6 +619,10 @@ abstract contract AbstractDeploySingle is BatchScript {
618619
vars.selectorsToBlacklist[5] = AmarokFacetPacked.startBridgeTokensViaAmarokERC20PackedPayFeeWithNative.selector;
619620
vars.selectorsToBlacklist[6] = AmarokFacetPacked.startBridgeTokensViaAmarokERC20MinPayFeeWithAsset.selector;
620621
vars.selectorsToBlacklist[7] = AmarokFacetPacked.startBridgeTokensViaAmarokERC20MinPayFeeWithNative.selector;
622+
vars.selectorsToBlacklist[8] = AcrossFacetPackedV3.startBridgeTokensViaAcrossV3NativePacked.selector;
623+
vars.selectorsToBlacklist[9] = AcrossFacetPackedV3.startBridgeTokensViaAcrossV3NativeMin.selector;
624+
vars.selectorsToBlacklist[10] = AcrossFacetPackedV3.startBridgeTokensViaAcrossV3ERC20Packed.selector;
625+
vars.selectorsToBlacklist[11] = AcrossFacetPackedV3.startBridgeTokensViaAcrossV3ERC20Min.selector;
621626

622627
for (uint256 j = 0; j < vars.selectorsToBlacklist.length; ++j) {
623628
vars.lv.addToBlacklist(vars.selectorsToBlacklist[j]);
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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

Comments
 (0)