Nhảy đến nội dung chính

Receipt Structure

Definition

Receipt is an internal transaction in NEAR Protocol.

ReceiptView

pub struct ReceiptView {
pub predecessor_id: AccountId,
pub receiver_id: AccountId,
pub receipt_id: CryptoHash,

pub receipt: ReceiptEnumView,
}

ReceiptEnumView

pub enum ReceiptEnumView {
Action {
signer_id: AccountId,
signer_public_key: PublicKey,
#[serde(with = "u128_dec_format")]
gas_price: Balance,
output_data_receivers: Vec<DataReceiverView>,
input_data_ids: Vec<CryptoHash>,
actions: Vec<ActionView>,
},
Data {
data_id: CryptoHash,
#[serde(with = "option_base64_format")]
data: Option<Vec<u8>>,
},
}

ActionReceipt

ActionReceipts hold info about what actions to perform. In the cross-contract calls some actions might happen only when specific data is available, such data is in the DataReceipts.

DataReceipt

DataReceipts hold the data that is produced my Promise during the cross-contract calls.

Was this page helpful?