MCPcopy Create free account
hub / github.com/base/base / build_engine_api

Method build_engine_api

crates/execution/node/src/rpc.rs:133–158  ·  view source on GitHub ↗
(self, ctx: &AddOnsContext<'_, N>)

Source from the content-addressed store, hash-verified

131 >;
132
133 async fn build_engine_api(self, ctx: &AddOnsContext<'_, N>) -> eyre::Result<Self::EngineApi> {
134 let Self { engine_validator_builder } = self;
135
136 let engine_validator = engine_validator_builder.build(ctx).await?;
137 let client = ClientVersionV1 {
138 code: CLIENT_CODE,
139 name: CLIENT_NAME.to_string(),
140 version: version_metadata().cargo_pkg_version.to_string(),
141 commit: version_metadata().vergen_git_sha.to_string(),
142 };
143 let inner = EngineApi::new(
144 ctx.node.provider().clone(),
145 Arc::clone(&ctx.config.chain),
146 ctx.beacon_engine_handle.clone(),
147 PayloadStore::new(ctx.node.payload_builder_handle().clone()),
148 ctx.node.pool().clone(),
149 ctx.node.task_executor().clone(),
150 client,
151 EngineCapabilities::new(ENGINE_CAPABILITIES.iter().copied()),
152 engine_validator,
153 ctx.config.engine.accept_execution_requests_hash,
154 ctx.node.network().clone(),
155 );
156
157 Ok(BaseEngineApi::new(inner))
158 }
159}

Callers

nothing calls this directly

Calls 7

newFunction · 0.50
buildMethod · 0.45
cloneMethod · 0.45
providerMethod · 0.45
poolMethod · 0.45
iterMethod · 0.45
networkMethod · 0.45

Tested by

no test coverage detected