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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
use crate::{account::AccountHash, auction::EraId};
pub const SYSTEM_ACCOUNT: AccountHash = AccountHash::new([0; 32]);
pub const INITIAL_ERA_ID: EraId = 0;
pub const DELEGATION_RATE_DENOMINATOR: u64 = 1_000_000_000_000;
pub const BLOCK_REWARD: u64 = 1_000_000_000_000;
pub const ARG_AMOUNT: &str = "amount";
pub const ARG_DELEGATION_RATE: &str = "delegation_rate";
pub const ARG_PUBLIC_KEY: &str = "public_key";
pub const ARG_VALIDATOR: &str = "validator";
pub const ARG_DELEGATOR: &str = "delegator";
pub const ARG_SOURCE_PURSE: &str = "source_purse";
pub const ARG_VALIDATOR_PURSE: &str = "validator_purse";
pub const ARG_VALIDATOR_KEYS: &str = "validator_keys";
pub const ARG_VALIDATOR_PUBLIC_KEYS: &str = "validator_public_keys";
pub const ARG_ERA_ID: &str = "era_id";
pub const ARG_REWARD_FACTORS: &str = "reward_factors";
pub const ARG_VALIDATOR_PUBLIC_KEY: &str = "validator_public_key";
pub const ARG_DELEGATOR_PUBLIC_KEY: &str = "delegator_public_key";
pub const ARG_TARGET_PURSE: &str = "target_purse";
pub const ARG_UNBOND_PURSE: &str = "unbond_purse";
pub const ARG_VALIDATOR_SLOTS: &str = VALIDATOR_SLOTS_KEY;
pub const ARG_MINT_CONTRACT_PACKAGE_HASH: &str = "mint_contract_package_hash";
pub const ARG_GENESIS_VALIDATORS: &str = "genesis_validators";
pub const ARG_AUCTION_DELAY: &str = "auction_delay";
pub const ARG_LOCKED_FUNDS_PERIOD: &str = "locked_funds_period";
pub const ARG_UNBONDING_DELAY: &str = "unbonding_delay";
pub const METHOD_GET_ERA_VALIDATORS: &str = "get_era_validators";
pub const METHOD_READ_SEIGNIORAGE_RECIPIENTS: &str = "read_seigniorage_recipients";
pub const METHOD_ADD_BID: &str = "add_bid";
pub const METHOD_WITHDRAW_BID: &str = "withdraw_bid";
pub const METHOD_DELEGATE: &str = "delegate";
pub const METHOD_UNDELEGATE: &str = "undelegate";
pub const METHOD_RUN_AUCTION: &str = "run_auction";
pub const METHOD_SLASH: &str = "slash";
pub const METHOD_RELEASE_FOUNDER_STAKE: &str = "release_founder_stake";
pub const METHOD_DISTRIBUTE: &str = "distribute";
pub const METHOD_WITHDRAW_DELEGATOR_REWARD: &str = "withdraw_delegator_reward";
pub const METHOD_WITHDRAW_VALIDATOR_REWARD: &str = "withdraw_validator_reward";
pub const METHOD_READ_ERA_ID: &str = "read_era_id";
pub const UNBONDING_PURSES_KEY: &str = "unbonding_purses";
pub const BIDS_KEY: &str = "bids";
pub const ERA_ID_KEY: &str = "era_id";
pub const SEIGNIORAGE_RECIPIENTS_SNAPSHOT_KEY: &str = "seigniorage_recipients_snapshot";
pub const DELEGATOR_REWARD_PURSE_KEY: &str = "delegator_reward_purse";
pub const VALIDATOR_REWARD_PURSE_KEY: &str = "validator_reward_purse";
pub const VALIDATOR_SLOTS_KEY: &str = "validator_slots";
pub const AUCTION_DELAY_KEY: &str = "auction_delay";
pub const LOCKED_FUNDS_PERIOD_KEY: &str = "locked_funds_period";
pub const UNBONDING_DELAY_KEY: &str = "unbonding_delay";