@@ -4,11 +4,17 @@ pragma solidity ^0.7.6;
4
4
pragma abicoder v2;
5
5
6
6
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol " ;
7
- import "@openzeppelin/contracts/utils/Address .sol " ;
8
- import "@openzeppelin/contracts/math/SafeMath .sol " ;
7
+ import { AddressUpgradeable } from "@openzeppelin/contracts-upgradeable /utils/AddressUpgradeable .sol " ;
8
+ import { SafeMathUpgradeable } from "@openzeppelin/contracts-upgradeable /math/SafeMathUpgradeable .sol " ;
9
9
10
- import "../arbitrum/L1ArbitrumMessenger.sol " ;
11
- import "./GraphTokenGateway.sol " ;
10
+ import { L1ArbitrumMessenger } from "../arbitrum/L1ArbitrumMessenger.sol " ;
11
+ import { IBridge } from "../arbitrum/IBridge.sol " ;
12
+ import { IInbox } from "../arbitrum/IInbox.sol " ;
13
+ import { IOutbox } from "../arbitrum/IOutbox.sol " ;
14
+ import { ITokenGateway } from "../arbitrum/ITokenGateway.sol " ;
15
+ import { Managed } from "../governance/Managed.sol " ;
16
+ import { GraphTokenGateway } from "./GraphTokenGateway.sol " ;
17
+ import { IGraphToken } from "../token/IGraphToken.sol " ;
12
18
13
19
/**
14
20
* @title L1 Graph Token Gateway Contract
@@ -20,7 +26,7 @@ import "./GraphTokenGateway.sol";
20
26
* and https://github.com/livepeer/arbitrum-lpt-bridge)
21
27
*/
22
28
contract L1GraphTokenGateway is Initializable , GraphTokenGateway , L1ArbitrumMessenger {
23
- using SafeMath for uint256 ;
29
+ using SafeMathUpgradeable for uint256 ;
24
30
25
31
/// Address of the Graph Token contract on L2
26
32
address public l2GRT;
@@ -112,8 +118,8 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
112
118
require (_inbox != address (0 ), "INVALID_INBOX " );
113
119
require (_l1Router != address (0 ), "INVALID_L1_ROUTER " );
114
120
require (! callhookAllowlist[_l1Router], "ROUTER_CANT_BE_ALLOWLISTED " );
115
- require (Address .isContract (_inbox), "INBOX_MUST_BE_CONTRACT " );
116
- require (Address .isContract (_l1Router), "ROUTER_MUST_BE_CONTRACT " );
121
+ require (AddressUpgradeable .isContract (_inbox), "INBOX_MUST_BE_CONTRACT " );
122
+ require (AddressUpgradeable .isContract (_l1Router), "ROUTER_MUST_BE_CONTRACT " );
117
123
inbox = _inbox;
118
124
l1Router = _l1Router;
119
125
emit ArbitrumAddressesSet (_inbox, _l1Router);
@@ -145,7 +151,7 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
145
151
*/
146
152
function setEscrowAddress (address _escrow ) external onlyGovernor {
147
153
require (_escrow != address (0 ), "INVALID_ESCROW " );
148
- require (Address .isContract (_escrow), "MUST_BE_CONTRACT " );
154
+ require (AddressUpgradeable .isContract (_escrow), "MUST_BE_CONTRACT " );
149
155
escrow = _escrow;
150
156
emit EscrowAddressSet (_escrow);
151
157
}
@@ -158,7 +164,7 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
158
164
function addToCallhookAllowlist (address _newAllowlisted ) external onlyGovernor {
159
165
require (_newAllowlisted != address (0 ), "INVALID_ADDRESS " );
160
166
require (_newAllowlisted != l1Router, "CANT_ALLOW_ROUTER " );
161
- require (Address .isContract (_newAllowlisted), "MUST_BE_CONTRACT " );
167
+ require (AddressUpgradeable .isContract (_newAllowlisted), "MUST_BE_CONTRACT " );
162
168
require (! callhookAllowlist[_newAllowlisted], "ALREADY_ALLOWLISTED " );
163
169
callhookAllowlist[_newAllowlisted] = true ;
164
170
emit AddedToCallhookAllowlist (_newAllowlisted);
0 commit comments