Skip to content
Closed
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
4 changes: 3 additions & 1 deletion src/Errors/GenericErrors.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// SPDX-License-Identifier: LGPL-3.0-only
/// @custom:version 1.0.1
pragma solidity ^0.8.17;

/// @custom:version 1.0.2
/// @notice This contract contains errors commonly used by the LiFi protocol

error AlreadyInitialized();
error CannotAuthoriseSelf();
error CannotBridgeToSameNetwork();
Expand Down
3 changes: 2 additions & 1 deletion src/Libraries/LibAsset.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol";
import { InvalidReceiver, NullAddrIsNotAValidSpender, InvalidAmount, NullAddrIsNotAnERC20Token } from "../Errors/GenericErrors.sol";

/// @title LibAsset
/// @custom:version 2.1.0
/// @custom:version 2.1.1
/// @author LI.FI (https://li.fi)
/// @notice This library contains helpers for dealing with onchain transfers
/// of assets, including accounting for the native asset `assetId`
/// conventions and any noncompliant ERC20 transfers
Expand Down
12 changes: 12 additions & 0 deletions test/solidity/Facets/RelayFacet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { LibAllowList } from "lifi/Libraries/LibAllowList.sol";
import { LibAsset } from "lifi/Libraries/LibAsset.sol";
import { RelayFacet } from "lifi/Facets/RelayFacet.sol";
import { ILiFi } from "lifi/Interfaces/ILiFi.sol";
import { InvalidConfig } from "lifi/Errors/GenericErrors.sol";

contract Reverter {
error AlwaysReverts();
Expand Down Expand Up @@ -124,6 +125,17 @@ contract RelayFacetTest is TestBaseFacet {
}
}

function testRevert_WhenUsingInvalidConfig() public {
// invalid relay solver
vm.expectRevert(InvalidConfig.selector);
new RelayFacet(RELAY_RECEIVER, address(0));

// invalid relay receiver
vm.expectRevert(InvalidConfig.selector);

new RelayFacet(address(0), relaySolver);
}

function test_CanDeployFacet() public virtual {
new RelayFacet(RELAY_RECEIVER, relaySolver);
}
Expand Down
Loading