RPC Engine Types
The op-alloy-rpc-types-engine
crate provides Optimism types for interfacing
with the Engine API in the OP Stack.
Optimism defines a custom payload attributes type called OpPayloadAttributes
.
OpPayloadAttributes
extends alloy's PayloadAttributes
with a few fields: transactions,
a flag for enabling the tx pool, the gas limit, and EIP 1559 parameters.
Optimism also returns a custom type for the engine_getPayload
request for both V3 and
V4 payload envelopes. These are the OpExecutionPayloadEnvelopeV3
and
OpExecutionPayloadEnvelopeV4
types, which both wrap payload envelope types
from alloy-rpc-types-engine
.