pub struct DomainState {
pub domain_registry_key: Pubkey,
pub sponsors: NonEmpty<Arc<Keypair>>,
pub next_autoassigned_sponsor_index: Arc<AtomicUsize>,
pub enable_preflight_simulation: bool,
pub tx_variations: HashMap<String, ParsedTransactionVariation>,
}Fields§
§domain_registry_key: Pubkey§sponsors: NonEmpty<Arc<Keypair>>§next_autoassigned_sponsor_index: Arc<AtomicUsize>§enable_preflight_simulation: bool§tx_variations: HashMap<String, ParsedTransactionVariation>Implementations§
Source§impl DomainState
impl DomainState
Sourcepub async fn validate_transaction(
&self,
transaction: &TransactionToValidate<'_>,
chain_index: &ChainIndex,
sponsor: &Pubkey,
variation_name: Option<String>,
) -> Result<&ParsedTransactionVariation, (StatusCode, String)>
pub async fn validate_transaction( &self, transaction: &TransactionToValidate<'_>, chain_index: &ChainIndex, sponsor: &Pubkey, variation_name: Option<String>, ) -> Result<&ParsedTransactionVariation, (StatusCode, String)>
Checks that the transaction meets at least one of the specified variations for this domain. If so, returns the variation this transaction matched against. Otherwise, returns an error with a message indicating why the transaction is invalid.
pub async fn validate_transaction_against_variation( &self, transaction: &TransactionToValidate<'_>, tx_variation: &ParsedTransactionVariation, chain_index: &ChainIndex, sponsor: &Pubkey, ) -> Result<(), (StatusCode, String)>
Auto Trait Implementations§
impl Forget for DomainState
impl Freeze for DomainState
impl RefUnwindSafe for DomainState
impl Send for DomainState
impl Sync for DomainState
impl Unpin for DomainState
impl UnsafeUnpin for DomainState
impl UnwindSafe for DomainState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more