# Remix FHE Demo Local Deployment Tutorial-  Contracts Explanation\&Interaction

**Explanation of Key Components**

1\. CombinedContract.sol Overview:

• This file contains utility contracts, libraries, and a core Oracle contract that facilitates request handling, encryption, and decryption operations using CapsulatedValue.

• Ownable Contracts: Ownable and Ownable2Step contracts provide ownership control, ensuring that only the owner can execute certain functions.

• Types and Operations: The Types and Opcode libraries define custom types and supported operations for fully homomorphic encryption (FHE) computations.

2\. Example.sol Overview:

• Oracle Interaction: The Example contract interacts with the Oracle contract to perform secure computations. It uses the RequestBuilder library to create and send requests to the Oracle.

• Events: Various events, such as RequestSent, TargetUpdated, and DebugLog, are emitted to provide transparency in operations.

• Functions:

• createRandomTarget(): Generates a random target value using the Oracle.

• randomTargetCallback(): Handles the Oracle’s response and updates the target value.

• makeComputation(uint64 amount): Performs a computation on the target and an input amount, then sends a request to the Oracle.

• computationCallback(): Processes the result of the computation and updates the target.

**Interacting with the Contracts**

<figure><img src="https://4239479252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc6n88IVs810uKFVbVyUQ%2Fuploads%2FjgKvD0CHGamCEgMSX81d%2F%E6%88%AA%E5%B1%8F2024-11-15%20%E4%B8%8B%E5%8D%886.56.17.png?alt=media&#x26;token=be237078-707f-4231-afc8-d55b121c7aff" alt=""><figcaption></figcaption></figure>

1\. Generate a Random Target:

• After deploying Example.sol, use the createRandomTarget() function. This will generate a random target value using the Oracle.

• Check the Remix console for emitted events and debug logs.

2\. Perform a Computation:

• Call makeComputation(uint64 amount) with a specific amount to add to the target.

• The Oracle will process the computation, and the result will be available in the computationCallback().

3\. View Target Value:

• Use the getTarget() function to view the current target value.
