Raven Core
3.0.0
P2P Digital Currency
|
#include <regex>
#include <script/script.h>
#include <version.h>
#include <streams.h>
#include <primitives/transaction.h>
#include <iostream>
#include <script/standard.h>
#include <util.h>
#include <chainparams.h>
#include <base58.h>
#include <validation.h>
#include <txmempool.h>
#include <tinyformat.h>
#include <wallet/wallet.h>
#include <boost/algorithm/string.hpp>
#include <consensus/validation.h>
#include <rpc/protocol.h>
#include <net.h>
#include "assets.h"
#include "assetdb.h"
#include "assettypes.h"
#include "protocol.h"
#include "wallet/coincontrol.h"
#include "utilmoneystr.h"
#include "coins.h"
#include "LibBoolEE.h"
Go to the source code of this file.
Macros | |
#define | SIX_MONTHS 15780000 |
#define | OFFSET_THREE 3 |
#define | OFFSET_FOUR 4 |
#define | OFFSET_TWENTY_THREE 23 |
Functions | |
bool | IsRootNameValid (const std::string &name) |
bool | IsQualifierNameValid (const std::string &name) |
bool | IsRestrictedNameValid (const std::string &name) |
bool | IsSubQualifierNameValid (const std::string &name) |
bool | IsSubNameValid (const std::string &name) |
bool | IsUniqueTagValid (const std::string &tag) |
Check if an unique tagname is valid. More... | |
bool | IsVoteTagValid (const std::string &tag) |
bool | IsMsgChannelTagValid (const std::string &tag) |
bool | IsNameValidBeforeTag (const std::string &name) |
bool | IsQualifierNameValidBeforeTag (const std::string &name) |
bool | IsAssetNameASubasset (const std::string &name) |
bool | IsAssetNameASubQualifier (const std::string &name) |
Check if an asset is a sub qualifier. More... | |
bool | IsAssetNameValid (const std::string &name, AssetType &assetType, std::string &error) |
bool | IsAssetNameValid (const std::string &name) |
Check is an asset name is valid, and being able to return the asset type if needed. More... | |
bool | IsAssetNameValid (const std::string &name, AssetType &assetType) |
bool | IsAssetNameAnOwner (const std::string &name) |
Check if an asset is an owner. More... | |
bool | IsAssetNameAnRestricted (const std::string &name) |
Check if an asset is a restricted asset. More... | |
bool | IsAssetNameAQualifier (const std::string &name) |
Check if an asset is a qualifier asset or sub qualifier. More... | |
bool | IsAssetNameAnMsgChannel (const std::string &name) |
Check if an asset is a message channel. More... | |
bool | IsTypeCheckNameValid (const AssetType type, const std::string &name, std::string &error) |
Given a type, and an asset name, return if that name is valid based on the type. More... | |
std::string | GetParentName (const std::string &name) |
Get the root name of an asset. More... | |
std::string | GetUniqueAssetName (const std::string &parent, const std::string &tag) |
Build a unique asset buy giving the root name, and the tag name (ROOT, TAG) => ROOT::TAG. More... | |
bool | AssetFromTransaction (const CTransaction &tx, CNewAsset &asset, std::string &strAddress) |
These types of asset tx, have specific metadata at certain indexes in the transaction. More... | |
bool | MsgChannelAssetFromTransaction (const CTransaction &tx, CNewAsset &asset, std::string &strAddress) |
bool | QualifierAssetFromTransaction (const CTransaction &tx, CNewAsset &asset, std::string &strAddress) |
bool | RestrictedAssetFromTransaction (const CTransaction &tx, CNewAsset &asset, std::string &strAddress) |
bool | ReissueAssetFromTransaction (const CTransaction &tx, CReissueAsset &reissue, std::string &strAddress) |
bool | UniqueAssetFromTransaction (const CTransaction &tx, CNewAsset &asset, std::string &strAddress) |
bool | IsNewOwnerTxValid (const CTransaction &tx, const std::string &assetName, const std::string &address, std::string &errorMsg) |
bool | OwnerFromTransaction (const CTransaction &tx, std::string &ownerName, std::string &strAddress) |
bool | TransferAssetFromScript (const CScript &scriptPubKey, CAssetTransfer &assetTransfer, std::string &strAddress) |
Get specific asset type metadata from the given scripts. More... | |
bool | AssetFromScript (const CScript &scriptPubKey, CNewAsset &assetNew, std::string &strAddress) |
bool | MsgChannelAssetFromScript (const CScript &scriptPubKey, CNewAsset &assetNew, std::string &strAddress) |
bool | QualifierAssetFromScript (const CScript &scriptPubKey, CNewAsset &assetNew, std::string &strAddress) |
bool | RestrictedAssetFromScript (const CScript &scriptPubKey, CNewAsset &assetNew, std::string &strAddress) |
bool | OwnerAssetFromScript (const CScript &scriptPubKey, std::string &assetName, std::string &strAddress) |
bool | ReissueAssetFromScript (const CScript &scriptPubKey, CReissueAsset &reissue, std::string &strAddress) |
bool | AssetNullDataFromScript (const CScript &scriptPubKey, CNullAssetTxData &assetData, std::string &strAddress) |
bool | GlobalAssetNullDataFromScript (const CScript &scriptPubKey, CNullAssetTxData &assetData) |
bool | AssetNullVerifierDataFromScript (const CScript &scriptPubKey, CNullAssetTxVerifierString &verifierData) |
bool | CheckIssueBurnTx (const CTxOut &txOut, const AssetType &type, const int numberIssued) |
Check to make sure the script contains the burn transaction. More... | |
bool | CheckIssueBurnTx (const CTxOut &txOut, const AssetType &type) |
bool | CheckReissueBurnTx (const CTxOut &txOut) |
Check to make sure the script contains the reissue burn data. More... | |
bool | CheckIssueDataTx (const CTxOut &txOut) |
issue asset scripts to make sure script meets the standards More... | |
bool | CheckReissueDataTx (const CTxOut &txOut) |
bool | CheckOwnerDataTx (const CTxOut &txOut) |
bool | CheckTransferOwnerTx (const CTxOut &txOut) |
bool | IsScriptNewAsset (const CScript &scriptPubKey) |
Check script and see if it matches the asset issuance template. More... | |
bool | IsScriptNewAsset (const CScript &scriptPubKey, int &nStartingIndex) |
bool | IsScriptNewUniqueAsset (const CScript &scriptPubKey) |
Check script and see if it matches the unquie issuance template. More... | |
bool | IsScriptNewUniqueAsset (const CScript &scriptPubKey, int &nStartingIndex) |
bool | IsScriptNewMsgChannelAsset (const CScript &scriptPubKey) |
Check script and see if it matches the message channel issuance template. More... | |
bool | IsScriptNewMsgChannelAsset (const CScript &scriptPubKey, int &nStartingIndex) |
bool | IsScriptOwnerAsset (const CScript &scriptPubKey) |
Check script and see if it matches the owner issuance template. More... | |
bool | IsScriptOwnerAsset (const CScript &scriptPubKey, int &nStartingIndex) |
bool | IsScriptReissueAsset (const CScript &scriptPubKey) |
Check script and see if it matches the reissue template. More... | |
bool | IsScriptReissueAsset (const CScript &scriptPubKey, int &nStartingIndex) |
bool | IsScriptTransferAsset (const CScript &scriptPubKey) |
Check script and see if it matches the transfer asset template. More... | |
bool | IsScriptTransferAsset (const CScript &scriptPubKey, int &nStartingIndex) |
bool | IsScriptNewQualifierAsset (const CScript &scriptPubKey) |
Check script and see if it matches the qualifier issuance template. More... | |
bool | IsScriptNewQualifierAsset (const CScript &scriptPubKey, int &nStartingIndex) |
bool | IsScriptNewRestrictedAsset (const CScript &scriptPubKey) |
Check script and see if it matches the restricted issueance template. More... | |
bool | IsScriptNewRestrictedAsset (const CScript &scriptPubKey, int &nStartingIndex) |
bool | GetAssetInfoFromScript (const CScript &scriptPubKey, std::string &strName, CAmount &nAmount) |
bool | GetAssetInfoFromCoin (const Coin &coin, std::string &strName, CAmount &nAmount) |
bool | GetAssetData (const CScript &script, CAssetOutputEntry &data) |
void | GetAllAdministrativeAssets (CWallet *pwallet, std::vector< std::string > &names, int nMinConf) |
void | GetAllMyAssets (CWallet *pwallet, std::vector< std::string > &names, int nMinConf, bool fIncludeAdministrator, bool fOnlyAdministrator) |
CAmount | GetIssueAssetBurnAmount () |
Functions to be used to get access to the current burn amount required for specific asset issuance transactions. More... | |
CAmount | GetReissueAssetBurnAmount () |
CAmount | GetIssueSubAssetBurnAmount () |
CAmount | GetIssueUniqueAssetBurnAmount () |
CAmount | GetIssueMsgChannelAssetBurnAmount () |
CAmount | GetIssueQualifierAssetBurnAmount () |
CAmount | GetIssueSubQualifierAssetBurnAmount () |
CAmount | GetIssueRestrictedAssetBurnAmount () |
CAmount | GetAddNullQualifierTagBurnAmount () |
CAmount | GetBurnAmount (const int nType) |
CAmount | GetBurnAmount (const AssetType type) |
std::string | GetBurnAddress (const int nType) |
std::string | GetBurnAddress (const AssetType type) |
Functions to be used to get access to the burn address for a given asset type issuance. More... | |
bool | GetBestAssetAddressAmount (CAssetsCache &cache, const std::string &assetName, const std::string &address) |
This will get the amount that an address for a certain asset contains from the database if they cache doesn't already have it. More... | |
bool | GetAllMyAssetBalances (std::map< std::string, std::vector< COutput > > &outputs, std::map< std::string, CAmount > &amounts, const int confirmations, const std::string &prefix) |
sets balances with the total quantity of each owned asset More... | |
std::string | DecodeAssetData (std::string encoded) |
Decode and Encode IPFS hashes, or OIP hashes. More... | |
std::string | EncodeAssetData (std::string decoded) |
std::string | DecodeIPFS (std::string encoded) |
std::string | EncodeIPFS (std::string decoded) |
bool | CreateAssetTransaction (CWallet *pwallet, CCoinControl &coinControl, const CNewAsset &asset, const std::string &address, std::pair< int, std::string > &error, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRequired, std::string *verifier_string) |
Creates new asset issuance transaction. More... | |
bool | CreateAssetTransaction (CWallet *pwallet, CCoinControl &coinControl, const std::vector< CNewAsset > assets, const std::string &address, std::pair< int, std::string > &error, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRequired, std::string *verifier_string) |
bool | CreateReissueAssetTransaction (CWallet *pwallet, CCoinControl &coinControl, const CReissueAsset &reissueAsset, const std::string &address, std::pair< int, std::string > &error, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRequired, std::string *verifier_string) |
Create a reissue asset transaction. More... | |
bool | CreateTransferAssetTransaction (CWallet *pwallet, const CCoinControl &coinControl, const std::vector< std::pair< CAssetTransfer, std::string > >vTransfers, const std::string &changeAddress, std::pair< int, std::string > &error, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRequired, std::vector< std::pair< CNullAssetTxData, std::string > > *nullAssetTxData, std::vector< CNullAssetTxData > *nullGlobalRestrictionData) |
Create a transfer asset transaction. More... | |
bool | SendAssetTransaction (CWallet *pwallet, CWalletTx &transaction, CReserveKey &reserveKey, std::pair< int, std::string > &error, std::string &txid) |
Send any type of asset transaction to the network. More... | |
bool | VerifyWalletHasAsset (const std::string &asset_name, std::pair< int, std::string > &pairError) |
Verifies that this wallet owns the give asset. More... | |
bool | CheckAmountWithUnits (const CAmount &nAmount, const int8_t nUnits) |
Checks the amount and units, and makes sure that the amount uses the correct decimals. More... | |
bool | CheckEncoded (const std::string &hash, std::string &strError) |
Check the Encoded hash and make sure it is either an IPFS hash or a OIP hash. More... | |
void | GetTxOutAssetTypes (const std::vector< CTxOut > &vout, int &issues, int &reissues, int &transfers, int &owners) |
bool | ParseAssetScript (CScript scriptPubKey, uint160 &hashBytes, std::string &assetName, CAmount &assetAmount) |
Helper method for extracting address bytes, asset name and amount from an asset script. More... | |
void | ExtractVerifierStringQualifiers (const std::string &verifier, std::set< std::string > &qualifiers, bool fWithTag) |
Helper method for extracting #TAGS from a verifier string. More... | |
std::string | GetStrippedVerifierString (const std::string &verifier) |
bool | CheckVerifierString (const std::string &verifier, std::set< std::string > &setFoundQualifiers, std::string &strError, bool fWithTags) |
bool | VerifyNullAssetDataFlag (const int &flag, std::string &strError) |
Helper methods that validate changes to null asset data transaction databases. More... | |
bool | VerifyQualifierChange (CAssetsCache &cache, const CNullAssetTxData &data, const std::string &address, std::string &strError) |
bool | VerifyRestrictedAddressChange (CAssetsCache &cache, const CNullAssetTxData &data, const std::string &address, std::string &strError) |
bool | VerifyGlobalRestrictedChange (CAssetsCache &cache, const CNullAssetTxData &data, std::string &strError) |
bool | CheckVerifierAssetTxOut (const CTxOut &txout, std::string &strError) |
bool | ContextualCheckNullAssetTxOut (const CTxOut &txout, CAssetsCache *assetCache, std::string &strError) |
bool | ContextualCheckGlobalAssetTxOut (const CTxOut &txout, CAssetsCache *assetCache, std::string &strError) |
bool | ContextualCheckVerifierAssetTxOut (const CTxOut &txout, CAssetsCache *assetCache, std::string &strError) |
bool | ContextualCheckVerifierString (CAssetsCache *cache, const std::string &verifier, const std::string &check_address, std::string &strError, bool fWithTags) |
bool | ContextualCheckTransferAsset (CAssetsCache *assetCache, const CAssetTransfer &transfer, const std::string &address, std::string &strError) |
bool | CheckNewAsset (const CNewAsset &asset, std::string &strError) |
bool | ContextualCheckNewAsset (CAssetsCache *assetCache, const CNewAsset &asset, std::string &strError, bool fCheckMempool) |
bool | CheckReissueAsset (const CReissueAsset &asset, std::string &strError) |
bool | ContextualCheckReissueAsset (CAssetsCache *assetCache, const CReissueAsset &reissue_asset, std::string &strError, const CTransaction &tx) |
bool | ContextualCheckReissueAsset (CAssetsCache *assetCache, const CReissueAsset &reissue_asset, std::string &strError) |
bool | ContextualCheckUniqueAssetTx (CAssetsCache *assetCache, std::string &strError, const CTransaction &tx) |
bool | ContextualCheckUniqueAsset (CAssetsCache *assetCache, const CNewAsset &unique_asset, std::string &strError) |
Variables | |
std::map< uint256, std::string > | mapReissuedTx |
std::map< std::string, uint256 > | mapReissuedAssets |
#define OFFSET_FOUR 4 |
Definition at line 36 of file assets.cpp.
#define OFFSET_THREE 3 |
Definition at line 35 of file assets.cpp.
#define OFFSET_TWENTY_THREE 23 |
Definition at line 37 of file assets.cpp.
#define SIX_MONTHS 15780000 |
Definition at line 33 of file assets.cpp.
bool AssetFromScript | ( | const CScript & | scriptPubKey, |
CNewAsset & | assetNew, | ||
std::string & | strAddress | ||
) |
Definition at line 664 of file assets.cpp.
bool AssetFromTransaction | ( | const CTransaction & | tx, |
CNewAsset & | asset, | ||
std::string & | strAddress | ||
) |
These types of asset tx, have specific metadata at certain indexes in the transaction.
These functions pull data from the scripts at those indexes
Definition at line 525 of file assets.cpp.
bool AssetNullDataFromScript | ( | const CScript & | scriptPubKey, |
CNullAssetTxData & | assetData, | ||
std::string & | strAddress | ||
) |
Definition at line 815 of file assets.cpp.
bool AssetNullVerifierDataFromScript | ( | const CScript & | scriptPubKey, |
CNullAssetTxVerifierString & | verifierData | ||
) |
Definition at line 860 of file assets.cpp.
bool CheckAmountWithUnits | ( | const CAmount & | nAmount, |
const int8_t | nUnits | ||
) |
Checks the amount and units, and makes sure that the amount uses the correct decimals.
Definition at line 4277 of file assets.cpp.
bool CheckEncoded | ( | const std::string & | hash, |
std::string & | strError | ||
) |
Check the Encoded hash and make sure it is either an IPFS hash or a OIP hash.
Definition at line 4282 of file assets.cpp.
Check to make sure the script contains the burn transaction.
Definition at line 3005 of file assets.cpp.
bool CheckIssueDataTx | ( | const CTxOut & | txOut | ) |
issue asset scripts to make sure script meets the standards
Definition at line 3068 of file assets.cpp.
bool CheckNewAsset | ( | const CNewAsset & | asset, |
std::string & | strError | ||
) |
Definition at line 5105 of file assets.cpp.
bool CheckOwnerDataTx | ( | const CTxOut & | txOut | ) |
Definition at line 3085 of file assets.cpp.
bool CheckReissueAsset | ( | const CReissueAsset & | asset, |
std::string & | strError | ||
) |
--—— TESTNET ONLY ----—— ///
-----— TESTNET ONLY -------— ///
Definition at line 5232 of file assets.cpp.
bool CheckReissueBurnTx | ( | const CTxOut & | txOut | ) |
Check to make sure the script contains the reissue burn data.
Definition at line 3046 of file assets.cpp.
bool CheckReissueDataTx | ( | const CTxOut & | txOut | ) |
Definition at line 3077 of file assets.cpp.
bool CheckTransferOwnerTx | ( | const CTxOut & | txOut | ) |
Definition at line 3093 of file assets.cpp.
bool CheckVerifierAssetTxOut | ( | const CTxOut & | txout, |
std::string & | strError | ||
) |
Definition at line 4888 of file assets.cpp.
bool CheckVerifierString | ( | const std::string & | verifier, |
std::set< std::string > & | setFoundQualifiers, | ||
std::string & | strError, | ||
bool | fWithTags | ||
) |
Definition at line 4739 of file assets.cpp.
bool ContextualCheckGlobalAssetTxOut | ( | const CTxOut & | txout, |
CAssetsCache * | assetCache, | ||
std::string & | strError | ||
) |
Definition at line 4943 of file assets.cpp.
bool ContextualCheckNewAsset | ( | CAssetsCache * | assetCache, |
const CNewAsset & | asset, | ||
std::string & | strError, | ||
bool | fCheckMempool | ||
) |
Definition at line 5187 of file assets.cpp.
bool ContextualCheckNullAssetTxOut | ( | const CTxOut & | txout, |
CAssetsCache * | assetCache, | ||
std::string & | strError | ||
) |
Definition at line 4915 of file assets.cpp.
bool ContextualCheckReissueAsset | ( | CAssetsCache * | assetCache, |
const CReissueAsset & | reissue_asset, | ||
std::string & | strError, | ||
const CTransaction & | tx | ||
) |
Definition at line 5273 of file assets.cpp.
bool ContextualCheckReissueAsset | ( | CAssetsCache * | assetCache, |
const CReissueAsset & | reissue_asset, | ||
std::string & | strError | ||
) |
bool ContextualCheckTransferAsset | ( | CAssetsCache * | assetCache, |
const CAssetTransfer & | transfer, | ||
const std::string & | address, | ||
std::string & | strError | ||
) |
Definition at line 5036 of file assets.cpp.
bool ContextualCheckUniqueAsset | ( | CAssetsCache * | assetCache, |
const CNewAsset & | unique_asset, | ||
std::string & | strError | ||
) |
Definition at line 5437 of file assets.cpp.
bool ContextualCheckUniqueAssetTx | ( | CAssetsCache * | assetCache, |
std::string & | strError, | ||
const CTransaction & | tx | ||
) |
Definition at line 5416 of file assets.cpp.
bool ContextualCheckVerifierAssetTxOut | ( | const CTxOut & | txout, |
CAssetsCache * | assetCache, | ||
std::string & | strError | ||
) |
Definition at line 4960 of file assets.cpp.
bool ContextualCheckVerifierString | ( | CAssetsCache * | cache, |
const std::string & | verifier, | ||
const std::string & | check_address, | ||
std::string & | strError, | ||
bool | fWithTags | ||
) |
Definition at line 4979 of file assets.cpp.
bool CreateAssetTransaction | ( | CWallet * | pwallet, |
CCoinControl & | coinControl, | ||
const CNewAsset & | asset, | ||
const std::string & | address, | ||
std::pair< int, std::string > & | error, | ||
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRequired, | ||
std::string * | verifier_string | ||
) |
Creates new asset issuance transaction.
Definition at line 3745 of file assets.cpp.
bool CreateAssetTransaction | ( | CWallet * | pwallet, |
CCoinControl & | coinControl, | ||
const std::vector< CNewAsset > | assets, | ||
const std::string & | address, | ||
std::pair< int, std::string > & | error, | ||
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRequired, | ||
std::string * | verifier_string | ||
) |
bool CreateReissueAssetTransaction | ( | CWallet * | pwallet, |
CCoinControl & | coinControl, | ||
const CReissueAsset & | reissueAsset, | ||
const std::string & | address, | ||
std::pair< int, std::string > & | error, | ||
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRequired, | ||
std::string * | verifier_string | ||
) |
Create a reissue asset transaction.
Definition at line 3917 of file assets.cpp.
bool CreateTransferAssetTransaction | ( | CWallet * | pwallet, |
const CCoinControl & | coinControl, | ||
const std::vector< std::pair< CAssetTransfer, std::string > > | vTransfers, | ||
const std::string & | changeAddress, | ||
std::pair< int, std::string > & | error, | ||
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRequired, | ||
std::vector< std::pair< CNullAssetTxData, std::string > > * | nullAssetTxData, | ||
std::vector< CNullAssetTxData > * | nullGlobalRestrictionData | ||
) |
Create a transfer asset transaction.
Definition at line 4094 of file assets.cpp.
std::string DecodeAssetData | ( | std::string | encoded | ) |
Decode and Encode IPFS hashes, or OIP hashes.
Definition at line 3699 of file assets.cpp.
std::string DecodeIPFS | ( | std::string | encoded | ) |
Definition at line 3729 of file assets.cpp.
std::string EncodeAssetData | ( | std::string | decoded | ) |
Definition at line 3716 of file assets.cpp.
std::string EncodeIPFS | ( | std::string | decoded | ) |
Definition at line 3737 of file assets.cpp.
void ExtractVerifierStringQualifiers | ( | const std::string & | verifier, |
std::set< std::string > & | qualifiers, | ||
bool | fWithTag | ||
) |
Helper method for extracting #TAGS from a verifier string.
Definition at line 4709 of file assets.cpp.
CAmount GetAddNullQualifierTagBurnAmount | ( | ) |
Definition at line 3569 of file assets.cpp.
void GetAllAdministrativeAssets | ( | CWallet * | pwallet, |
std::vector< std::string > & | names, | ||
int | nMinConf | ||
) |
Definition at line 3499 of file assets.cpp.
bool GetAllMyAssetBalances | ( | std::map< std::string, std::vector< COutput > > & | outputs, |
std::map< std::string, CAmount > & | amounts, | ||
const int | confirmations, | ||
const std::string & | prefix | ||
) |
sets balances with the total quantity of each owned asset
Definition at line 3673 of file assets.cpp.
void GetAllMyAssets | ( | CWallet * | pwallet, |
std::vector< std::string > & | names, | ||
int | nMinConf, | ||
bool | fIncludeAdministrator, | ||
bool | fOnlyAdministrator | ||
) |
Definition at line 3507 of file assets.cpp.
bool GetAssetData | ( | const CScript & | script, |
CAssetOutputEntry & | data | ||
) |
Definition at line 3440 of file assets.cpp.
Definition at line 3435 of file assets.cpp.
bool GetAssetInfoFromScript | ( | const CScript & | scriptPubKey, |
std::string & | strName, | ||
CAmount & | nAmount | ||
) |
Definition at line 3423 of file assets.cpp.
bool GetBestAssetAddressAmount | ( | CAssetsCache & | cache, |
const std::string & | assetName, | ||
const std::string & | address | ||
) |
This will get the amount that an address for a certain asset contains from the database if they cache doesn't already have it.
Definition at line 3645 of file assets.cpp.
std::string GetBurnAddress | ( | const int | nType | ) |
Definition at line 3609 of file assets.cpp.
std::string GetBurnAddress | ( | const AssetType | type | ) |
Functions to be used to get access to the burn address for a given asset type issuance.
Definition at line 3614 of file assets.cpp.
CAmount GetBurnAmount | ( | const int | nType | ) |
Definition at line 3574 of file assets.cpp.
Definition at line 3579 of file assets.cpp.
CAmount GetIssueAssetBurnAmount | ( | ) |
Functions to be used to get access to the current burn amount required for specific asset issuance transactions.
Definition at line 3529 of file assets.cpp.
CAmount GetIssueMsgChannelAssetBurnAmount | ( | ) |
Definition at line 3549 of file assets.cpp.
CAmount GetIssueQualifierAssetBurnAmount | ( | ) |
Definition at line 3554 of file assets.cpp.
CAmount GetIssueRestrictedAssetBurnAmount | ( | ) |
Definition at line 3564 of file assets.cpp.
CAmount GetIssueSubAssetBurnAmount | ( | ) |
Definition at line 3539 of file assets.cpp.
CAmount GetIssueSubQualifierAssetBurnAmount | ( | ) |
Definition at line 3559 of file assets.cpp.
CAmount GetIssueUniqueAssetBurnAmount | ( | ) |
Definition at line 3544 of file assets.cpp.
std::string GetParentName | ( | const std::string & | name | ) |
Get the root name of an asset.
Definition at line 366 of file assets.cpp.
CAmount GetReissueAssetBurnAmount | ( | ) |
Definition at line 3534 of file assets.cpp.
std::string GetStrippedVerifierString | ( | const std::string & | verifier | ) |
Definition at line 4728 of file assets.cpp.
void GetTxOutAssetTypes | ( | const std::vector< CTxOut > & | vout, |
int & | issues, | ||
int & | reissues, | ||
int & | transfers, | ||
int & | owners | ||
) |
std::string GetUniqueAssetName | ( | const std::string & | parent, |
const std::string & | tag | ||
) |
Build a unique asset buy giving the root name, and the tag name (ROOT, TAG) => ROOT::TAG.
Definition at line 399 of file assets.cpp.
bool GlobalAssetNullDataFromScript | ( | const CScript & | scriptPubKey, |
CNullAssetTxData & | assetData | ||
) |
Definition at line 840 of file assets.cpp.
bool IsAssetNameAnMsgChannel | ( | const std::string & | name | ) |
Check if an asset is a message channel.
Definition at line 311 of file assets.cpp.
bool IsAssetNameAnOwner | ( | const std::string & | name | ) |
Check if an asset is an owner.
Definition at line 296 of file assets.cpp.
bool IsAssetNameAnRestricted | ( | const std::string & | name | ) |
Check if an asset is a restricted asset.
Definition at line 301 of file assets.cpp.
bool IsAssetNameAQualifier | ( | const std::string & | name | ) |
Check if an asset is a qualifier asset or sub qualifier.
Definition at line 306 of file assets.cpp.
bool IsAssetNameASubasset | ( | const std::string & | name | ) |
Definition at line 186 of file assets.cpp.
bool IsAssetNameASubQualifier | ( | const std::string & | name | ) |
Check if an asset is a sub qualifier.
Definition at line 196 of file assets.cpp.
bool IsAssetNameValid | ( | const std::string & | name, |
AssetType & | assetType, | ||
std::string & | error | ||
) |
bool IsAssetNameValid | ( | const std::string & | name | ) |
Check is an asset name is valid, and being able to return the asset type if needed.
Definition at line 283 of file assets.cpp.
bool IsAssetNameValid | ( | const std::string & | name, |
AssetType & | assetType | ||
) |
bool IsMsgChannelTagValid | ( | const std::string & | tag | ) |
Definition at line 136 of file assets.cpp.
bool IsNameValidBeforeTag | ( | const std::string & | name | ) |
Definition at line 144 of file assets.cpp.
bool IsNewOwnerTxValid | ( | const CTransaction & | tx, |
const std::string & | assetName, | ||
const std::string & | address, | ||
std::string & | errorMsg | ||
) |
Definition at line 596 of file assets.cpp.
bool IsQualifierNameValid | ( | const std::string & | name | ) |
bool IsQualifierNameValidBeforeTag | ( | const std::string & | name | ) |
Definition at line 162 of file assets.cpp.
bool IsRestrictedNameValid | ( | const std::string & | name | ) |
Definition at line 101 of file assets.cpp.
bool IsRootNameValid | ( | const std::string & | name | ) |
Definition at line 83 of file assets.cpp.
bool IsScriptNewAsset | ( | const CScript & | scriptPubKey | ) |
Check script and see if it matches the asset issuance template.
Definition at line 3101 of file assets.cpp.
bool IsScriptNewAsset | ( | const CScript & | scriptPubKey, |
int & | nStartingIndex | ||
) |
bool IsScriptNewMsgChannelAsset | ( | const CScript & | scriptPubKey | ) |
Check script and see if it matches the message channel issuance template.
Definition at line 3142 of file assets.cpp.
bool IsScriptNewMsgChannelAsset | ( | const CScript & | scriptPubKey, |
int & | nStartingIndex | ||
) |
bool IsScriptNewQualifierAsset | ( | const CScript & | scriptPubKey | ) |
Check script and see if it matches the qualifier issuance template.
Definition at line 3219 of file assets.cpp.
bool IsScriptNewQualifierAsset | ( | const CScript & | scriptPubKey, |
int & | nStartingIndex | ||
) |
bool IsScriptNewRestrictedAsset | ( | const CScript & | scriptPubKey | ) |
Check script and see if it matches the restricted issueance template.
Definition at line 3244 of file assets.cpp.
bool IsScriptNewRestrictedAsset | ( | const CScript & | scriptPubKey, |
int & | nStartingIndex | ||
) |
bool IsScriptNewUniqueAsset | ( | const CScript & | scriptPubKey | ) |
Check script and see if it matches the unquie issuance template.
Definition at line 3117 of file assets.cpp.
bool IsScriptNewUniqueAsset | ( | const CScript & | scriptPubKey, |
int & | nStartingIndex | ||
) |
bool IsScriptOwnerAsset | ( | const CScript & | scriptPubKey | ) |
Check script and see if it matches the owner issuance template.
Definition at line 3167 of file assets.cpp.
bool IsScriptOwnerAsset | ( | const CScript & | scriptPubKey, |
int & | nStartingIndex | ||
) |
bool IsScriptReissueAsset | ( | const CScript & | scriptPubKey | ) |
Check script and see if it matches the reissue template.
Definition at line 3185 of file assets.cpp.
bool IsScriptReissueAsset | ( | const CScript & | scriptPubKey, |
int & | nStartingIndex | ||
) |
bool IsScriptTransferAsset | ( | const CScript & | scriptPubKey | ) |
Check script and see if it matches the transfer asset template.
Definition at line 3202 of file assets.cpp.
bool IsScriptTransferAsset | ( | const CScript & | scriptPubKey, |
int & | nStartingIndex | ||
) |
bool IsSubNameValid | ( | const std::string & | name | ) |
Definition at line 118 of file assets.cpp.
bool IsSubQualifierNameValid | ( | const std::string & | name | ) |
Definition at line 110 of file assets.cpp.
bool IsTypeCheckNameValid | ( | const AssetType | type, |
const std::string & | name, | ||
std::string & | error | ||
) |
Given a type, and an asset name, return if that name is valid based on the type.
Definition at line 317 of file assets.cpp.
bool IsUniqueTagValid | ( | const std::string & | tag | ) |
Check if an unique tagname is valid.
Definition at line 126 of file assets.cpp.
bool IsVoteTagValid | ( | const std::string & | tag | ) |
Definition at line 131 of file assets.cpp.
bool MsgChannelAssetFromScript | ( | const CScript & | scriptPubKey, |
CNewAsset & | assetNew, | ||
std::string & | strAddress | ||
) |
Definition at line 689 of file assets.cpp.
bool MsgChannelAssetFromTransaction | ( | const CTransaction & | tx, |
CNewAsset & | asset, | ||
std::string & | strAddress | ||
) |
Definition at line 537 of file assets.cpp.
bool OwnerAssetFromScript | ( | const CScript & | scriptPubKey, |
std::string & | assetName, | ||
std::string & | strAddress | ||
) |
Definition at line 764 of file assets.cpp.
bool OwnerFromTransaction | ( | const CTransaction & | tx, |
std::string & | ownerName, | ||
std::string & | strAddress | ||
) |
Definition at line 626 of file assets.cpp.
bool ParseAssetScript | ( | CScript | scriptPubKey, |
uint160 & | hashBytes, | ||
std::string & | assetName, | ||
CAmount & | assetAmount | ||
) |
Helper method for extracting address bytes, asset name and amount from an asset script.
Definition at line 4317 of file assets.cpp.
bool QualifierAssetFromScript | ( | const CScript & | scriptPubKey, |
CNewAsset & | assetNew, | ||
std::string & | strAddress | ||
) |
Definition at line 714 of file assets.cpp.
bool QualifierAssetFromTransaction | ( | const CTransaction & | tx, |
CNewAsset & | asset, | ||
std::string & | strAddress | ||
) |
Definition at line 549 of file assets.cpp.
bool ReissueAssetFromScript | ( | const CScript & | scriptPubKey, |
CReissueAsset & | reissue, | ||
std::string & | strAddress | ||
) |
Definition at line 789 of file assets.cpp.
bool ReissueAssetFromTransaction | ( | const CTransaction & | tx, |
CReissueAsset & | reissue, | ||
std::string & | strAddress | ||
) |
Definition at line 572 of file assets.cpp.
bool RestrictedAssetFromScript | ( | const CScript & | scriptPubKey, |
CNewAsset & | assetNew, | ||
std::string & | strAddress | ||
) |
Definition at line 739 of file assets.cpp.
bool RestrictedAssetFromTransaction | ( | const CTransaction & | tx, |
CNewAsset & | asset, | ||
std::string & | strAddress | ||
) |
Definition at line 560 of file assets.cpp.
bool SendAssetTransaction | ( | CWallet * | pwallet, |
CWalletTx & | transaction, | ||
CReserveKey & | reserveKey, | ||
std::pair< int, std::string > & | error, | ||
std::string & | txid | ||
) |
Send any type of asset transaction to the network.
Definition at line 4243 of file assets.cpp.
bool TransferAssetFromScript | ( | const CScript & | scriptPubKey, |
CAssetTransfer & | assetTransfer, | ||
std::string & | strAddress | ||
) |
Get specific asset type metadata from the given scripts.
Definition at line 638 of file assets.cpp.
bool UniqueAssetFromTransaction | ( | const CTransaction & | tx, |
CNewAsset & | asset, | ||
std::string & | strAddress | ||
) |
Definition at line 584 of file assets.cpp.
bool VerifyGlobalRestrictedChange | ( | CAssetsCache & | cache, |
const CNullAssetTxData & | data, | ||
std::string & | strError | ||
) |
Definition at line 4858 of file assets.cpp.
bool VerifyNullAssetDataFlag | ( | const int & | flag, |
std::string & | strError | ||
) |
Helper methods that validate changes to null asset data transaction databases.
Definition at line 4796 of file assets.cpp.
bool VerifyQualifierChange | ( | CAssetsCache & | cache, |
const CNullAssetTxData & | data, | ||
const std::string & | address, | ||
std::string & | strError | ||
) |
Definition at line 4807 of file assets.cpp.
bool VerifyRestrictedAddressChange | ( | CAssetsCache & | cache, |
const CNullAssetTxData & | data, | ||
const std::string & | address, | ||
std::string & | strError | ||
) |
Definition at line 4831 of file assets.cpp.
bool VerifyWalletHasAsset | ( | const std::string & | asset_name, |
std::pair< int, std::string > & | pairError | ||
) |
Verifies that this wallet owns the give asset.
Definition at line 4255 of file assets.cpp.
std::map<std::string, uint256> mapReissuedAssets |
Definition at line 41 of file assets.cpp.
std::map<uint256, std::string> mapReissuedTx |
Definition at line 40 of file assets.cpp.