-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from anton-rs/rf/fix/engine
- Loading branch information
Showing
12 changed files
with
88 additions
and
72 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//! A constructor wrapping the engine api client. | ||
|
||
use crate::EngineApi; | ||
use alloy_consensus::{Header, Sealed}; | ||
use alloy_rpc_types_engine::JwtSecret; | ||
use kona_driver::ExecutorConstructor; | ||
use url::Url; | ||
|
||
/// An executor constructor. | ||
#[derive(Clone, Debug)] | ||
pub struct HiloExecutorConstructor { | ||
/// The L2 engine API URL | ||
pub l2_engine_url: Url, | ||
/// Engine API JWT Secret. | ||
/// This is used to authenticate with the engine API | ||
pub jwt_secret: JwtSecret, | ||
} | ||
|
||
impl HiloExecutorConstructor { | ||
/// Creates a new executor constructor. | ||
pub const fn new_http(engine: Url, jwt: JwtSecret) -> Self { | ||
Self { l2_engine_url: engine, jwt_secret: jwt } | ||
} | ||
} | ||
|
||
impl ExecutorConstructor<EngineApi> for HiloExecutorConstructor { | ||
/// Constructs the executor. | ||
fn new_executor(&self, _: Sealed<Header>) -> EngineApi { | ||
EngineApi::new_http(self.l2_engine_url.clone(), self.jwt_secret) | ||
} | ||
} |
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