pub trait StateTransitionActionTransformer {
// Required method
fn transform_into_action<C: CoreRPCLike>(
&self,
platform: &PlatformRef<'_, C>,
block_info: &BlockInfo,
remaining_address_input_balances: &Option<BTreeMap<PlatformAddress, (AddressNonce, Credits)>>,
validation_mode: ValidationMode,
execution_context: &mut StateTransitionExecutionContext,
tx: TransactionArg<'_, '_>,
) -> Result<ConsensusValidationResult<StateTransitionAction>, Error>;
}Expand description
A trait for validating state transitions within a blockchain.
Required Methods§
Sourcefn transform_into_action<C: CoreRPCLike>(
&self,
platform: &PlatformRef<'_, C>,
block_info: &BlockInfo,
remaining_address_input_balances: &Option<BTreeMap<PlatformAddress, (AddressNonce, Credits)>>,
validation_mode: ValidationMode,
execution_context: &mut StateTransitionExecutionContext,
tx: TransactionArg<'_, '_>,
) -> Result<ConsensusValidationResult<StateTransitionAction>, Error>
fn transform_into_action<C: CoreRPCLike>( &self, platform: &PlatformRef<'_, C>, block_info: &BlockInfo, remaining_address_input_balances: &Option<BTreeMap<PlatformAddress, (AddressNonce, Credits)>>, validation_mode: ValidationMode, execution_context: &mut StateTransitionExecutionContext, tx: TransactionArg<'_, '_>, ) -> Result<ConsensusValidationResult<StateTransitionAction>, Error>
A trait for transforming a raw TransactionArg into a typed StateTransitionAction.
This is primarily intended for testing, internal tooling, and controlled validation flows.
In production, the transformation is normally performed within validate_state, and this
method should not be invoked directly.
§Versioning Note
This trait is intentionally not versioned.
If the structure of transform_into_action ever needs to change, a new trait should be
introduced rather than modifying this one to preserve API stability.
§Type Parameters
C– A type implementing theCoreRPCLiketrait.
§Arguments
platform– A platform reference implementingCoreRPCLike.block_info– Information about the current block.remaining_address_input_balances– A map of input addresses to their (nonce, balance) tuples used during partial validation.validation_mode– The current validation mode controlling the strictness of checks.execution_context– The execution context for the state transition.tx– The raw transaction argument to be transformed.
§Returns
A Result containing:
ConsensusValidationResult<StateTransitionAction>on success, orErrorif the action could not be created or validated.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.