CatapultServer  v0.5.0.1 (Elephant)
ModifyMultisigAccountTransaction.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "MultisigEntityType.h"
24 
25 namespace catapult { namespace model {
26 
27 #pragma pack(push, 1)
28 
30  enum class CosignatoryModificationType : uint8_t {
32  Add,
33 
35  Del
36  };
37 
40  public:
43 
46  };
47 
49  template<typename THeader>
50  struct ModifyMultisigAccountTransactionBody : public THeader {
51  private:
53 
54  public:
55  DEFINE_TRANSACTION_CONSTANTS(Entity_Type_Modify_Multisig_Account, 1)
56 
57  public:
60 
63 
66 
67  // followed by modifications data if ModificationsCount != 0
69 
70  private:
71  template<typename T>
72  static auto* ModificationsPtrT(T& transaction) {
73  return transaction.ModificationsCount ? THeader::PayloadStart(transaction) : nullptr;
74  }
75 
76  public:
77  // Calculates the real size of a modify multisig account \a transaction.
78  static constexpr uint64_t CalculateRealSize(const TransactionType& transaction) noexcept {
79  return sizeof(TransactionType) + transaction.ModificationsCount * sizeof(CosignatoryModification);
80  }
81  };
82 
83  DEFINE_EMBEDDABLE_TRANSACTION(ModifyMultisigAccount)
84 
85 #pragma pack(pop)
86 }}
Transaction.h
catapult::model::ModifyMultisigAccountTransactionBody::MinApprovalDelta
int8_t MinApprovalDelta
Relative change of the minimal number of cosignatories required when approving a transaction.
Definition: ModifyMultisigAccountTransaction.h:62
catapult::model::ModifyMultisigAccountTransactionBody::CalculateRealSize
static constexpr uint64_t CalculateRealSize(const TransactionType &transaction) noexcept
Definition: ModifyMultisigAccountTransaction.h:78
catapult::model::ModifyMultisigAccountTransactionBody::ModificationsPtrT
static auto * ModificationsPtrT(T &transaction)
Definition: ModifyMultisigAccountTransaction.h:72
catapult::model::ModifyMultisigAccountTransactionBody::TransactionType
ModifyMultisigAccountTransactionBody< THeader > TransactionType
Definition: ModifyMultisigAccountTransaction.h:52
DEFINE_EMBEDDABLE_TRANSACTION
#define DEFINE_EMBEDDABLE_TRANSACTION(NAME)
Defines a transaction with NAME that supports embedding.
Definition: Transaction.h:69
catapult::model::ModifyMultisigAccountTransactionBody
Binary layout for a modify multisig account transaction body.
Definition: ModifyMultisigAccountTransaction.h:50
catapult::model::CosignatoryModificationType
CosignatoryModificationType
Cosignatory modification type.
Definition: ModifyMultisigAccountTransaction.h:30
catapult::model::CosignatoryModification::ModificationType
CosignatoryModificationType ModificationType
Modification type.
Definition: ModifyMultisigAccountTransaction.h:42
MultisigEntityType.h
catapult::model::CosignatoryModification
Binary layout for cosignatory modification.
Definition: ModifyMultisigAccountTransaction.h:39
catapult::model::ModifyMultisigAccountTransactionBody::ModificationsCount
uint8_t ModificationsCount
Number of modifications.
Definition: ModifyMultisigAccountTransaction.h:65
DEFINE_TRANSACTION_CONSTANTS
#define DEFINE_TRANSACTION_CONSTANTS(TYPE, VERSION)
Defines constants for a transaction with TYPE and VERSION.
Definition: Transaction.h:50
catapult
Definition: AddressExtractionExtension.cpp:28
DEFINE_TRANSACTION_VARIABLE_DATA_ACCESSORS
#define DEFINE_TRANSACTION_VARIABLE_DATA_ACCESSORS(NAME, TYPE)
Defines NAME (TYPE typed) variable data accessors around a similarly named templated untyped data acc...
Definition: Transaction.h:57
catapult::model::CosignatoryModification::CosignatoryPublicKey
Key CosignatoryPublicKey
Cosignatory account public key.
Definition: ModifyMultisigAccountTransaction.h:45
catapult::model::ModifyMultisigAccountTransactionBody::MinRemovalDelta
int8_t MinRemovalDelta
Relative change of the minimal number of cosignatories required when removing an account.
Definition: ModifyMultisigAccountTransaction.h:59
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::model::CosignatoryModificationType::Del
Remove cosignatory.
catapult::model::CosignatoryModificationType::Add
Add cosignatory.