I encounter an error specifying contract "FlashLoanReceiver.sol" should be marked as abstract. Is that means I missed the constructor line?

Thank you for your kind help

pragma solidity ^0.6.0;

import "./IFlashLoanReceiver.sol";

contract FlashLoanReceiverBase is IFlashLoanReceiver {
    using SafeMath for uint256;

    address constant ETHADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    ILendingPoolAddressesProvider public addressesProvider;

    constructor(address _provider) internal {
        addressesProvider = ILendingPoolAddressesProvider(_provider);

    fallback() external payable {}

    function transferFundsBackToPoolInternal(address _reserve, uint256 _amount)
        address payable core = addressesProvider.getLendingPoolCore();
        transferInternal(core, _reserve, _amount);

    function transferInternal(
        address payable _destination,
        address _reserve,
        uint256 _amount
    ) internal {
        if (_reserve == ETHADDRESS) {

        IERC20(_reserve).transfer(_destination, _amount);

    function getBalanceInternal(address _target, address _reserve)
        returns (uint256)
        if (_reserve == ETHADDRESS) {
            return _target.balance;

        return IERC20(_reserve).balanceOf(_target);
  • You probably have interface methods that you forgot to implement. Commented Jun 13, 2021 at 7:47
  • I see, The warning says "This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function." Is this consider interface methods that I forgot to implement? Thank you for helping. Commented Jun 13, 2021 at 10:00
  • Possibly related stackoverflow.com/questions/59651032/… Commented Jun 13, 2021 at 11:12


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.