radix_engine_interface/object_modules/royalty/
invocations.rs

1use crate::blueprints::resource::Bucket;
2use crate::internal_prelude::*;
3use crate::types::*;
4use radix_common::data::scrypto::model::Own;
5use sbor::rust::fmt::Debug;
6use sbor::rust::prelude::*;
7
8pub const COMPONENT_ROYALTY_SETTER_ROLE: &str = "royalty_setter";
9pub const COMPONENT_ROYALTY_SETTER_UPDATER_ROLE: &str = "royalty_setter_updater";
10
11pub const COMPONENT_ROYALTY_LOCKER_ROLE: &str = "royalty_locker";
12pub const COMPONENT_ROYALTY_LOCKER_UPDATER_ROLE: &str = "royalty_locker_updater";
13
14pub const COMPONENT_ROYALTY_CLAIMER_ROLE: &str = "royalty_claimer";
15pub const COMPONENT_ROYALTY_CLAIMER_UPDATER_ROLE: &str = "royalty_claimer_updater";
16
17pub const COMPONENT_ROYALTY_BLUEPRINT: &str = "ComponentRoyalty";
18
19pub const COMPONENT_ROYALTY_CREATE_IDENT: &str = "create";
20
21#[cfg_attr(
22    feature = "fuzzing",
23    derive(arbitrary::Arbitrary, serde::Serialize, serde::Deserialize)
24)]
25#[derive(
26    Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestCategorize, ManifestEncode, ManifestDecode,
27)]
28pub struct ComponentRoyaltyCreateInput {
29    pub royalty_config: ComponentRoyaltyConfig,
30}
31
32pub type ComponentRoyaltyCreateManifestInput = ComponentRoyaltyCreateInput;
33
34pub type ComponentRoyaltyCreateOutput = Own;
35
36pub const COMPONENT_ROYALTY_SET_ROYALTY_IDENT: &str = "set_royalty";
37
38#[cfg_attr(
39    feature = "fuzzing",
40    derive(arbitrary::Arbitrary, serde::Serialize, serde::Deserialize)
41)]
42#[derive(
43    Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestCategorize, ManifestEncode, ManifestDecode,
44)]
45pub struct ComponentRoyaltySetInput {
46    pub method: String,
47    pub amount: RoyaltyAmount,
48}
49
50pub type ComponentRoyaltySetManifestInput = ComponentRoyaltySetInput;
51
52pub type ComponentRoyaltySetOutput = ();
53
54pub const COMPONENT_ROYALTY_LOCK_ROYALTY_IDENT: &str = "lock_royalty";
55
56#[cfg_attr(
57    feature = "fuzzing",
58    derive(arbitrary::Arbitrary, serde::Serialize, serde::Deserialize)
59)]
60#[derive(
61    Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestCategorize, ManifestEncode, ManifestDecode,
62)]
63pub struct ComponentRoyaltyLockInput {
64    pub method: String,
65}
66
67pub type ComponentRoyaltyLockManifestInput = ComponentRoyaltyLockInput;
68
69pub type ComponentRoyaltyLockOutput = ();
70
71pub const COMPONENT_ROYALTY_CLAIM_ROYALTIES_IDENT: &str = "claim_royalties";
72
73#[cfg_attr(
74    feature = "fuzzing",
75    derive(arbitrary::Arbitrary, serde::Serialize, serde::Deserialize)
76)]
77#[derive(
78    Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestCategorize, ManifestEncode, ManifestDecode,
79)]
80pub struct ComponentClaimRoyaltiesInput {}
81
82pub type ComponentClaimRoyaltiesManifestInput = ComponentClaimRoyaltiesInput;
83
84pub type ComponentClaimRoyaltiesOutput = Bucket;