Module dao::rules::validation::bid_escrow
source · Expand description
Groups Bid Escrow-related validations.
Structs§
- Verifies if the user can be onboarded. May return Error::VaOnboardedAlready.
- Verifies if the
Bid
can be canceled. May return Error::CannotCancelBidOnCompletedJobOffer or Error::CannotCancelBidBeforeAcceptanceTimeout. - Makes sure the job poster is the one who picks the
Bid
. May return Error::OnlyJobPosterCanPickABid. - Verifies if the worker can place a
Bid
in the given state. May return Error::AuctionNotRunning, Error::OnlyOnboardedWorkerCanBid or Error::OnboardedWorkerCannotBid. - Verifies if the worker attempts to bid on his own
Job
. May return Error::CannotBidOnOwnJob, - Verifies if the
Job Offer
can be canceled in the given state. May return Error::JobOfferCannotBeYetCanceled. - Makes sure the job poster is the one who picks the
Bid
. May return Error::OnlyJobPosterCanPickABid. - Makes sure the job poster is the one who progresses the
Job
. May return Error::OnlyJobPosterCanModifyJobOffer. - Verifies if the proposed payment does not exceeds the budget. May return Error::PaymentExceedsMaxBudget.
- Verifies if the actual payment matches the proposed payment. May return Error::PurseBalanceMismatch.
- Verifies if exists conflicting ongoing voting. May return Error::VotingNotCompleted.
- Makes sure the bidder is the one who cancels the
Bid
. May return Error::CannotCancelNotOwnedBid. - Makes sure the job poster is the one who picks the
Job Offer
. May return Error::OnlyJobPosterCanPickABid. - Verifies if the worker’s stake is correct. May return Error::NotOnboardedWorkerMustStakeCSPR, Error::ZeroStake, Error::OnboardedWorkerCannotStakeCSPR, Error::CannotStakeBothCSPRAndReputation, or Error::AttachedValueMismatch.
- Makes sure the
Job DOS Fee
is high enough. May return Error::DosFeeTooLow. - Makes sure the
Job
is in grace period state. May return Error::CannotSubmitJobProof or Error::GracePeriodNotStarted. - Verifies if the user is not onboarded. May return Error::VaOnboardedAlready.
- Makes sure the stake is non-zero. May return Error::ZeroStake.