nesdie/mock/
receipt.rs

1#![allow(missing_docs)]
2
3use crate::{Balance, Gas};
4
5type PublicKey = Vec<u8>;
6type AccountId = String;
7
8#[derive(Clone, Debug)]
9pub struct Receipt {
10    pub receipt_indices: Vec<u64>,
11    pub receiver_id: String,
12    pub actions: Vec<VmAction>,
13}
14
15#[derive(Clone, Debug)]
16#[non_exhaustive]
17pub enum VmAction {
18    CreateAccount,
19    DeployContract {
20        code: Vec<u8>,
21    },
22    FunctionCall {
23        method_name: String,
24        args: Vec<u8>,
25        gas: Gas,
26        deposit: Balance,
27    },
28    Transfer {
29        deposit: Balance,
30    },
31    Stake {
32        stake: Balance,
33        public_key: PublicKey,
34    },
35    AddKeyWithFullAccess {
36        public_key: PublicKey,
37        nonce: u64,
38    },
39    AddKeyWithFunctionCall {
40        public_key: PublicKey,
41        nonce: u64,
42        allowance: Option<Balance>,
43        receiver_id: AccountId,
44        method_names: Vec<String>,
45    },
46    DeleteKey {
47        public_key: PublicKey,
48    },
49    DeleteAccount {
50        beneficiary_id: AccountId,
51    },
52}