98 lines
3.6 KiB
C++
98 lines
3.6 KiB
C++
/* Copyright (C) Cryptonomex, Inc - All Rights Reserved **/
|
|
#pragma once
|
|
#include <graphene/chain/protocol/base.hpp>
|
|
#include <graphene/chain/protocol/account.hpp>
|
|
#include <graphene/chain/protocol/assert.hpp>
|
|
#include <graphene/chain/protocol/asset_ops.hpp>
|
|
#include <graphene/chain/protocol/balance.hpp>
|
|
#include <graphene/chain/protocol/custom.hpp>
|
|
#include <graphene/chain/protocol/committee_member.hpp>
|
|
#include <graphene/chain/protocol/market.hpp>
|
|
#include <graphene/chain/protocol/proposal.hpp>
|
|
#include <graphene/chain/protocol/transfer.hpp>
|
|
#include <graphene/chain/protocol/vesting.hpp>
|
|
#include <graphene/chain/protocol/withdraw_permission.hpp>
|
|
#include <graphene/chain/protocol/witness.hpp>
|
|
#include <graphene/chain/protocol/worker.hpp>
|
|
#include <graphene/chain/protocol/confidential.hpp>
|
|
|
|
namespace graphene { namespace chain {
|
|
|
|
/**
|
|
* @ingroup operations
|
|
*
|
|
* 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,
|
|
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_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
|
|
> operation;
|
|
|
|
/// @} // operations group
|
|
|
|
/**
|
|
* Appends required authorites to the result vector. The authorities appended are not the
|
|
* same as those returned by get_required_auth
|
|
*
|
|
* @return a set of required authorities for @ref op
|
|
*/
|
|
void operation_get_required_authorities( const operation& op,
|
|
flat_set<account_id_type>& active,
|
|
flat_set<account_id_type>& owner,
|
|
vector<authority>& other );
|
|
|
|
void operation_validate( const operation& op );
|
|
|
|
/**
|
|
* @brief necessary to support nested operations inside the proposal_create_operation
|
|
*/
|
|
struct op_wrapper
|
|
{
|
|
public:
|
|
op_wrapper(const operation& op = operation()):op(op){}
|
|
operation op;
|
|
};
|
|
|
|
} } // graphene::chain
|
|
|
|
FC_REFLECT_TYPENAME( graphene::chain::operation )
|
|
FC_REFLECT( graphene::chain::op_wrapper, (op) )
|