Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments for operation types and object types #2306

Merged
merged 1 commit into from
Nov 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions libraries/chain/include/graphene/chain/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,24 @@

namespace graphene { namespace chain { using namespace protocol; } }

/// Object types in the Implementation Space (enum impl_object_type (2.x.x))
GRAPHENE_DEFINE_IDS(chain, implementation_ids, impl_,
(global_property)
(dynamic_global_property)
(reserved0)
(asset_dynamic_data)
(asset_bitasset_data)
(account_balance)
(account_statistics)
(transaction_history)
(block_summary)
(account_transaction_history)
(blinded_balance)
(chain_property)
(witness_schedule)
(budget_record)
(special_authority)
(buyback)
(fba_accumulator)
(collateral_bid))
/* 2.0.x */ (global_property)
/* 2.1.x */ (dynamic_global_property)
/* 2.2.x */ (reserved0) // unused, but can not be simply deleted due to API compatibility
/* 2.3.x */ (asset_dynamic_data)
/* 2.4.x */ (asset_bitasset_data)
/* 2.5.x */ (account_balance)
/* 2.6.x */ (account_statistics)
/* 2.7.x */ (transaction_history)
/* 2.8.x */ (block_summary)
/* 2.9.x */ (account_transaction_history)
/* 2.10.x */ (blinded_balance)
/* 2.11.x */ (chain_property)
/* 2.12.x */ (witness_schedule)
/* 2.13.x */ (budget_record)
/* 2.14.x */ (special_authority)
/* 2.15.x */ (buyback)
/* 2.16.x */ (fba_accumulator)
/* 2.17.x */ (collateral_bid)
)
128 changes: 64 additions & 64 deletions libraries/protocol/include/graphene/protocol/operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,70 +51,70 @@ namespace graphene { namespace protocol {
* Defines the set of valid operations as a discriminated union type.
*/
typedef fc::static_variant<
transfer_operation,
limit_order_create_operation,
limit_order_cancel_operation,
call_order_update_operation,
fill_order_operation, // VIRTUAL
account_create_operation,
account_update_operation,
account_whitelist_operation,
account_upgrade_operation,
account_transfer_operation,
asset_create_operation,
asset_update_operation,
asset_update_bitasset_operation,
asset_update_feed_producers_operation,
asset_issue_operation,
asset_reserve_operation,
asset_fund_fee_pool_operation,
asset_settle_operation,
asset_global_settle_operation,
asset_publish_feed_operation,
witness_create_operation,
witness_update_operation,
proposal_create_operation,
proposal_update_operation,
proposal_delete_operation,
withdraw_permission_create_operation,
withdraw_permission_update_operation,
withdraw_permission_claim_operation,
withdraw_permission_delete_operation,
committee_member_create_operation,
committee_member_update_operation,
committee_member_update_global_parameters_operation,
vesting_balance_create_operation,
vesting_balance_withdraw_operation,
worker_create_operation,
custom_operation,
assert_operation,
balance_claim_operation,
override_transfer_operation,
transfer_to_blind_operation,
blind_transfer_operation,
transfer_from_blind_operation,
asset_settle_cancel_operation, // VIRTUAL
asset_claim_fees_operation,
fba_distribute_operation, // VIRTUAL
bid_collateral_operation,
execute_bid_operation, // VIRTUAL
asset_claim_pool_operation,
asset_update_issuer_operation,
htlc_create_operation,
htlc_redeem_operation,
htlc_redeemed_operation, // VIRTUAL
htlc_extend_operation,
htlc_refund_operation, // VIRTUAL
custom_authority_create_operation,
custom_authority_update_operation,
custom_authority_delete_operation,
ticket_create_operation,
ticket_update_operation,
liquidity_pool_create_operation,
liquidity_pool_delete_operation,
liquidity_pool_deposit_operation,
liquidity_pool_withdraw_operation,
liquidity_pool_exchange_operation
/* 0 */ transfer_operation,
/* 1 */ limit_order_create_operation,
/* 2 */ limit_order_cancel_operation,
/* 3 */ call_order_update_operation,
/* 4 */ fill_order_operation, // VIRTUAL
/* 5 */ account_create_operation,
/* 6 */ account_update_operation,
/* 7 */ account_whitelist_operation,
/* 8 */ account_upgrade_operation,
/* 9 */ account_transfer_operation,
/* 10 */ asset_create_operation,
/* 11 */ asset_update_operation,
/* 12 */ asset_update_bitasset_operation,
/* 13 */ asset_update_feed_producers_operation,
/* 14 */ asset_issue_operation,
/* 15 */ asset_reserve_operation,
/* 16 */ asset_fund_fee_pool_operation,
/* 17 */ asset_settle_operation,
/* 18 */ asset_global_settle_operation,
/* 19 */ asset_publish_feed_operation,
/* 20 */ witness_create_operation,
/* 21 */ witness_update_operation,
/* 22 */ proposal_create_operation,
/* 23 */ proposal_update_operation,
/* 24 */ proposal_delete_operation,
/* 25 */ withdraw_permission_create_operation,
/* 26 */ withdraw_permission_update_operation,
/* 27 */ withdraw_permission_claim_operation,
/* 28 */ withdraw_permission_delete_operation,
/* 29 */ committee_member_create_operation,
/* 30 */ committee_member_update_operation,
/* 31 */ committee_member_update_global_parameters_operation,
/* 32 */ vesting_balance_create_operation,
/* 33 */ vesting_balance_withdraw_operation,
/* 34 */ worker_create_operation,
/* 35 */ custom_operation,
/* 36 */ assert_operation,
/* 37 */ balance_claim_operation,
/* 38 */ override_transfer_operation,
/* 39 */ transfer_to_blind_operation,
/* 40 */ blind_transfer_operation,
/* 41 */ transfer_from_blind_operation,
/* 42 */ asset_settle_cancel_operation, // VIRTUAL
/* 43 */ asset_claim_fees_operation,
/* 44 */ fba_distribute_operation, // VIRTUAL
/* 45 */ bid_collateral_operation,
/* 46 */ execute_bid_operation, // VIRTUAL
/* 47 */ asset_claim_pool_operation,
/* 48 */ asset_update_issuer_operation,
/* 49 */ htlc_create_operation,
/* 50 */ htlc_redeem_operation,
/* 51 */ htlc_redeemed_operation, // VIRTUAL
/* 52 */ htlc_extend_operation,
/* 53 */ htlc_refund_operation, // VIRTUAL
/* 54 */ custom_authority_create_operation,
/* 55 */ custom_authority_update_operation,
/* 56 */ custom_authority_delete_operation,
/* 57 */ ticket_create_operation,
/* 58 */ ticket_update_operation,
/* 59 */ liquidity_pool_create_operation,
/* 60 */ liquidity_pool_delete_operation,
/* 61 */ liquidity_pool_deposit_operation,
/* 62 */ liquidity_pool_withdraw_operation,
/* 63 */ liquidity_pool_exchange_operation
> operation;

/// @} // operations group
Expand Down
42 changes: 22 additions & 20 deletions libraries/protocol/include/graphene/protocol/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,27 +294,29 @@ void from_variant( const fc::variant& var, std::shared_ptr<const graphene::proto

} // fc::raw


/// Object types in the Protocol Space (enum object_type (1.x.x))
GRAPHENE_DEFINE_IDS(protocol, protocol_ids, /*protocol objects are not prefixed*/,
(null)
(base)
(account)
(asset)
(force_settlement)
(committee_member)
(witness)
(limit_order)
(call_order)
(custom) // unused
(proposal)
(operation_history)
(withdraw_permission)
(vesting_balance)
(worker)
(balance)
(htlc)
(custom_authority)
(ticket)
(liquidity_pool)
/* 1.0.x */ (null) // no data
/* 1.1.x */ (base) // no data
/* 1.2.x */ (account)
/* 1.3.x */ (asset)
/* 1.4.x */ (force_settlement)
/* 1.5.x */ (committee_member)
/* 1.6.x */ (witness)
/* 1.7.x */ (limit_order)
/* 1.8.x */ (call_order)
/* 1.9.x */ (custom) // unused
/* 1.10.x */ (proposal)
/* 1.11.x */ (operation_history) // strictly speaking it is not in protocol
/* 1.12.x */ (withdraw_permission)
/* 1.13.x */ (vesting_balance)
/* 1.14.x */ (worker)
/* 1.15.x */ (balance)
/* 1.16.x */ (htlc)
/* 1.17.x */ (custom_authority)
/* 1.18.x */ (ticket)
/* 1.19.x */ (liquidity_pool)
)

FC_REFLECT(graphene::protocol::public_key_type, (key_data))
Expand Down