DoS vulnerability in EntityTrading::buyNFT and EntityForging::forgeWithListed functions because a contract that listed nft for sale or for forging might not accept ETH transfer
Audit: 2024-07-traitforge-findings
Severity: MEDIUM

# Lines of code

https://github.com/code-423n4/2024-07-traitforge/blob/279b2887e3d38bc219a05d332cbcb0655b2dc644/contracts/EntityTrading/EntityTrading.sol#L76-L80
https://github.com/code-423n4/2024-07-traitforge/blob/279b2887e3d38bc219a05d332cbcb0655b2dc644/contracts/EntityForging/EntityForging.sol#L158-L159


# Vulnerability details

## Description
The issue arises when an NFT is listed for sale in `EntityTrading::listNFTForSale()` or listed for forging in `EntityForging::listForForging()` functions  by a contract that is unable to receive ETH, either due to lacking a `receive()` or `fallback()` function, or by intentionally reverting ETH transfers. And then someone try to buy nft or forge with that listed nft  in `EntityTrading::buyNFT` function or `EntityForging::forgeWithListed` lead to these function pay a owner of that listed nft which is a contract address that is unable to receive ETH and then lead to Dos.

## Impact:

1. **Blocked Purchases and forging**: Any attempt to purchase an NFT listed by a non-receiving contract will invariably fail. This renders affected NFTs impossible to buy, despite being listed for sale.

2. **Frozen Listings and Potential for Malicious Exploitation**: Since the purchase transaction reverts, the listing cannot be removed through the normal purchase process. This results in permanent, unfulfillable listings cluttering the marketplace. And a malicious actor could intentionally list multiple NFTs using contracts designed to reject ETH, effectively spamming the marketplace with unbuyable items.

3. **Secondary Function Disruption**: Functions that iterate over or process all listings (e.g., for displaying available NFTs) may experience increased gas costs or potential failures due to the presence of these unmovable listings.

4. **User Experience Degradation and Trust Issue**: Legitimate users attempting to purchase these NFTs will face failed transactions, potentially leading to confusion and loss of gas fees. And Repeated failed purchases could erode user trust in the platform, especially if users are unaware of the underlying cause.


## Proof of Concept
PoC for `EntityTrading::buyNFT` only, `EntityForging::forgeWithListed` can be achieved  similarly.
```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {Test, console} from "forge-std/Test.sol";
import {EntityTrading} from "../src/contracts/EntityTrading/EntityTrading.sol";
import {EntityForging} from "../src/contracts/EntityForging/EntityForging.sol";
import {DevFund} from "../src/contracts/DevFund/DevFund.sol";
import {NukeFund} from "../src/contracts/NukeFund/NukeFund.sol";
import {TraitForgeNft} from "../src/contracts/TraitForgeNft/TraitForgeNft.sol";
import {EntityTrading} from "../src/contracts/EntityTrading/EntityTrading.sol";
import {EntropyGenerator} from "../src/contracts/EntropyGenerator/EntropyGenerator.sol";
import {Airdrop} from "../src/contracts/Airdrop/Airdrop.sol";



contract EntityForgingTest is Test {
    EntityForgi