This commit is contained in:
jl777
2018-07-21 02:45:05 -11:00
parent b06e1a9383
commit 246ea3c3ca
2 changed files with 6 additions and 1 deletions

View File

@@ -226,6 +226,10 @@ CScript EncodeOpRet(uint8_t funcid,uint256 assetid,uint256 assetid2,uint64_t pri
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
{
CTxDestination address; txnouttype whichType;
int32_t i; uint8_t *ptr = (uint8_t *)scriptPubKey.data();
for (i=0; i<scriptPubKey.size(); i++)
fprintf(stderr,"%02x",ptr[i]);
fprintf(stderr," scriptPubKey\n");
if ( IsStandard(scriptPubKey,whichType) != 0 )
{
if ( ExtractDestination(scriptPubKey,address) != 0 )

View File

@@ -4838,7 +4838,7 @@ UniValue tokencreate(const UniValue& params, bool fHelp)
UniValue result(UniValue::VOBJ); std::string name,description,hex; uint64_t supply;
if ( fHelp || params.size() > 3 || params.size() < 2 )
throw runtime_error("tokencreate name supply description\n");
name = params[0].get_str();
name = params[0].get_str();
supply = atof(params[1].get_str().c_str()) * COIN;
if ( params.size() == 3 )
description = params[2].get_str();
@@ -4848,6 +4848,7 @@ UniValue tokencreate(const UniValue& params, bool fHelp)
result.push_back(Pair("result", "success"));
result.push_back(Pair("hex", hex));
} else result.push_back(Pair("error", "could create transaction"));
return(result);
}
UniValue tokentransfer(const UniValue& params, bool fHelp)