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
Provider condition is checked twice in `claimCT` and `cancelCT` #45
Describe the bug
The function claimCT and cancelCT uses modifier providerCheck to ensure that the order is not yet fulfilled. However, in the implementation, same condition is checked again which can result in loss of gas for users.
Describe the bug The function
claimCT
andcancelCT
uses modifierproviderCheck
to ensure that the order is not yet fulfilled. However, in the implementation, same condition is checked again which can result in loss of gas for users.providerCheck
modifier https://github.com/tokamak-network/crossTrade/blob/fc11f6e37f93530a65924f8a89f3487fb2e68ea7/contracts/L2/L2CrossTrade.sol#L61-L64claimCT
function https://github.com/tokamak-network/crossTrade/blob/fc11f6e37f93530a65924f8a89f3487fb2e68ea7/contracts/L2/L2CrossTrade.sol#L189-L204cancelCT
function https://github.com/tokamak-network/crossTrade/blob/fc11f6e37f93530a65924f8a89f3487fb2e68ea7/contracts/L2/L2CrossTrade.sol#L235-L247