Skip to content

Commit

Permalink
refactor: remove unused imports (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent authored Jun 27, 2023
1 parent 0155321 commit e77bb4b
Show file tree
Hide file tree
Showing 20 changed files with 2 additions and 37 deletions.
3 changes: 0 additions & 3 deletions solidity/contracts/Oracle.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

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

import {IOracle} from '../interfaces/IOracle.sol';
import {IAccountingExtension} from '../interfaces/extensions/IAccountingExtension.sol';

contract Oracle is IOracle {
mapping(bytes32 _responseId => bytes32 _disputeId) public disputeOf;
Expand Down
4 changes: 0 additions & 4 deletions solidity/contracts/modules/ArbitratorModule.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {ERC165Checker} from '@openzeppelin/contracts/utils/introspection/ERC165Checker.sol';

import {IArbitratorModule} from '../../interfaces/modules/IArbitratorModule.sol';
import {IOracle} from '../../interfaces/IOracle.sol';
import {IArbitrator} from '../../interfaces/IArbitrator.sol';
import {IAccountingExtension} from '../../interfaces/extensions/IAccountingExtension.sol';

import {Module} from '../Module.sol';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';

import {IBondEscalationResolutionModule} from '../../interfaces/modules/IBondEscalationResolutionModule.sol';
import {IOracle} from '../../interfaces/IOracle.sol';
import {IDisputeModule} from '../../interfaces/modules/IDisputeModule.sol';
import {IBondEscalationAccounting} from '../../interfaces/extensions/IBondEscalationAccounting.sol';
import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';

Expand Down
1 change: 0 additions & 1 deletion solidity/contracts/modules/ERC20ResolutonModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';

import {IERC20ResolutionModule} from '../../interfaces/modules/IERC20ResolutionModule.sol';
import {IOracle} from '../../interfaces/IOracle.sol';
import {IDisputeModule} from '../../interfaces/modules/IDisputeModule.sol';
import {IAccountingExtension} from '../../interfaces/extensions/IAccountingExtension.sol';
import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';

Expand Down
3 changes: 0 additions & 3 deletions solidity/interfaces/IArbitrator.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {IERC165} from '@openzeppelin/contracts/utils/introspection/IERC165.sol';
import {IOracle} from './IOracle.sol';

interface IArbitrator {
function getAnswer(bytes32 _dispute) external returns (bool _answer);
function resolve(bytes32 _disputeId) external returns (bytes memory _data);
Expand Down
2 changes: 0 additions & 2 deletions solidity/interfaces/ICallback.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {IOracle} from './IOracle.sol';

interface ICallback {
function callback(bytes32 _request, bytes calldata _data) external;
}
2 changes: 0 additions & 2 deletions solidity/interfaces/IModule.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {IOracle} from './IOracle.sol';

interface IModule {
error Module_OnlyOracle();
error Module_InvalidCaller();
Expand Down
3 changes: 0 additions & 3 deletions solidity/interfaces/IOracle.sol
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

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

import {IRequestModule} from './modules/IRequestModule.sol';
import {IResponseModule} from './modules/IResponseModule.sol';
import {IDisputeModule} from './modules/IDisputeModule.sol';
import {IResolutionModule} from './modules/IResolutionModule.sol';
import {IFinalityModule} from './modules/IFinalityModule.sol';
import {IAccountingExtension} from './extensions/IAccountingExtension.sol';

interface IOracle {
/// @notice Thrown when the caller of the slash() function is not the DisputeModule
Expand Down
1 change: 0 additions & 1 deletion solidity/interfaces/extensions/IAccountingExtension.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity ^0.8.19;

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

interface IAccountingExtension {
event Deposit(address indexed _depositor, IERC20 indexed _token, uint256 _amount);
Expand Down
1 change: 0 additions & 1 deletion solidity/interfaces/modules/IArbitratorModule.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.16 <0.9.0;

import {IOracle} from '../IOracle.sol';
import {IResolutionModule} from './IResolutionModule.sol';

interface IArbitratorModule is IResolutionModule {
Expand Down
1 change: 0 additions & 1 deletion solidity/interfaces/modules/IBondEscalationModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity ^0.8.19;

import {IDisputeModule} from './IDisputeModule.sol';
import {IOracle} from '../IOracle.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {IBondEscalationAccounting} from '../extensions/IBondEscalationAccounting.sol';

Expand Down
1 change: 0 additions & 1 deletion solidity/interfaces/modules/ICallbackModule.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {IOracle} from '../IOracle.sol';
import {IFinalityModule} from './IFinalityModule.sol';

interface ICallbackModule is IFinalityModule {
Expand Down
1 change: 0 additions & 1 deletion solidity/interfaces/modules/IERC20ResolutionModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity >=0.8.16 <0.9.0;

//TODO: add getters

import {IOracle} from '../IOracle.sol';
import {IResolutionModule} from './IResolutionModule.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {IAccountingExtension} from '../extensions/IAccountingExtension.sol';
Expand Down
1 change: 0 additions & 1 deletion solidity/interfaces/modules/IFinalityModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
pragma solidity ^0.8.19;

import {IModule} from '../IModule.sol';
import {IOracle} from '../IOracle.sol';

interface IFinalityModule is IModule {}
1 change: 0 additions & 1 deletion solidity/interfaces/modules/IResolutionModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity ^0.8.19;

import {IModule} from '../IModule.sol';
import {IOracle} from '../IOracle.sol';

interface IResolutionModule is IModule {
function resolveDispute(bytes32 _disputeId) external;
Expand Down
3 changes: 0 additions & 3 deletions solidity/interfaces/modules/IResponseModule.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

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

import {IModule} from '../IModule.sol';
import {IOracle} from '../IOracle.sol';
import {IAccountingExtension} from '../extensions/IAccountingExtension.sol';

interface IResponseModule is IModule {
function propose(
Expand Down
4 changes: 1 addition & 3 deletions solidity/test/unit/ArbitratorModule.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import {
Module,
IArbitratorModule,
IArbitrator,
IOracle,
IAccountingExtension,
IERC20
IOracle
} from '../../contracts/modules/ArbitratorModule.sol';

import {IModule} from '../../interfaces/IModule.sol';
Expand Down
1 change: 0 additions & 1 deletion solidity/test/unit/BondEscalationAccounting.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
IBondEscalationAccounting, BondEscalationAccounting
} from '../../contracts/extensions/BondEscalationAccounting.sol';

import {IModule} from '../../contracts/Module.sol';
import {IAccountingExtension} from '../../interfaces/extensions/IAccountingExtension.sol';
import {IWeth9} from '@defi-wonderland/keep3r-v2/solidity/interfaces/external/IWeth9.sol';

Expand Down
1 change: 0 additions & 1 deletion solidity/test/unit/BondEscalationResolutionModule.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {IResolutionModule} from '../../interfaces/modules/IResolutionModule.sol'
import {IFinalityModule} from '../../interfaces/modules/IFinalityModule.sol';

import {IModule} from '../../contracts/Module.sol';
import {IAccountingExtension} from '../../interfaces/extensions/IAccountingExtension.sol';

import {Strings} from '@openzeppelin/contracts/utils/Strings.sol';

Expand Down
4 changes: 1 addition & 3 deletions solidity/test/unit/Oracle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ pragma solidity ^0.8.19;
// solhint-disable-next-line
import 'forge-std/Test.sol';

import {IWeth9} from '@defi-wonderland/keep3r-v2/solidity/interfaces/external/IWeth9.sol';

import {Oracle, IAccountingExtension, IERC20} from '../../contracts/Oracle.sol';
import {Oracle} from '../../contracts/Oracle.sol';

import {
IOracle,
Expand Down

0 comments on commit e77bb4b

Please sign in to comment.