đContract
SightOracle
contract is the core component of the Sight Oracle system, enabling users to delegate computations over encrypted data using Fully Homomorphic Encryption (FHE) technology. The contract operates on the Ethereum Virtual Machine (EVM) and facilitates secure and efficient encrypted computations.
Key Features
Request Management:
The contract manages requests for computations using in-contract mappings.
Users can send computation requests to the contract, which are then stored and emitted via events.
Callback Handling:
After the computations are completed by the off-chain Oracle Service Nodes, the results are sent back to the contract using callback functions.
The contract ensures the correct execution of callbacks by verifying ownership and proper function signatures.
Libraries and Types
Opcode Library
The Opcode
library defines constants for various operations that can be performed on encrypted data. These operations include arithmetic, bitwise, and comparison operations.
RequestBuilder Library
The RequestBuilder
library is used to create computation requests. It defines the structure and methods for building requests, by defining various operations as op_codes and managing their execution.
ResponseResolver Library
The ResponseResolver
library is used to decode the results of computations performed on encrypted data. It provides methods to interpret the results as encrypted / plaintext data types such as bool
, uint64
, ebool
, and euint64
.
Last updated