CatapultServer  v0.5.0.1 (Elephant)
NemesisConfiguration.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/state/MosaicEntry.h"
24 #include "catapult/state/RootNamespace.h"
25 #include "catapult/utils/Hashers.h"
26 #include <string>
27 #include <unordered_map>
28 #include <vector>
29 
30 namespace catapult { namespace utils { class ConfigurationBag; } }
31 
32 namespace catapult { namespace tools { namespace nemgen {
33 
35  struct MosaicSeed {
37  std::string Name;
38 
41  };
42 
44  using NamespaceIdToNameMap = std::unordered_map<NamespaceId, std::string, utils::BaseValueHasher<NamespaceId>>;
45 
47  using NamespaceIdToRootNamespaceMap = std::unordered_map<NamespaceId, state::RootNamespace, utils::BaseValueHasher<NamespaceId>>;
48 
50  using MosaicNameToMosaicEntryMap = std::vector<std::pair<std::string, state::MosaicEntry>>;
51 
53  using AddressToMosaicSeedsMap = std::vector<std::pair<std::string, std::vector<MosaicSeed>>>;
54 
57  public:
60 
63 
66 
68  std::string CppFileHeader;
69 
71  std::string CppFile;
72 
74  std::string BinDirectory;
75 
78 
81 
84 
87 
88  public:
91  };
92 }}}
catapult::model::GenerateRootNamespaceId
NamespaceId GenerateRootNamespaceId(const RawString &name) noexcept
Generates a root namespace id given name.
Definition: NamespaceIdGenerator.cpp:27
catapult::utils::VerifyBagSizeLte
void VerifyBagSizeLte(const ConfigurationBag &bag, size_t expectedSize)
Verifies that the number of properties in bag is no greater than expectedSize.
Definition: utils/ConfigurationUtils.cpp:38
catapult::model::GenerateMosaicId
MosaicId GenerateMosaicId(const Key &owner, MosaicNonce nonce) noexcept
Generates a mosaic id given owner and nonce.
Definition: MosaicIdGenerator.cpp:26
catapult::Amount
utils::BaseValue< uint64_t, Amount_tag > Amount
Definition: src/catapult/types.h:76
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::model::MosaicPropertyId::Duration
Mosaic duration.
catapult::tools::nemgen::NamespaceIdToNameMap
std::unordered_map< NamespaceId, std::string, utils::BaseValueHasher< NamespaceId > > NamespaceIdToNameMap
Mapping of namespace ids to human readable names.
Definition: NemesisConfiguration.h:44
catapult::tools::nemgen::NemesisConfiguration
Nemesis configuration.
Definition: NemesisConfiguration.h:56
NemesisConfiguration.h
catapult::tools::nemgen::NemesisConfiguration::CppFile
std::string CppFile
Cpp file path.
Definition: NemesisConfiguration.h:71
catapult::utils::to_underlying_type
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
catapult::utils::ConfigurationBag
A simple bag of properties.
Definition: ConfigurationBag.h:57
catapult::tools::nemgen::NemesisConfiguration::NetworkIdentifier
model::NetworkIdentifier NetworkIdentifier
Block chain network identifier.
Definition: NemesisConfiguration.h:59
KeyPair.h
catapult::tools::nemgen::NemesisConfiguration::RootNamespaces
NamespaceIdToRootNamespaceMap RootNamespaces
Map containing all root namespaces.
Definition: NemesisConfiguration.h:80
catapult::utils::BaseValue< uint64_t, Amount_tag >
catapult::model::MosaicFlags
MosaicFlags
Mosaic property flags.
Definition: MosaicProperty.h:50
catapult::tools::nemgen::NemesisConfiguration::CppFileHeader
std::string CppFileHeader
Cpp file header.
Definition: NemesisConfiguration.h:68
catapult::tools::nemgen::MosaicSeed::Amount
catapult::Amount Amount
Mosaic amount.
Definition: NemesisConfiguration.h:40
NetworkInfo.h
CATAPULT_THROW_RUNTIME_ERROR_1
#define CATAPULT_THROW_RUNTIME_ERROR_1(MESSAGE, PARAM1)
Macro used to throw a catapult runtime error with a single parameter.
Definition: exceptions.h:171
catapult::tools::nemgen::NemesisConfiguration::NemesisAddressToMosaicSeeds
AddressToMosaicSeedsMap NemesisAddressToMosaicSeeds
Map of nemesis account addresses to mosaic seeds.
Definition: NemesisConfiguration.h:86
catapult::tools::nemgen::AddressToMosaicSeedsMap
std::vector< std::pair< std::string, std::vector< MosaicSeed > >> AddressToMosaicSeedsMap
Mapping of addresses to mosaic seeds.
Definition: NemesisConfiguration.h:53
catapult::model::Num_Mosaic_Properties
constexpr size_t Num_Mosaic_Properties
Number of available properties.
Definition: MosaicProperty.h:81
catapult::tools::nemgen::NemesisConfiguration::NamespaceNames
NamespaceIdToNameMap NamespaceNames
Map containing all namespace names.
Definition: NemesisConfiguration.h:77
catapult::model::MosaicPropertyId::Divisibility
Mosaic divisibility.
catapult::tools::nemgen::MosaicSeed::Name
std::string Name
Mosaic name.
Definition: NemesisConfiguration.h:37
catapult::model::MosaicFlags::Supply_Mutable
Mosaic supply is mutable.
catapult::tools::nemgen::NamespaceIdToRootNamespaceMap
std::unordered_map< NamespaceId, state::RootNamespace, utils::BaseValueHasher< NamespaceId > > NamespaceIdToRootNamespaceMap
Mapping of namespace ids to root namespaces.
Definition: NemesisConfiguration.h:47
catapult::model::MosaicProperties::FromValues
static MosaicProperties FromValues(const PropertyValuesContainer &values)
Creates mosaic properties from values.
Definition: MosaicProperties.h:65
catapult::tools::nemgen::NemesisConfiguration::NemesisSignerPrivateKey
std::string NemesisSignerPrivateKey
Nemesis signer private key.
Definition: NemesisConfiguration.h:65
catapult::MosaicNonce
utils::BaseValue< uint32_t, MosaicNonce_tag > MosaicNonce
Definition: plugins/txes/mosaic/src/types.h:28
CATAPULT_THROW_INVALID_ARGUMENT_1
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
LOAD_NEMESIS_PROPERTY
#define LOAD_NEMESIS_PROPERTY(NAME)
KeyUtils.h
catapult::model::NetworkIdentifier
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
ConfigurationUtils.h
catapult::tools::nemgen::MosaicNameToMosaicEntryMap
std::vector< std::pair< std::string, state::MosaicEntry > > MosaicNameToMosaicEntryMap
Mapping of mosaic names to mosaic entries.
Definition: NemesisConfiguration.h:50
ConfigurationBag.h
catapult
Definition: AddressExtractionExtension.cpp:28
Hashers.h
catapult::model::MosaicPropertyId::Flags
Mosaic flags.
catapult::tools::nemgen::NemesisConfiguration::MosaicEntries
MosaicNameToMosaicEntryMap MosaicEntries
Map containing all mosaic entries.
Definition: NemesisConfiguration.h:83
catapult::crypto::KeyPair::FromString
static auto FromString(const std::string &privateKey)
Creates a key pair from privateKey.
Definition: KeyPair.h:46
LOAD_CPP_PROPERTY
#define LOAD_CPP_PROPERTY(NAME)
catapult::utils::ByteArray< Hash256_Size, GenerationHash_tag >
catapult::model::MosaicFlags::Transferable
Mosaic is transferable.
catapult::tools::nemgen::NemesisConfiguration::NemesisGenerationHash
GenerationHash NemesisGenerationHash
Nemesis generation hash.
Definition: NemesisConfiguration.h:62
catapult::model::MosaicProperties::PropertyValuesContainer
std::array< uint64_t, Num_Mosaic_Properties > PropertyValuesContainer
Type of values container.
Definition: MosaicProperties.h:52
catapult::tools::nemgen::NemesisConfiguration::LoadFromBag
static NemesisConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads a nemesis configuration from bag.
Definition: NemesisConfiguration.cpp:177
LOAD_OUTPUT_PROPERTY
#define LOAD_OUTPUT_PROPERTY(NAME)
catapult::tools::nemgen::MosaicSeed
A mosaic seed.
Definition: NemesisConfiguration.h:35
catapult::Key
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
catapult::model::MosaicFlags::None
No flags present.
catapult::tools::nemgen::NemesisConfiguration::BinDirectory
std::string BinDirectory
Binary destination directory.
Definition: NemesisConfiguration.h:74
catapult::extensions::GenerateNamespacePath
NamespacePath GenerateNamespacePath(const RawString &name)
Parses a unified namespace name into a path.
Definition: IdGenerator.cpp:75