radix_engine/blueprints/pool/v1/
events.rs1use crate::internal_prelude::*;
2
3pub mod one_resource_pool {
4 use super::*;
5
6 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
7 pub struct ContributionEvent {
8 pub amount_of_resources_contributed: Decimal,
9 pub pool_units_minted: Decimal,
10 }
11
12 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
13 pub struct RedemptionEvent {
14 pub pool_unit_tokens_redeemed: Decimal,
15 pub redeemed_amount: Decimal,
16 }
17
18 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
19 pub struct WithdrawEvent {
20 pub amount: Decimal,
21 }
22
23 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
24 pub struct DepositEvent {
25 pub amount: Decimal,
26 }
27}
28
29pub mod two_resource_pool {
30 use super::*;
31
32 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
33 pub struct ContributionEvent {
34 pub contributed_resources: IndexMap<ResourceAddress, Decimal>,
35 pub pool_units_minted: Decimal,
36 }
37
38 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
39 pub struct RedemptionEvent {
40 pub pool_unit_tokens_redeemed: Decimal,
41 pub redeemed_resources: IndexMap<ResourceAddress, Decimal>,
42 }
43
44 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
45 pub struct WithdrawEvent {
46 pub resource_address: ResourceAddress,
47 pub amount: Decimal,
48 }
49
50 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
51 pub struct DepositEvent {
52 pub resource_address: ResourceAddress,
53 pub amount: Decimal,
54 }
55}
56
57pub mod multi_resource_pool {
58 use super::*;
59
60 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
61 pub struct ContributionEvent {
62 pub contributed_resources: IndexMap<ResourceAddress, Decimal>,
63 pub pool_units_minted: Decimal,
64 }
65
66 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
67 pub struct RedemptionEvent {
68 pub pool_unit_tokens_redeemed: Decimal,
69 pub redeemed_resources: IndexMap<ResourceAddress, Decimal>,
70 }
71
72 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
73 pub struct WithdrawEvent {
74 pub resource_address: ResourceAddress,
75 pub amount: Decimal,
76 }
77
78 #[derive(ScryptoSbor, ScryptoEvent, Debug)]
79 pub struct DepositEvent {
80 pub resource_address: ResourceAddress,
81 pub amount: Decimal,
82 }
83}