Nhảy tới nội dung

StateChange Structure

Definition

This entity from nearcore describes how account's state has changed and the reason

StateChangeWithCauseView

pub struct StateChangeWithCauseView {
pub cause: StateChangeCauseView,
#[serde(flatten)]
pub value: StateChangeValueView,
}

pub enum StateChangeCauseView {
NotWritableToDisk,
InitialState,
TransactionProcessing { tx_hash: CryptoHash },
ActionReceiptProcessingStarted { receipt_hash: CryptoHash },
ActionReceiptGasReward { receipt_hash: CryptoHash },
ReceiptProcessing { receipt_hash: CryptoHash },
PostponedReceipt { receipt_hash: CryptoHash },
UpdatedDelayedReceipts,
ValidatorAccountsUpdate,
Migration,
Resharding,
}

pub enum StateChangeValueView {
AccountUpdate {
account_id: AccountId,
#[serde(flatten)]
account: AccountView,
},
AccountDeletion {
account_id: AccountId,
},
AccessKeyUpdate {
account_id: AccountId,
public_key: PublicKey,
access_key: AccessKeyView,
},
AccessKeyDeletion {
account_id: AccountId,
public_key: PublicKey,
},
DataUpdate {
account_id: AccountId,
#[serde(rename = "key_base64", with = "base64_format")]
key: StoreKey,
#[serde(rename = "value_base64", with = "base64_format")]
value: StoreValue,
},
DataDeletion {
account_id: AccountId,
#[serde(rename = "key_base64", with = "base64_format")]
key: StoreKey,
},
ContractCodeUpdate {
account_id: AccountId,
#[serde(rename = "code_base64", with = "base64_format")]
code: Vec<u8>,
},
ContractCodeDeletion {
account_id: AccountId,
},
}
Was this page helpful?