BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
genesis_state.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cryptonomex, Inc., and contributors.
3  *
4  * The MIT License
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 #pragma once
25 
28 #include <graphene/chain/types.hpp>
30 
31 #include <fc/crypto/sha256.hpp>
32 
33 #include <string>
34 #include <vector>
35 
36 namespace graphene { namespace chain {
37 using std::string;
38 using std::vector;
39 
42  initial_account_type(const string& name = string(),
45  bool is_lifetime_member = false)
46  : name(name),
50  {}
51  string name;
54  bool is_lifetime_member = false;
55  };
61  };
62 
63  string symbol;
64  string issuer_name;
65 
66  string description;
68 
71 
72  bool is_bitasset = false;
73  vector<initial_collateral_position> collateral_records;
74  };
77  string asset_symbol;
79  };
82  string asset_symbol;
87  };
90  string owner_name;
92  };
95  string owner_name;
96  };
99  string owner_name;
101  };
102 
103  time_point_sec initial_timestamp;
107  vector<initial_account_type> initial_accounts;
108  vector<initial_asset_type> initial_assets;
109  vector<initial_balance_type> initial_balances;
110  vector<initial_vesting_balance_type> initial_vesting_balances;
112  vector<initial_witness_type> initial_witness_candidates;
113  vector<initial_committee_member_type> initial_committee_candidates;
114  vector<initial_worker_type> initial_worker_candidates;
115 
120 
127 
129  void override_witness_signing_keys( const std::string& new_key );
130 
131 };
132 
133 } } // namespace graphene::chain
134 
144 
GRAPHENE_MAX_SHARE_SUPPLY
constexpr int64_t GRAPHENE_MAX_SHARE_SUPPLY(1000000000000000LL)
graphene::chain::genesis_state_type::initial_asset_type::description
string description
Definition: genesis_state.hpp:66
graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position
Definition: genesis_state.hpp:57
graphene::chain::genesis_state_type::initial_vesting_balance_type::begin_balance
share_type begin_balance
Definition: genesis_state.hpp:86
graphene::chain::genesis_state_type::initial_balance_type::asset_symbol
string asset_symbol
Definition: genesis_state.hpp:77
graphene::chain::genesis_state_type::initial_committee_candidates
vector< initial_committee_member_type > initial_committee_candidates
Definition: genesis_state.hpp:113
graphene::chain::genesis_state_type::initial_assets
vector< initial_asset_type > initial_assets
Definition: genesis_state.hpp:108
graphene::chain::genesis_state_type::initial_witness_candidates
vector< initial_witness_type > initial_witness_candidates
Definition: genesis_state.hpp:112
FC_REFLECT_TYPENAME
FC_REFLECT_TYPENAME(fc::log_message)
GRAPHENE_DEFAULT_MIN_WITNESS_COUNT
#define GRAPHENE_DEFAULT_MIN_WITNESS_COUNT
Definition: config.hpp:77
graphene::chain::genesis_state_type::initial_account_type::is_lifetime_member
bool is_lifetime_member
Definition: genesis_state.hpp:54
graphene::chain::genesis_state_type::initial_timestamp
time_point_sec initial_timestamp
Definition: genesis_state.hpp:103
graphene::chain::genesis_state_type::compute_chain_id
chain_id_type compute_chain_id() const
Definition: genesis_state.cpp:32
graphene::chain::genesis_state_type::initial_vesting_balance_type::vesting_duration_seconds
uint32_t vesting_duration_seconds
Definition: genesis_state.hpp:85
graphene::chain::genesis_state_type::initial_chain_id
chain_id_type initial_chain_id
Definition: genesis_state.hpp:119
fc::sha256
Definition: sha256.hpp:10
graphene::chain::genesis_state_type::initial_asset_type::collateral_records
vector< initial_collateral_position > collateral_records
Definition: genesis_state.hpp:73
GRAPHENE_BLOCKCHAIN_PRECISION_DIGITS
#define GRAPHENE_BLOCKCHAIN_PRECISION_DIGITS
Definition: config.hpp:30
graphene::chain::genesis_state_type::initial_witness_type
Definition: genesis_state.hpp:88
graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position::owner
address owner
Definition: genesis_state.hpp:58
graphene::chain::genesis_state_type::initial_balance_type::owner
address owner
Definition: genesis_state.hpp:76
graphene::chain::genesis_state_type::initial_vesting_balance_type::begin_timestamp
time_point_sec begin_timestamp
Definition: genesis_state.hpp:84
graphene::chain::genesis_state_type::initial_witness_type::block_signing_key
public_key_type block_signing_key
Definition: genesis_state.hpp:91
graphene::chain::genesis_state_type::initial_witness_type::owner_name
string owner_name
Must correspond to one of the initial accounts.
Definition: genesis_state.hpp:90
graphene::chain::genesis_state_type::initial_accounts
vector< initial_account_type > initial_accounts
Definition: genesis_state.hpp:107
graphene::chain::genesis_state_type::initial_vesting_balance_type::amount
share_type amount
Definition: genesis_state.hpp:83
graphene::protocol::public_key_type
Definition: types.hpp:312
graphene::chain::genesis_state_type::initial_asset_type::symbol
string symbol
Definition: genesis_state.hpp:63
graphene::chain::genesis_state_type::initial_balance_type::amount
share_type amount
Definition: genesis_state.hpp:78
graphene::chain::genesis_state_type::initial_asset_type
Definition: genesis_state.hpp:56
graphene::chain::genesis_state_type::initial_worker_type
Definition: genesis_state.hpp:97
graphene::chain::genesis_state_type::initial_asset_type::accumulated_fees
share_type accumulated_fees
Definition: genesis_state.hpp:70
graphene::chain::genesis_state_type::initial_asset_type::issuer_name
string issuer_name
Definition: genesis_state.hpp:64
graphene::chain::genesis_state_type::initial_vesting_balance_type
Definition: genesis_state.hpp:80
graphene::chain::genesis_state_type::initial_account_type
Definition: genesis_state.hpp:41
graphene::chain::genesis_state_type::immutable_parameters
immutable_chain_parameters immutable_parameters
Definition: genesis_state.hpp:106
fc::time_point_sec
Definition: time.hpp:74
graphene::chain::genesis_state_type::initial_account_type::name
string name
Definition: genesis_state.hpp:51
address.hpp
GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION
#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type)
Definition: types.hpp:85
graphene::chain::genesis_state_type::initial_account_type::active_key
public_key_type active_key
Definition: genesis_state.hpp:53
graphene::chain::genesis_state_type::initial_vesting_balance_type::owner
address owner
Definition: genesis_state.hpp:81
graphene::protocol::chain_parameters
Definition: chain_parameters.hpp:46
graphene::chain::genesis_state_type::initial_worker_type::owner_name
string owner_name
Must correspond to one of the initial accounts.
Definition: genesis_state.hpp:99
graphene::chain::genesis_state_type::initial_committee_member_type::owner_name
string owner_name
Must correspond to one of the initial accounts.
Definition: genesis_state.hpp:95
graphene::chain::genesis_state_type::initial_balance_type
Definition: genesis_state.hpp:75
graphene::chain::genesis_state_type::initial_asset_type::max_supply
share_type max_supply
Definition: genesis_state.hpp:69
immutable_chain_parameters.hpp
graphene::chain::genesis_state_type::initial_asset_type::is_bitasset
bool is_bitasset
Definition: genesis_state.hpp:72
graphene::chain::genesis_state_type::override_witness_signing_keys
void override_witness_signing_keys(const std::string &new_key)
Method to override initial witness signing keys for debug.
Definition: genesis_state.cpp:37
graphene::chain::genesis_state_type::initial_balances
vector< initial_balance_type > initial_balances
Definition: genesis_state.hpp:109
graphene::chain::genesis_state_type
Definition: genesis_state.hpp:40
graphene::chain::genesis_state_type::initial_parameters
chain_parameters initial_parameters
Definition: genesis_state.hpp:105
graphene::chain::immutable_chain_parameters
Definition: immutable_chain_parameters.hpp:31
graphene::chain::genesis_state_type::initial_active_witnesses
uint64_t initial_active_witnesses
Definition: genesis_state.hpp:111
graphene::chain::genesis_state_type::initial_vesting_balances
vector< initial_vesting_balance_type > initial_vesting_balances
Definition: genesis_state.hpp:110
graphene::chain::genesis_state_type::initial_account_type::owner_key
public_key_type owner_key
Definition: genesis_state.hpp:52
types.hpp
graphene::chain::genesis_state_type::max_core_supply
share_type max_core_supply
Definition: genesis_state.hpp:104
graphene::chain::genesis_state_type::initial_asset_type::precision
uint8_t precision
Definition: genesis_state.hpp:67
graphene::chain::genesis_state_type::initial_vesting_balance_type::asset_symbol
string asset_symbol
Definition: genesis_state.hpp:82
graphene::chain::genesis_state_type::initial_committee_member_type
Definition: genesis_state.hpp:93
graphene::chain::genesis_state_type::initial_worker_type::daily_pay
share_type daily_pay
Definition: genesis_state.hpp:100
graphene::chain::genesis_state_type::initial_account_type::initial_account_type
initial_account_type(const string &name=string(), const public_key_type &owner_key=public_key_type(), const public_key_type &active_key=public_key_type(), bool is_lifetime_member=false)
Definition: genesis_state.hpp:42
graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position::debt
share_type debt
Definition: genesis_state.hpp:60
chain_parameters.hpp
graphene
Definition: api.cpp:48
graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position::collateral
share_type collateral
Definition: genesis_state.hpp:59
graphene::protocol::address
a 160 bit hash of a public key
Definition: address.hpp:44
graphene::chain::genesis_state_type::initial_worker_candidates
vector< initial_worker_type > initial_worker_candidates
Definition: genesis_state.hpp:114
sha256.hpp
fc::safe
Definition: safe.hpp:26