Open sherlock-admin4 opened 1 month ago
anon339900
High
There are two structs called CreateListing, this can cause one to shadow the other.
struct CreateListing { address collection; uint[] tokenIds; Listing listing; }// IListings.sol struct CreateListing { address collection; uint[] tokenIds; ProtectedListing listing; } // IProtectedListings.sol
As we can see there are 2 structs both called CreateListing being imported both in the listings contract.
@> import {IListings} from '@flayer-interfaces/IListings.sol'; import {ILocker} from '@flayer-interfaces/ILocker.sol'; @> import {IProtectedListings} from '@flayer-interfaces/IProtectedListings.sol'; // Listings.sol
As the compiler imports both of them this can cause shadowing(not allowing one to run) or not compile at all. 1, 2
No response
This could render the function useless, get unexpected behavior or the compiler wont compile.
Change the name of one of the structs.
anon339900
High
The struct CreateListing exists two times which can cause shadowing and unexepcted behavior
Summary
There are two structs called CreateListing, this can cause one to shadow the other.
Root Cause
As we can see there are 2 structs both called CreateListing being imported both in the listings contract.
As the compiler imports both of them this can cause shadowing(not allowing one to run) or not compile at all. 1, 2
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
Impact
This could render the function useless, get unexpected behavior or the compiler wont compile.
PoC
No response
Mitigation
Change the name of one of the structs.