forked from DigiNodes/truthbounty-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIReputationOracle.sol
More file actions
34 lines (31 loc) · 1.35 KB
/
Copy pathIReputationOracle.sol
File metadata and controls
34 lines (31 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @title IReputationOracle
* @notice Interface for reputation score providers
* @dev This interface allows the TruthBounty system to accept reputation scores
* from external sources (oracles, adapters, or on-chain reputation systems)
*/
interface IReputationOracle {
/**
* @notice Get the reputation score for a given address
* @param user The address to query reputation for
* @return score The reputation score (scaled by 1e18 for precision)
* @dev Returns 0 if user has no reputation
* A score of 1e18 represents neutral/base reputation (100%)
* Scores can range from 0 to type(uint256).max
*/
function getReputationScore(address user) external view returns (uint256 score);
/**
* @notice Check if the oracle is active and providing valid data
* @return isActive True if the oracle is operational
*/
function isActive() external view returns (bool isActive);
/**
* @notice Get the timestamp of the last reputation update for a user
* @param user The address to query
* @return timestamp The Unix timestamp of the last update (0 if never updated)
* @dev This method is optional for oracle implementations
*/
function getLastReputationUpdate(address user) external view returns (uint256 timestamp);
}