Skip to content

Commit eeb4bd0

Browse files
committed
fix: use explicit imports (C4 QA)
1 parent dfd0a24 commit eeb4bd0

File tree

9 files changed

+43
-38
lines changed

9 files changed

+43
-38
lines changed

contracts/curation/Curation.sol

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22

33
pragma solidity ^0.7.6;
44

5-
import "@openzeppelin/contracts/utils/Address.sol";
6-
import "@openzeppelin/contracts/math/SafeMath.sol";
7-
import "@openzeppelin/contracts/proxy/Clones.sol";
8-
9-
import "../bancor/BancorFormula.sol";
10-
import "../upgrades/GraphUpgradeable.sol";
11-
import "../utils/TokenUtils.sol";
12-
13-
import "./CurationStorage.sol";
14-
import "./ICuration.sol";
15-
import "./GraphCurationToken.sol";
5+
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
6+
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
7+
import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol";
8+
9+
import { BancorFormula } from "../bancor/BancorFormula.sol";
10+
import { GraphUpgradeable } from "../upgrades/GraphUpgradeable.sol";
11+
import { TokenUtils } from "../utils/TokenUtils.sol";
12+
import { IRewardsManager } from "../rewards/IRewardsManager.sol";
13+
import { Managed } from "../governance/Managed.sol";
14+
import { IGraphToken } from "../token/IGraphToken.sol";
15+
import { CurationV1Storage } from "./CurationStorage.sol";
16+
import { ICuration } from "./ICuration.sol";
17+
import { IGraphCurationToken } from "./IGraphCurationToken.sol";
18+
import { GraphCurationToken } from "./GraphCurationToken.sol";
1619

1720
/**
1821
* @title Curation contract

contracts/curation/CurationStorage.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
pragma solidity ^0.7.6;
44

5-
import "../governance/Managed.sol";
5+
import { ICuration } from "./ICuration.sol";
6+
import { IGraphCurationToken } from "./IGraphCurationToken.sol";
7+
import { Managed } from "../governance/Managed.sol";
68

79
abstract contract CurationV1Storage is Managed, ICuration {
810
// -- Pool --

contracts/gateway/BridgeEscrow.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ pragma solidity ^0.7.6;
44

55
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
66

7-
import "../upgrades/GraphUpgradeable.sol";
8-
import "../governance/Managed.sol";
9-
import "../token/IGraphToken.sol";
7+
import { GraphUpgradeable } from "../upgrades/GraphUpgradeable.sol";
8+
import { Managed } from "../governance/Managed.sol";
9+
import { IGraphToken } from "../token/IGraphToken.sol";
1010

1111
/**
1212
* @title Bridge Escrow

contracts/gateway/GraphTokenGateway.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
pragma solidity ^0.7.6;
44

5-
import "../upgrades/GraphUpgradeable.sol";
6-
import "../arbitrum/ITokenGateway.sol";
7-
import "../governance/Pausable.sol";
8-
import "../governance/Managed.sol";
5+
import { GraphUpgradeable } from "../upgrades/GraphUpgradeable.sol";
6+
import { ITokenGateway } from "../arbitrum/ITokenGateway.sol";
7+
import { Pausable } from "../governance/Pausable.sol";
8+
import { Managed } from "../governance/Managed.sol";
99

1010
/**
1111
* @title L1/L2 Graph Token Gateway

contracts/governance/Controller.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
pragma solidity ^0.7.6;
44

5-
import "./IController.sol";
6-
import "./IManaged.sol";
7-
import "./Governed.sol";
8-
import "./Pausable.sol";
5+
import { IController } from "./IController.sol";
6+
import { IManaged } from "./IManaged.sol";
7+
import { Governed } from "./Governed.sol";
8+
import { Pausable } from "./Pausable.sol";
99

1010
/**
1111
* @title Graph Controller contract

contracts/governance/Managed.sol

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
pragma solidity ^0.7.6;
44

5-
import "./IController.sol";
5+
import { IController } from "./IController.sol";
66

7-
import "../curation/ICuration.sol";
8-
import "../epochs/IEpochManager.sol";
9-
import "../rewards/IRewardsManager.sol";
10-
import "../staking/IStaking.sol";
11-
import "../token/IGraphToken.sol";
12-
import "../arbitrum/ITokenGateway.sol";
7+
import { ICuration } from "../curation/ICuration.sol";
8+
import { IEpochManager } from "../epochs/IEpochManager.sol";
9+
import { IRewardsManager } from "../rewards/IRewardsManager.sol";
10+
import { IStaking } from "../staking/IStaking.sol";
11+
import { IGraphToken } from "../token/IGraphToken.sol";
12+
import { ITokenGateway } from "../arbitrum/ITokenGateway.sol";
1313

14-
import "./IManaged.sol";
14+
import { IManaged } from "./IManaged.sol";
1515

1616
/**
1717
* @title Graph Managed contract

contracts/upgrades/GraphProxy.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
pragma solidity ^0.7.6;
44

5-
import "@openzeppelin/contracts/utils/Address.sol";
5+
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
66

7-
import "./GraphProxyStorage.sol";
7+
import { GraphProxyStorage } from "./GraphProxyStorage.sol";
88

9-
import "./IGraphProxy.sol";
9+
import { IGraphProxy } from "./IGraphProxy.sol";
1010

1111
/**
1212
* @title Graph Proxy

contracts/upgrades/GraphProxyAdmin.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
pragma solidity ^0.7.6;
44

5-
import "../governance/Governed.sol";
5+
import { Governed } from "../governance/Governed.sol";
66

7-
import "./IGraphProxy.sol";
8-
import "./GraphUpgradeable.sol";
7+
import { IGraphProxy } from "./IGraphProxy.sol";
8+
import { GraphUpgradeable } from "./GraphUpgradeable.sol";
99

1010
/**
1111
* @title GraphProxyAdmin

contracts/upgrades/GraphUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
pragma solidity ^0.7.6;
44

5-
import "./IGraphProxy.sol";
5+
import { IGraphProxy } from "./IGraphProxy.sol";
66

77
/**
88
* @title Graph Upgradeable

0 commit comments

Comments
 (0)