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

Method build_engine_api

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected