Skip to content

Commit

Permalink
Rename Mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
MilGard91 authored and roxdanila committed May 21, 2024
1 parent 3fb0594 commit 6262a99
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.18;
import "../common/PoolMock.sol";
import "../../interfaces/IPriceFeedOracle.sol";

contract SafeTrackerMockPool is PoolMock {
contract STMockPool is PoolMock {

IPriceFeedOracle public override priceFeedOracle;

Expand Down
48 changes: 48 additions & 0 deletions contracts/mocks/SafeTracker/STMockSwapOperator.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-3.0-only

pragma solidity ^0.8.18;

import "../../interfaces/ISwapOperator.sol";

contract STMockSwapOperator is ISwapOperator {

function requestAsset(address, uint) external virtual pure {
revert("Unsupported");
}

function transferRequestedAsset(address, uint) external virtual pure {
revert("Unsupported");
}

function getDigest(GPv2Order.Data calldata) external virtual view returns (bytes32) {
revert("Unsupported");
}

function getUID(GPv2Order.Data calldata) external virtual view returns (bytes memory) {
revert("Unsupported");
}

function orderInProgress() external virtual pure returns (bool) {
revert("Unsupported");
}

function placeOrder(GPv2Order.Data calldata, bytes calldata) external virtual {
revert("Unsupported");
}

function closeOrder(GPv2Order.Data calldata) external virtual {
revert("Unsupported");
}

function swapEnzymeVaultShareForETH(uint, uint) external virtual {
revert("Unsupported");
}

function swapETHForEnzymeVaultShare(uint, uint) external virtual {
revert("Unsupported");
}

function recoverAsset(address, address) external virtual {
revert("Unsupported");
}
}
19 changes: 0 additions & 19 deletions contracts/mocks/SafeTracker/SafeTrackerSwapOperatorMock.sol

This file was deleted.

4 changes: 2 additions & 2 deletions test/unit/SafeTracker/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ async function setup() {
const master = await ethers.deployContract('MasterMock');
const nxm = await ethers.deployContract('NXMTokenMock');
const priceFeedOracle = await ethers.deployContract('PriceFeedOracleMock', [ETH_RATE]);
const swapOperator = await ethers.deployContract('SafeTrackerSwapOperatorMock');
const pool = await ethers.deployContract('SafeTrackerMockPool', [priceFeedOracle.address, swapOperator.address]);
const swapOperator = await ethers.deployContract('STMockSwapOperator');
const pool = await ethers.deployContract('STMockPool', [priceFeedOracle.address, swapOperator.address]);
const tokenController = await ethers.deployContract('TokenControllerMock', [nxm.address]);

const tokenAmount = parseEther('100000');
Expand Down

0 comments on commit 6262a99

Please sign in to comment.