@@ -4,11 +4,17 @@ pragma solidity ^0.7.6;
44pragma abicoder v2;
55
66import { 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 " ;
99
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 " ;
1218
1319/**
1420 * @title L1 Graph Token Gateway Contract
@@ -20,7 +26,7 @@ import "./GraphTokenGateway.sol";
2026 * and https://github.com/livepeer/arbitrum-lpt-bridge)
2127 */
2228contract L1GraphTokenGateway is Initializable , GraphTokenGateway , L1ArbitrumMessenger {
23- using SafeMath for uint256 ;
29+ using SafeMathUpgradeable for uint256 ;
2430
2531 /// Address of the Graph Token contract on L2
2632 address public l2GRT;
@@ -112,8 +118,8 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
112118 require (_inbox != address (0 ), "INVALID_INBOX " );
113119 require (_l1Router != address (0 ), "INVALID_L1_ROUTER " );
114120 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 " );
117123 inbox = _inbox;
118124 l1Router = _l1Router;
119125 emit ArbitrumAddressesSet (_inbox, _l1Router);
@@ -145,7 +151,7 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
145151 */
146152 function setEscrowAddress (address _escrow ) external onlyGovernor {
147153 require (_escrow != address (0 ), "INVALID_ESCROW " );
148- require (Address .isContract (_escrow), "MUST_BE_CONTRACT " );
154+ require (AddressUpgradeable .isContract (_escrow), "MUST_BE_CONTRACT " );
149155 escrow = _escrow;
150156 emit EscrowAddressSet (_escrow);
151157 }
@@ -158,7 +164,7 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
158164 function addToCallhookAllowlist (address _newAllowlisted ) external onlyGovernor {
159165 require (_newAllowlisted != address (0 ), "INVALID_ADDRESS " );
160166 require (_newAllowlisted != l1Router, "CANT_ALLOW_ROUTER " );
161- require (Address .isContract (_newAllowlisted), "MUST_BE_CONTRACT " );
167+ require (AddressUpgradeable .isContract (_newAllowlisted), "MUST_BE_CONTRACT " );
162168 require (! callhookAllowlist[_newAllowlisted], "ALREADY_ALLOWLISTED " );
163169 callhookAllowlist[_newAllowlisted] = true ;
164170 emit AddedToCallhookAllowlist (_newAllowlisted);
0 commit comments