BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface 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;
84  time_point_sec begin_timestamp;
85  uint32_t vesting_duration_seconds = 0;
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 };
128 
129 } } // namespace graphene::chain
130 
133 FC_REFLECT_TYPENAME( graphene::chain::genesis_state_type::initial_asset_type::initial_collateral_position )
140 
#define GRAPHENE_DEFAULT_MIN_WITNESS_COUNT
Definition: config.hpp:77
immutable_chain_parameters immutable_parameters
string owner_name
Must correspond to one of the initial accounts.
Definition: api.cpp:56
vector< initial_worker_type > initial_worker_candidates
vector< initial_balance_type > initial_balances
vector< initial_witness_type > initial_witness_candidates
#define GRAPHENE_MAX_SHARE_SUPPLY
Definition: config.hpp:38
FC_REFLECT_TYPENAME(fc::log_message)
vector< initial_account_type > initial_accounts
#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type)
Definition: types.hpp:73
#define GRAPHENE_BLOCKCHAIN_PRECISION_DIGITS
Definition: config.hpp:30
string owner_name
Must correspond to one of the initial accounts.
vector< initial_committee_member_type > initial_committee_candidates
vector< initial_vesting_balance_type > initial_vesting_balances
string owner_name
Must correspond to one of the initial accounts.
vector< initial_collateral_position > collateral_records
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)
a 160 bit hash of a public key
Definition: address.hpp:44
vector< initial_asset_type > initial_assets
chain_id_type compute_chain_id() const