You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If derived conduit exists, as evidenced by comparing runtime code...if (conduit.codehash == _CONDUIT_RUNTIME_CODE_HASH) {
// Revert with an error indicating that the conduit already exists.revertConduitAlreadyExists(conduit);
}
// Deploy the conduit via CREATE2 using the conduit key as the salt.new Conduit{ salt: conduitKey }();
Optimize control flow in updateChannel to cut a MLOAD
with the respective changes to represent isOpen as 1 and !isOpen as 0
Pack multiple bool into a bytes32
Instead of using a bool[], multiple bool can be packed into the same memory slot in a bytes32. This would limit the maximum number of order to 255, but shouldn't be a problem practically.
Unnecessary codehash compare
If any code exists in the calculated conduit address, the CREATE2 will throws immediately.
Ref: ethereum/EIPs#684
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/conduit/ConduitController.sol#L84-L91
Optimize control flow in updateChannel to cut a MLOAD
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/conduit/ConduitController.sol#L141-L149
change to
Use _name() in _nameString()
e.g.
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/Seaport.sol#L52-L55
to
also in
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/ConsiderationBase.sol#L111
Use uint256 instead of bool in _channels mapping
Use uint256 or enum instead of bool will save gas
https://github.com/code-423n4/2022-05-opensea-seaport/blob/4140473b1f85d0df602548ad260b1739ddd734a5/contracts/conduit/Conduit.sol#L33-L34
to
with the respective changes to represent isOpen as 1 and !isOpen as 0
Pack multiple bool into a bytes32
Instead of using a bool[], multiple bool can be packed into the same memory slot in a bytes32. This would limit the maximum number of order to 255, but shouldn't be a problem practically.
The text was updated successfully, but these errors were encountered: