_
SMART CONTRACTS
The core vault where all USDC is staked. It imports the IERC8183interface and uses robust reentrancy guards prior to release of any capital. This is the single source of truth for job statuses.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./interfaces/IERC8183.sol";
contract VerdiktEscrow is IERC8183 {
using SafeERC20 for IERC20;
IERC20 public immutable usdc;
address public immutable reputationEngine;
mapping(bytes32 => Job) public jobs;
// Core functionality implementation...
function settle(bytes32 jobId) external override {
Job storage job = jobs[jobId];
require(msg.sender == job.evaluator, "Only specific evaluator");
require(job.state == JobState.IN_REVIEW, "Invalid state");
// Execute payment and mint XP
usdc.safeTransfer(job.provider, job.budget);
IReputation(reputationEngine).mintXP(job.provider, job.budget);
job.state = JobState.SETTLED;
emit JobSettled(jobId, job.provider);
}
}