radix_engine/blueprints/account/
events.rs

1use crate::internal_prelude::*;
2use radix_common::math::Decimal;
3use radix_common::{ScryptoEvent, ScryptoSbor};
4use radix_engine_interface::blueprints::account::*;
5use sbor::rust::prelude::*;
6
7#[derive(ScryptoSbor, ScryptoEvent, Debug, PartialEq, Eq)]
8pub enum WithdrawEvent {
9    Fungible(ResourceAddress, Decimal),
10    NonFungible(ResourceAddress, IndexSet<NonFungibleLocalId>),
11}
12
13#[derive(ScryptoSbor, ScryptoEvent, Debug, PartialEq, Eq)]
14pub enum DepositEvent {
15    Fungible(ResourceAddress, Decimal),
16    NonFungible(ResourceAddress, IndexSet<NonFungibleLocalId>),
17}
18
19#[derive(ScryptoSbor, ScryptoEvent, Debug, PartialEq, Eq)]
20pub enum RejectedDepositEvent {
21    Fungible(ResourceAddress, Decimal),
22    NonFungible(ResourceAddress, IndexSet<NonFungibleLocalId>),
23}
24
25#[derive(ScryptoSbor, ScryptoEvent, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
26pub struct SetResourcePreferenceEvent {
27    pub resource_address: ResourceAddress,
28    pub preference: ResourcePreference,
29}
30
31#[derive(ScryptoSbor, ScryptoEvent, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
32pub struct RemoveResourcePreferenceEvent {
33    pub resource_address: ResourceAddress,
34}
35
36#[derive(ScryptoSbor, ScryptoEvent, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
37pub struct SetDefaultDepositRuleEvent {
38    pub default_deposit_rule: DefaultDepositRule,
39}
40
41#[derive(ScryptoSbor, ScryptoEvent, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
42pub struct AddAuthorizedDepositorEvent {
43    pub authorized_depositor_badge: ResourceOrNonFungible,
44}
45
46#[derive(ScryptoSbor, ScryptoEvent, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
47pub struct RemoveAuthorizedDepositorEvent {
48    pub authorized_depositor_badge: ResourceOrNonFungible,
49}