1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use crate::types::BlueprintId;
use crate::ScryptoSbor;
use radix_engine_common::types::GlobalAddressReservation;
use radix_engine_common::types::NodeId;

#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor)]
pub struct OnVirtualizeInput {
    pub variant_id: u8,
    pub rid: [u8; NodeId::RID_LENGTH],
    pub address_reservation: GlobalAddressReservation,
}

pub type OnVirtualizeOutput = ();

#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor)]
pub struct OnDropInput {}

pub type OnDropOutput = ();

// TODO: expose generic information, but fully-detailed actor? and then remove `is_to_barrier`.
#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor)]
pub struct OnMoveInput {
    /// True if the node moves from caller to callee, otherwise false.
    pub is_moving_down: bool,

    /// True if the destination actor is a barrier, otherwise false.
    pub is_to_barrier: bool,

    /// The destination blueprint id.
    pub destination_blueprint_id: Option<BlueprintId>,
}

pub type OnMoveOutput = ();