1
0
Fork 0
forked from lthn/blockchain

get_native_coin_asset_descriptor() implemented

This commit is contained in:
sowle 2023-10-25 21:31:11 +02:00
parent edb0056488
commit f9ca8f52c5
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 20 additions and 2 deletions

View file

@ -2105,6 +2105,25 @@ namespace currency
p_result_point->to_public_key(*p_result_pub_key);
}
const asset_descriptor_base& get_native_coin_asset_descriptor()
{
static asset_descriptor_base native_coin_asset_descriptor = [](){
asset_descriptor_base adb{};
adb.total_max_supply = UINT64_MAX;
adb.current_supply = 0;
adb.decimal_point = CURRENCY_DISPLAY_DECIMAL_POINT;
adb.ticker = CURRENCY_NAME_ABR;
adb.full_name = CURRENCY_NAME_BASE;
adb.meta_info = "";
adb.owner = currency::null_pkey;
adb.hidden_supply = false;
adb.version = 0;
return adb;
}();
return native_coin_asset_descriptor;
}
bool construct_tx_handle_ado(const account_keys& sender_account_keys,
const finalize_tx_param& ftp,
asset_descriptor_operation& ado,

View file

@ -329,8 +329,7 @@ namespace currency
uint64_t get_tx_version(uint64_t tx_expected_block_height, const hard_forks_descriptor& hfd); // returns tx version based on the height of the block where the transaction is expected to be
bool construct_tx(const account_keys& sender_account_keys, const finalize_tx_param& param, finalized_tx& result);
void calculate_asset_id(const crypto::public_key& asset_owner, crypto::point_t* p_result_point, crypto::public_key* p_result_pub_key);
const asset_descriptor_base& get_native_coin_asset_descriptor();
bool sign_multisig_input_in_tx(currency::transaction& tx, size_t ms_input_index, const currency::account_keys& keys, const currency::transaction& source_tx, bool *p_is_input_fully_signed = nullptr);