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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
use crate::blueprints::resource::Bucket;
use crate::types::*;
use crate::*;
use radix_engine_common::data::scrypto::model::Own;
use sbor::rust::fmt::Debug;
use sbor::rust::prelude::*;

pub const COMPONENT_ROYALTY_SETTER_ROLE: &str = "royalty_setter";
pub const COMPONENT_ROYALTY_SETTER_UPDATER_ROLE: &str = "royalty_setter_updater";

pub const COMPONENT_ROYALTY_LOCKER_ROLE: &str = "royalty_locker";
pub const COMPONENT_ROYALTY_LOCKER_UPDATER_ROLE: &str = "royalty_locker_updater";

pub const COMPONENT_ROYALTY_CLAIMER_ROLE: &str = "royalty_claimer";
pub const COMPONENT_ROYALTY_CLAIMER_UPDATER_ROLE: &str = "royalty_claimer_updater";

pub const COMPONENT_ROYALTY_BLUEPRINT: &str = "ComponentRoyalty";

pub const COMPONENT_ROYALTY_CREATE_IDENT: &str = "create";

#[cfg_attr(
    feature = "radix_engine_fuzzing",
    derive(arbitrary::Arbitrary, serde::Serialize, serde::Deserialize)
)]
#[derive(
    Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestCategorize, ManifestEncode, ManifestDecode,
)]
pub struct ComponentRoyaltyCreateInput {
    pub royalty_config: ComponentRoyaltyConfig,
}

pub type ComponentRoyaltyCreateOutput = Own;

pub const COMPONENT_ROYALTY_SET_ROYALTY_IDENT: &str = "set_royalty";

#[cfg_attr(
    feature = "radix_engine_fuzzing",
    derive(arbitrary::Arbitrary, serde::Serialize, serde::Deserialize)
)]
#[derive(
    Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestCategorize, ManifestEncode, ManifestDecode,
)]
pub struct ComponentRoyaltySetInput {
    pub method: String,
    pub amount: RoyaltyAmount,
}

pub type ComponentRoyaltySetOutput = ();

pub const COMPONENT_ROYALTY_LOCK_ROYALTY_IDENT: &str = "lock_royalty";

#[cfg_attr(
    feature = "radix_engine_fuzzing",
    derive(arbitrary::Arbitrary, serde::Serialize, serde::Deserialize)
)]
#[derive(
    Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestCategorize, ManifestEncode, ManifestDecode,
)]
pub struct ComponentRoyaltyLockInput {
    pub method: String,
}

pub type ComponentRoyaltyLockOutput = ();

pub const COMPONENT_ROYALTY_CLAIM_ROYALTIES_IDENT: &str = "claim_royalties";

#[cfg_attr(
    feature = "radix_engine_fuzzing",
    derive(arbitrary::Arbitrary, serde::Serialize, serde::Deserialize)
)]
#[derive(
    Debug, Clone, Eq, PartialEq, ScryptoSbor, ManifestCategorize, ManifestEncode, ManifestDecode,
)]
pub struct ComponentClaimRoyaltiesInput {}

pub type ComponentClaimRoyaltiesOutput = Bucket;