Skip to content

Commit

Permalink
Fixed FXERC20 safe transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
reddyismav committed Jul 19, 2021
1 parent e61b6ae commit 20c2b1f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { Create2 } from "../../lib/Create2.sol";
import { SafeMath } from "../../lib/SafeMath.sol";
import { FxERC20 } from "../../tokens/FxERC20.sol";
import { FxBaseRootTunnel } from "../../tunnel/FxBaseRootTunnel.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {SafeERC20,IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";


/**
* @title FxMintableERC20RootTunnel
*/
contract FxMintableERC20RootTunnel is FxBaseRootTunnel, Create2 {
using SafeMath for uint256;
using SafeERC20 for FxERC20;
using SafeERC20 for IERC20;

// maybe DEPOSIT and MAP_TOKEN can be reduced to bytes4
bytes32 public constant DEPOSIT = keccak256("DEPOSIT");
Expand All @@ -33,7 +33,7 @@ contract FxMintableERC20RootTunnel is FxBaseRootTunnel, Create2 {
require(rootToChildTokens[rootToken] != address(0x0), "FxMintableERC20RootTunnel: NO_MAPPING_FOUND");

// transfer from depositor to this contract
FxERC20(rootToken).safeTransferFrom(
IERC20(rootToken).safeTransferFrom(
msg.sender, // depositor
address(this), // manager contract
amount
Expand Down Expand Up @@ -71,7 +71,7 @@ contract FxMintableERC20RootTunnel is FxBaseRootTunnel, Create2 {
tokenObj.approve(address(this), amount);

// transfer from tokens
tokenObj.safeTransferFrom(
IERC20(rootToken).safeTransferFrom(
address(this),
to,
amount
Expand Down

0 comments on commit 20c2b1f

Please sign in to comment.