diff --git a/contracts/examples/mintable-erc20-transfer/FxMintableERC20RootTunnel.sol b/contracts/examples/mintable-erc20-transfer/FxMintableERC20RootTunnel.sol index 8bf249f..a3a0444 100644 --- a/contracts/examples/mintable-erc20-transfer/FxMintableERC20RootTunnel.sol +++ b/contracts/examples/mintable-erc20-transfer/FxMintableERC20RootTunnel.sol @@ -5,7 +5,7 @@ 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"; /** @@ -13,7 +13,7 @@ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol */ 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"); @@ -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 @@ -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