Struct snapps_txn_reference_impl::account::SnappAccount [−][src]
pub struct SnappAccount<'a> {
pub app_state: [Fp; 8],
pub verification_key: Option<VerificationKey>,
pub snapp_protocol_version: u32,
pub sequence_state: SequenceState,
pub proved_state: bool,
pub uri: &'a str,
pub token_symbol: &'a str,
}
Expand description
Account information for use by snapp smart contracts.
Fields
app_state: [Fp; 8]
General purpose storage for use by the snapp associated with this account.
verification_key: Option<VerificationKey>
Verification key for the snapp associated with this account, or None
if this account has
no associated snapp.
snapp_protocol_version: u32
Snapp protocol version
sequence_state: SequenceState
History of sequenced event updates for the most recent 5 slots with updates
proved_state: bool
true
if the current app_state
was initialized by a transaction authorized using a proof,
and every subsequent update was also authorized by a transaction using a proof; false
otherwise.
Snapp authors may use this field to validate that their snapp was initialized honestly and correctly before being used.
uri: &'a str
URI to access the code and other resources for this account’s snapp smart contract
token_symbol: &'a str
The symbol for the token managed by this account. This string has a maximum length of 6 characters.
Implementations
The ‘empty’ snapp account state.
The snapp
field of an account is equivalent to this value if and only if it is set to
None
.
empty() =
SnappAccount {
app_state: [Fp::zero(); 8],
verification_key: None,
snapp_protocol_version: 0,
sequence_state: SequenceState::empty(),
proved_state: false,
uri: "",
token_symbol: "",
}
Returns true if the argument is identical to SnappAccount::empty
, false otherwise.