-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: contract call through account, impl: reward
- Loading branch information
Showing
7 changed files
with
91 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
use crate::errors::CompilerControllerError; | ||
use sharp_p2p_common::{job::Job, process::Process}; | ||
use sharp_p2p_common::process::Process; | ||
use std::path::PathBuf; | ||
|
||
/* | ||
The `CompilerController` trait is responsible for taking a user's program and preparing a `Job` object. | ||
This process involves compiling the user's code and creating a Cairo PIE (Proof-of-Inclusion-Execution) object from it. | ||
The resulting `Job` object encapsulates the necessary information for later execution by a `RunnerController`. | ||
The `run` method accepts the paths to the program and its input, returning a `Result` containing a `Process` object. | ||
Upon successful completion, it yields a `Job` object, ready to be utilized by a `RunnerController` to execute the program. | ||
The resulting `Vec<u8>` object that represents the Cairo PIE is then compressed and stored in the `JobData` object. | ||
Later, the `Job` object is then signed by the delegator's private key and sent to the network for execution. | ||
*/ | ||
|
||
pub trait CompilerController { | ||
fn run( | ||
&self, | ||
program_path: PathBuf, | ||
program_input_path: PathBuf, | ||
) -> Result<Process<Result<Job, CompilerControllerError>>, CompilerControllerError>; | ||
) -> Result<Process<Result<Vec<u8>, CompilerControllerError>>, CompilerControllerError>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters