@@ -4,13 +4,13 @@ pragma solidity ^0.8.0;
44import { ERC20 } from "../../lib/ERC20.sol " ;
55import { Create2 } from "../../lib/Create2.sol " ;
66import { FxBaseRootTunnel } from "../../tunnel/FxBaseRootTunnel.sol " ;
7- import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol " ;
7+ import {SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol " ;
88
99/**
1010 * @title FxERC20RootTunnel
1111 */
1212contract FxERC20RootTunnel is FxBaseRootTunnel , Create2 {
13- using SafeERC20 for ERC20 ;
13+ using SafeERC20 for IERC20 ;
1414 // maybe DEPOSIT and MAP_TOKEN can be reduced to bytes4
1515 bytes32 public constant DEPOSIT = keccak256 ("DEPOSIT " );
1616 bytes32 public constant MAP_TOKEN = keccak256 ("MAP_TOKEN " );
@@ -59,7 +59,7 @@ contract FxERC20RootTunnel is FxBaseRootTunnel, Create2 {
5959 }
6060
6161 // transfer from depositor to this contract
62- ERC20 (rootToken).safeTransferFrom (
62+ IERC20 (rootToken).safeTransferFrom (
6363 msg .sender , // depositor
6464 address (this ), // manager contract
6565 amount
@@ -77,7 +77,7 @@ contract FxERC20RootTunnel is FxBaseRootTunnel, Create2 {
7777 require (rootToChildTokens[rootToken] == childToken, "FxERC20RootTunnel: INVALID_MAPPING_ON_EXIT " );
7878
7979 // transfer from tokens to
80- ERC20 (rootToken).safeTransfer (
80+ IERC20 (rootToken).safeTransfer (
8181 to,
8282 amount
8383 );
0 commit comments