File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,15 @@ pragma solidity ^0.8.0;
33
44import "./SpokePool.sol " ;
55import "@openzeppelin/contracts/access/Ownable.sol " ;
6+ import "@openzeppelin/contracts/token/ERC20/IERC20.sol " ;
7+ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol " ;
68
79/**
810 * @notice Ethereum L1 specific SpokePool. Used on Ethereum L1 to facilitate L2->L1 transfers.
911 */
1012contract Ethereum_SpokePool is SpokePool , Ownable {
13+ using SafeERC20 for IERC20 ;
14+
1115 /**
1216 * @notice Construct the Ethereum SpokePool.
1317 * @param _hubPool Hub pool address to set. Can be changed by admin.
@@ -25,7 +29,7 @@ contract Ethereum_SpokePool is SpokePool, Ownable {
2529 **************************************/
2630
2731 function _bridgeTokensToHubPool (RelayerRefundLeaf memory relayerRefundLeaf ) internal override {
28- IERC20 (relayerRefundLeaf.l2TokenAddress).transfer (hubPool, relayerRefundLeaf.amountToReturn);
32+ IERC20 (relayerRefundLeaf.l2TokenAddress).safeTransfer (hubPool, relayerRefundLeaf.amountToReturn);
2933 }
3034
3135 // Admin is simply owner which should be same account that owns the HubPool deployed on this network. A core
You can’t perform that action at this time.
0 commit comments