abstract contract WithFees is ERC721, HasSecondarySaleFees {
    // The address to pay fees to
    address payable internal beneficiary;

    // The fee basis points
    uint256 internal bps;

    /// Instanciate the contract
    /// @param _beneficiary the address to send fees to
    /// @param _bps the basis points measure for the fees
    constructor (address payable _beneficiary, uint256 _bps) {
        beneficiary = _beneficiary;
        bps = _bps;
    }

    /// Implement the `HasSecondarySalesFees` Contract
    /// @dev implements the standard pushed by Rarible
    /// @return list of fee recipients, in our case always one
    function getFeeRecipients(uint256) public view override returns (address payable[] memory) {
        address payable[] memory recipients = new address payable[](1);
        recipients[0] = beneficiary;
        return recipients;
    }

    /// Implement the `HasSecondarySalesFees` Contract
    /// @dev implements the standard pushed by Rarible
    /// @return list of fee basis points, in our case always one
    function getFeeBps(uint256) public view override returns (uint256[] memory) {
        uint256[] memory bpsArray = new uint256[](1);
        bpsArray[0] = bps;
        return bpsArray;
    }

    /// Make sure the contract reports that it supportsthe `HasSecondarySalesFees` Interface
    /// @param interfaceId the interface to check
    /// @dev extends the ERC721 method
    /// @return whether the given interface is supported
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC165) returns (bool) {
        return interfaceId == type(HasSecondarySaleFees).interfaceId
            || ERC721.supportsInterface(interfaceId);
    }
}
/// @author 1001.digital
/// @title Implements the various fee standards that are floating around.
/// @dev We need a proper standard for this.
function getFeeBps(uint256) public view override returns (uint256[] memory) {
    uint256[] memory bpsArray = new uint256[](1);
    bpsArray[0] = bps;
    return bpsArray;
}

/// Implement the `HasSecondarySalesFees` Contract
/// @dev implements the standard pushed by Rarible
/// @return list of fee basis points, in our case always one