Skip to content

Commit

Permalink
style: enable sort_imports (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent authored Dec 14, 2023
1 parent 5679904 commit 6ac0f50
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 21 deletions.
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ int_types = 'long'
quote_style = 'single'
number_underscore = 'thousands'
multiline_func_header = 'params_first'
sort_imports = true

[profile.default]
solc_version = '0.8.19'
Expand Down
7 changes: 4 additions & 3 deletions solidity/contracts/Oracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ pragma solidity ^0.8.19;

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

import {IRequestModule} from '../interfaces/modules/request/IRequestModule.sol';
import {IResponseModule} from '../interfaces/modules/response/IResponseModule.sol';
import {IDisputeModule} from '../interfaces/modules/dispute/IDisputeModule.sol';
import {IResolutionModule} from '../interfaces/modules/resolution/IResolutionModule.sol';

import {IFinalityModule} from '../interfaces/modules/finality/IFinalityModule.sol';
import {IRequestModule} from '../interfaces/modules/request/IRequestModule.sol';
import {IResolutionModule} from '../interfaces/modules/resolution/IResolutionModule.sol';
import {IResponseModule} from '../interfaces/modules/response/IResponseModule.sol';

contract Oracle is IOracle {
/// @inheritdoc IOracle
Expand Down
24 changes: 14 additions & 10 deletions solidity/test/integration/IntegrationBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,29 @@ pragma solidity ^0.8.19;
import {console} from 'forge-std/console.sol';

import {IDisputeModule} from '../../interfaces/modules/dispute/IDisputeModule.sol';

import {IFinalityModule} from '../../interfaces/modules/finality/IFinalityModule.sol';
import {IRequestModule} from '../../interfaces/modules/request/IRequestModule.sol';
import {IResponseModule} from '../../interfaces/modules/response/IResponseModule.sol';
import {IResolutionModule} from '../../interfaces/modules/resolution/IResolutionModule.sol';
import {IFinalityModule} from '../../interfaces/modules/finality/IFinalityModule.sol';
import {IResponseModule} from '../../interfaces/modules/response/IResponseModule.sol';

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

import {IMockAccounting, MockAccounting} from '../mocks/contracts/MockAccounting.sol';
import {MockCallback} from '../mocks/contracts/MockCallback.sol';
import {MockRequestModule, IMockRequestModule} from '../mocks/contracts/MockRequestModule.sol';
import {MockResponseModule, IMockResponseModule} from '../mocks/contracts/MockResponseModule.sol';
import {MockDisputeModule, IMockDisputeModule} from '../mocks/contracts/MockDisputeModule.sol';
import {MockResolutionModule, IMockResolutionModule} from '../mocks/contracts/MockResolutionModule.sol';
import {MockFinalityModule, IMockFinalityModule} from '../mocks/contracts/MockFinalityModule.sol';

import {IMockDisputeModule, MockDisputeModule} from '../mocks/contracts/MockDisputeModule.sol';

import {IMockFinalityModule, MockFinalityModule} from '../mocks/contracts/MockFinalityModule.sol';
import {IMockRequestModule, MockRequestModule} from '../mocks/contracts/MockRequestModule.sol';
import {IMockResolutionModule, MockResolutionModule} from '../mocks/contracts/MockResolutionModule.sol';
import {IMockResponseModule, MockResponseModule} from '../mocks/contracts/MockResponseModule.sol';

import {Helpers} from '../utils/Helpers.sol';
import {IWETH9} from '../utils/external/IWETH9.sol';
import {IERC20} from '../utils/external/IERC20.sol';

import {TestConstants} from '../utils/TestConstants.sol';
import {IERC20} from '../utils/external/IERC20.sol';
import {IWETH9} from '../utils/external/IWETH9.sol';
// solhint-enable no-unused-import

contract IntegrationBase is TestConstants, Helpers {
Expand Down
2 changes: 1 addition & 1 deletion solidity/test/mocks/interfaces/IMockResponseModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pragma solidity ^0.8.19;

import {IERC20} from '../../utils/external/IERC20.sol';

import {IMockAccounting} from './IMockAccounting.sol';
import {IResponseModule} from '../../../interfaces/modules/response/IResponseModule.sol';
import {IMockAccounting} from './IMockAccounting.sol';

interface IMockResponseModule is IResponseModule {
struct RequestParameters {
Expand Down
9 changes: 5 additions & 4 deletions solidity/test/unit/Oracle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ pragma solidity ^0.8.19;

import 'forge-std/Test.sol';

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

import {IRequestModule} from '../../interfaces/modules/request/IRequestModule.sol';
import {IResponseModule} from '../../interfaces/modules/response/IResponseModule.sol';
import {IDisputeModule} from '../../interfaces/modules/dispute/IDisputeModule.sol';
import {IResolutionModule} from '../../interfaces/modules/resolution/IResolutionModule.sol';

import {IFinalityModule} from '../../interfaces/modules/finality/IFinalityModule.sol';
import {IRequestModule} from '../../interfaces/modules/request/IRequestModule.sol';
import {IResolutionModule} from '../../interfaces/modules/resolution/IResolutionModule.sol';
import {IResponseModule} from '../../interfaces/modules/response/IResponseModule.sol';

import {Oracle} from '../../contracts/Oracle.sol';
import {Helpers} from '../utils/Helpers.sol';
Expand Down
2 changes: 1 addition & 1 deletion solidity/test/unit/modules/Module.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.19;

import 'forge-std/Test.sol';

import {Module, IModule} from '../../../contracts/Module.sol';
import {IModule, Module} from '../../../contracts/Module.sol';
import {IOracle} from '../../../interfaces/IOracle.sol';
import {Helpers} from '../../utils/Helpers.sol';

Expand Down
3 changes: 1 addition & 2 deletions solidity/test/utils/Helpers.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

// import {DSTestPlus} from '@defi-wonderland/solidity-utils/solidity/test/DSTestPlus.sol';
import {Test} from 'forge-std/Test.sol';
import {IOracle} from '../../contracts/Oracle.sol';
import {Test} from 'forge-std/Test.sol';

contract Helpers is Test {
// 100% random sequence of bytes representing request, response, or dispute id
Expand Down

0 comments on commit 6ac0f50

Please sign in to comment.