Addressed unchecked return value in AllowanceCrowdsale #945 using SafeERC20 (#946)

* addressed unchecked return value in AllowanceCrowdsale #945 using SafeERC20
pull/973/head^2
Doug Crescenzi 7 years ago committed by Matt Condon
parent 7a61371b19
commit 39385f9f4e
  1. 7
      contracts/crowdsale/emission/AllowanceCrowdsale.sol

@ -2,15 +2,16 @@ pragma solidity ^0.4.23;
import "../Crowdsale.sol"; import "../Crowdsale.sol";
import "../../token/ERC20/ERC20.sol"; import "../../token/ERC20/ERC20.sol";
import "../../token/ERC20/ERC20Basic.sol";
import "../../token/ERC20/SafeERC20.sol";
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
/** /**
* @title AllowanceCrowdsale * @title AllowanceCrowdsale
* @dev Extension of Crowdsale where tokens are held by a wallet, which approves an allowance to the crowdsale. * @dev Extension of Crowdsale where tokens are held by a wallet, which approves an allowance to the crowdsale.
*/ */
contract AllowanceCrowdsale is Crowdsale { contract AllowanceCrowdsale is Crowdsale {
using SafeMath for uint256; using SafeMath for uint256;
using SafeERC20 for ERC20;
address public tokenWallet; address public tokenWallet;
@ -42,6 +43,6 @@ contract AllowanceCrowdsale is Crowdsale {
) )
internal internal
{ {
token.transferFrom(tokenWallet, _beneficiary, _tokenAmount); token.safeTransferFrom(tokenWallet, _beneficiary, _tokenAmount);
} }
} }

Loading…
Cancel
Save