Skip to content

Commit

Permalink
functions renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed May 20, 2024
1 parent 527e37d commit 4ad5ed9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Facets/GenericSwapFacetV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ contract GenericSwapFacetV3 is ILiFi, ReentrancyGuard, SwapperV2, Validatable {
/// @param _receiver the address to receive the swapped tokens into (also excess tokens)
/// @param _minAmountOut the minimum amount of the final asset to receive
/// @param _swapData an object containing swap related data to perform swaps before bridging
function swapTokensSingleERC20ToERC20(
function swapTokensSingleV3ERC20ToERC20(
bytes32 _transactionId,
string calldata _integrator,
string calldata _referrer,
Expand Down Expand Up @@ -85,7 +85,7 @@ contract GenericSwapFacetV3 is ILiFi, ReentrancyGuard, SwapperV2, Validatable {
/// @param _receiver the address to receive the swapped tokens into (also excess tokens)
/// @param _minAmountOut the minimum amount of the final asset to receive
/// @param _swapData an object containing swap related data to perform swaps before bridging
function swapTokensSingleERC20ToNative(
function swapTokensSingleV3ERC20ToNative(
bytes32 _transactionId,
string calldata _integrator,
string calldata _referrer,
Expand Down Expand Up @@ -140,7 +140,7 @@ contract GenericSwapFacetV3 is ILiFi, ReentrancyGuard, SwapperV2, Validatable {
/// @param _receiver the address to receive the swapped tokens into (also excess tokens)
/// @param _minAmountOut the minimum amount of the final asset to receive
/// @param _swapData an object containing swap related data to perform swaps before bridging
function swapTokensSingleNativeToERC20(
function swapTokensSingleV3NativeToERC20(
bytes32 _transactionId,
string calldata _integrator,
string calldata _referrer,
Expand Down
16 changes: 8 additions & 8 deletions test/solidity/Facets/GenericSwapFacetV3.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ contract GenericSwapFacetV3Test is DSTest, DiamondTest, Test {
// add genericSwapFacet (v3) to diamond
bytes4[] memory functionSelectorsV3 = new bytes4[](5);
functionSelectorsV3[0] = genericSwapFacetV3
.swapTokensSingleERC20ToERC20
.swapTokensSingleV3ERC20ToERC20
.selector;
functionSelectorsV3[1] = genericSwapFacetV3
.swapTokensSingleERC20ToNative
.swapTokensSingleV3ERC20ToNative
.selector;
functionSelectorsV3[2] = genericSwapFacetV3
.swapTokensSingleNativeToERC20
.swapTokensSingleV3NativeToERC20
.selector;
functionSelectorsV3[3] = genericSwapFacetV3
.swapTokensGenericV3FromERC20
Expand Down Expand Up @@ -317,7 +317,7 @@ contract GenericSwapFacetV3Test is DSTest, DiamondTest, Test {
expAmountOut // toAmount (with liquidity in that selected block)
);

genericSwapFacetV3.swapTokensSingleERC20ToERC20(
genericSwapFacetV3.swapTokensSingleV3ERC20ToERC20(
"",
"integrator",
"referrer",
Expand All @@ -330,7 +330,7 @@ contract GenericSwapFacetV3Test is DSTest, DiamondTest, Test {
console.log("gas used: V2", gasUsed);

bytes memory callData = abi.encodeWithSelector(
genericSwapFacetV3.swapTokensSingleERC20ToERC20.selector,
genericSwapFacetV3.swapTokensSingleV3ERC20ToERC20.selector,
"",
"integrator",
"referrer",
Expand Down Expand Up @@ -454,7 +454,7 @@ contract GenericSwapFacetV3Test is DSTest, DiamondTest, Test {
minAmountOut // toAmount (with liquidity in that selected block)
);

genericSwapFacetV3.swapTokensSingleERC20ToNative(
genericSwapFacetV3.swapTokensSingleV3ERC20ToNative(
"",
"integrator",
"referrer",
Expand Down Expand Up @@ -560,7 +560,7 @@ contract GenericSwapFacetV3Test is DSTest, DiamondTest, Test {
minAmountOut // toAmount (with liquidity in that selected block)
);

genericSwapFacetV3.swapTokensSingleNativeToERC20{
genericSwapFacetV3.swapTokensSingleV3NativeToERC20{
value: swapData[0].fromAmount
}(
"",
Expand Down Expand Up @@ -1204,7 +1204,7 @@ contract GenericSwapFacetV3Test is DSTest, DiamondTest, Test {

usdc.approve(address(genericSwapFacet), amountIn);

genericSwapFacetV3.swapTokensSingleERC20ToERC20(
genericSwapFacetV3.swapTokensSingleV3ERC20ToERC20(
0x0000000000000000000000000000000000000000000000000000000000000000, // transactionId,
"integrator", // integrator
"referrer", // referrer
Expand Down

0 comments on commit 4ad5ed9

Please sign in to comment.