Browse Source

Test

pull/4/head
jl777 6 years ago
parent
commit
5cf0c1db94
  1. 6
      src/cc/CCassets.h
  2. 11
      src/cc/CCutils.cpp

6
src/cc/CCassets.h

@ -13,7 +13,6 @@
* *
******************************************************************************/
#include "CCinclude.h"
/*
CCassetstx has the functions that create the EVAL_ASSETS transactions. It is expected that rpc calls would call these functions. For EVAL_ASSETS, the rpc functions are in rpcwallet.cpp
@ -24,6 +23,11 @@
#ifndef CC_ASSETS_H
#define CC_ASSETS_H
#include "CCinclude.h"
extern const char *AssetsCCaddr;
extern char AssetsCChexstr[67];
// CCassetsCore
CScript EncodeAssetCreateOpRet(uint8_t funcid,std::vector<uint8_t> origpubkey,std::string name,std::string description);
CScript EncodeAssetOpRet(uint8_t funcid,uint256 assetid,uint256 assetid2,uint64_t price,std::vector<uint8_t> origpubkey);

11
src/cc/CCutils.cpp

@ -78,6 +78,17 @@ uint256 Parseuint256(char *hexstr)
return(txid);
}
CPubKey pubkey2pk(std::vector<uint8_t> pubkey)
{
CPubKey pk; int32_t i,n; uint8_t *dest,*pubkey33;
n = pubkey.size();
dest = (uint8_t *)pk.begin();
pubkey33 = (uint8_t *)pubkey.data();
for (i=0; i<n; i++)
dest[i] = pubkey33[i];
return(pk);
}
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
{
CTxDestination address; txnouttype whichType;

Loading…
Cancel
Save