Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brian/foundry test #181

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
2 changes: 1 addition & 1 deletion contracts/interfaces/IClaimAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SPDX-License-Identifier: Apache License, Version 2.0
*/

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

import { ISetToken } from "../interfaces/ISetToken.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IModuleIssuanceHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

import { ISetToken } from "./ISetToken.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IModuleIssuanceHookV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

import { ISetToken } from "./ISetToken.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IPerpV2LeverageModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

import { ISetToken } from "./ISetToken.sol";
import { IDebtIssuanceModule } from "./IDebtIssuanceModule.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/ISetToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

/**
* @title ISetToken
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/external/ICErc20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/external/ICEth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/external/IDMMFactory.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.6.10;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/token/ERC20/IERC20.sol";

interface IDMMFactory {
function createPool(
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/external/IDMMPool.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.6.10;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/token/ERC20/IERC20.sol";

import "./IDMMFactory.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/external/IWETH.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

/**
* @title IWETH
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/external/aave-v2/IAToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";
interface IAToken is IERC20 {
function UNDERLYING_ASSET_ADDRESS() external view returns (address);
}
2 changes: 1 addition & 1 deletion contracts/interfaces/external/aave-v2/IStableDebtToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

/**
* @title IStableDebtToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

/**
* @title IVariableDebtToken
Expand Down
6 changes: 3 additions & 3 deletions contracts/lib/ExplicitERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/token/ERC20/SafeERC20.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";

/**
* @title ExplicitERC20
Expand Down
6 changes: 3 additions & 3 deletions contracts/lib/PreciseUnitMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import { SafeCast } from "@openzeppelin/contracts/utils/SafeCast.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { SignedSafeMath } from "@openzeppelin/contracts/math/SignedSafeMath.sol";
import { SafeCast } from "@openzeppelin/utils/SafeCast.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";
import { SignedSafeMath } from "@openzeppelin/math/SignedSafeMath.sol";


/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/lib/UnitConversionUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pragma solidity 0.6.10;

import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { SignedSafeMath } from "@openzeppelin/contracts/math/SignedSafeMath.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";
import { SignedSafeMath } from "@openzeppelin/math/SignedSafeMath.sol";

/**
* @title UnitConversionUtils
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ContractCallerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

pragma solidity 0.6.10;

import { Address } from "@openzeppelin/contracts/utils/Address.sol";
import { Address } from "@openzeppelin/utils/Address.sol";


contract ContractCallerMock {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ExplicitERC20Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

import { ExplicitERC20 } from "../lib/ExplicitERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

contract ExplicitERC20Mock {

Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/OracleAdapterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pragma solidity 0.6.10;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { Ownable } from "@openzeppelin/access/Ownable.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";

import { IOracle } from "../interfaces/IOracle.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/StandardTokenMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

pragma solidity 0.6.10;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/token/ERC20/ERC20.sol";

// mock class using BasicToken
contract StandardTokenMock is ERC20 {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/StandardTokenWithFeeMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
pragma solidity 0.6.10;


import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/math/SafeMath.sol";


// mock class using BasicToken
Expand Down
6 changes: 3 additions & 3 deletions contracts/mocks/StandardTokenWithRoundingErrorMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
pragma solidity 0.6.10;

import "./StandardTokenMock.sol";
import "@openzeppelin/contracts/math/SignedSafeMath.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/SafeCast.sol";
import "@openzeppelin/math/SignedSafeMath.sol";
import "@openzeppelin/math/SafeMath.sol";
import "@openzeppelin/utils/SafeCast.sol";

contract StandardTokenWithRoundingErrorMock {
using SignedSafeMath for int256;
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/external/ComptrollerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

pragma solidity 0.6.10;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";
import { ICErc20 } from "../../interfaces/external/ICErc20.sol";

contract ComptrollerMock {
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/external/KyberNetworkProxyMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pragma solidity 0.6.10;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";

// Mock contract implementation of KyberNetworkProxy, where token can only be traded against WETH for simplicity.
// Adapted from Argent mock Kyber implementation
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/external/OneInchExchangeMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pragma solidity 0.6.10;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";

// Mock contract implementation of 1Inch
contract OneInchExchangeMock {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/external/SynthetixExchangerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

pragma solidity 0.6.10;

import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";
import { SynthMock } from "./SynthMock.sol";

contract SynthetixExchangerMock {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/external/YearnStrategyMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/token/ERC20/IERC20.sol";
import {BaseStrategyInitializable, StrategyParams, VaultAPI} from "../../../external/contracts/yearn/BaseStrategy.sol";

/*
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/external/ZeroExMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";

// Minimal 0x Exchange Proxy contract interface.
contract ZeroExMock {
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/integrations/AmmAdapterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pragma solidity 0.6.10;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";


/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/integrations/ClaimAdapterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pragma solidity 0.6.10;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

import { ISetToken } from "../../interfaces/ISetToken.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integrations/GovernanceAdapterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";


/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/integrations/StakingAdapterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

pragma solidity 0.6.10;

import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integrations/TradeAdapterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";

/**
* @title TradeAdapterMock
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/integrations/WrapAdapterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pragma solidity 0.6.10;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";


/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/integrations/WrapV2AdapterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

pragma solidity 0.6.10;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/protocol/integration/lib/PerpV2Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";
import { IClearingHouse } from "../../../../interfaces/external/perp-v2/IClearingHouse.sol";
import { IVault } from "../../../../interfaces/external/perp-v2/IVault.sol";
import { IQuoter } from "../../../../interfaces/external/perp-v2/IQuoter.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/protocol/lib/ModuleBaseMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

import { IController } from "../../../interfaces/IController.sol";
import { ISetToken } from "../../../interfaces/ISetToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/protocol/module/DebtIssuanceMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
pragma solidity 0.6.10;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";

import { ISetToken } from "../../../interfaces/ISetToken.sol";

Expand Down
8 changes: 4 additions & 4 deletions contracts/mocks/protocol/module/DebtModuleMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeCast } from "@openzeppelin/contracts/utils/SafeCast.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { SignedSafeMath } from "@openzeppelin/contracts/math/SignedSafeMath.sol";
import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol";
import { SafeCast } from "@openzeppelin/utils/SafeCast.sol";
import { SafeMath } from "@openzeppelin/math/SafeMath.sol";
import { SignedSafeMath } from "@openzeppelin/math/SignedSafeMath.sol";

import { Invoke } from "../../../protocol/lib/Invoke.sol";
import { IController } from "../../../interfaces/IController.sol";
Expand Down
Loading