Due to lack of code to set the state of the State.Created to the s_state in the Escrow#constructor(), the following three functions would always be reverted.
Escrow#confirmReceipt()
Escrow#initiateDispute()
Escrow#resolveDispute()
EscrowFactory#newEscrow(), new Escrow contract would be created like this:
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L40-L47
Within the Escrow#constructor(), each input value would be validated and stored into the each state variables like this:
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L32-L51
Within the Escrow contract, the inState() modifier would be defined to check whether or not the current state is a proper state to call a target function like this:
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L82-L87
Within the following three functions, whether or not the current state is the State.Created would be checked via the inState() modifier like this:
Escrow#confirmReceipt()
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L94
Escrow#initiateDispute()
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L102
Escrow#resolveDispute()
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L109
When the Escrow#constructor() would be called (which means that a new Escrow is created), the state of the State.Created is supposed to be set to the s_state.
However, within the Escrow#constructor(), there is no code to set the State.Created to the s_state. This means that the state of the State.Created will never be set to the s_state.
Due to that, these three functions above would always be reverted.
Due to lack of code to set the state of the State.Created to the s_state in the Escrow#constructor(), the following three functions would always be reverted.
Escrow#confirmReceipt()
Escrow#initiateDispute()
Escrow#resolveDispute()
Manual review
Within the Escrow#constructor(), consider adding the code in order to set the State.Created to the s_state like this:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.