Insrt-Finance / insrt-v2-contracts

0 stars 3 forks source link

Import Ordering #116

Open NouDaimon opened 1 year ago

NouDaimon commented 1 year ago

Imports are ordered differently from one file to another. It should be standardized across the contract suite.

NouDaimon commented 1 year ago

@CruzMolina

Should it be from nearest => furthest?

Would that imply that eg @solitdstate.... imports come last (right above contract declaration)?

CruzMolina commented 1 year ago

from absolute to nearest to furthest, alphabetically

Example:


import "@solidstate/contracts/SomeContract.sol";
import "@solidstate/interfaces/IERC20.sol";
import "forge-std/Test.sol";
import "forge-std/Vm.sol";

import "./SomeLocalContract.sol";
import "./VeryGoodContract.sol";
import "../interfaces/IExample.sol";
import "../interfaces/IOtherExample.sol";
import "../../mocks/MockExample.sol";