40,000 USDC
View results
Submission Details
Severity: low

[Low-01] Should Use More Recent Solidity Versions

For more Gas and Bug Optimization

Instances(4)

File: Escrow.sol
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L2
File: EscrowFactory.sol
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L2
And Both Interface files

[Low-2] newEscrow() Function mention returns (IEscrow)Where It Return Actually Escrow Type

function newEscrow(
uint256 price,
IERC20 tokenContract,
address seller,
address arbiter,
uint256 arbiterFee,
bytes32 salt
) external returns (IEscrow) {
address computedAddress = computeEscrowAddress(
type(Escrow).creationCode,
address(this),
uint256(salt),
price,
tokenContract,
msg.sender,
seller,
arbiter,
arbiterFee
);
tokenContract.safeTransferFrom(msg.sender, computedAddress, price);
Escrow escrow = new Escrow{salt: salt}(
price,
tokenContract,
msg.sender,
seller,
arbiter,
arbiterFee
);
if (address(escrow) != computedAddress) {
revert EscrowFactory__AddressesDiffer();
}
emit EscrowCreated(address(escrow), msg.sender, seller, arbiter);
return escrow;
}
File: EscrowFactory.sol
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L27
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L52

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.