Cross Trade is a new core service for optimistic rollups that complements standard withdrawals and fast withdrawals. It is trustless and do not require extensive backend.
4
stars
1
forks
source link
[non-critical] remove `require(dealData[_saleCount].provider == address(0)` where modifier `providerCheck` is applied #42
Describe the bug You have repeated code that does the same thing.
Configuration
Impact wasting gas
Recommendation remove
require(dealData[_saleCount].provider == address(0)
where modifierproviderCheck
is appliedmodifier providerCheck https://github.com/tokamak-network/crossTrade/blob/fc11f6e37f93530a65924f8a89f3487fb2e68ea7/contracts/L2/L2CrossTrade.sol#L61-L64
Lines of Codes https://github.com/tokamak-network/crossTrade/blob/fc11f6e37f93530a65924f8a89f3487fb2e68ea7/contracts/L2/L2CrossTrade.sol#L201-L204 https://github.com/tokamak-network/crossTrade/blob/fc11f6e37f93530a65924f8a89f3487fb2e68ea7/contracts/L2/L2CrossTrade.sol#L244-L247
Exploit Scenario Demo