Merge pull request #1241 from dimxy/nonfungible-opret-fix

Burn support for non-fungible tokens
This commit is contained in:
jl777
2019-02-11 13:37:24 -11:00
committed by GitHub
7 changed files with 146 additions and 13 deletions

View File

@@ -747,6 +747,8 @@ UniValue rogue_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
return(cclib_error(result,"couldnt find enough normal funds for buyin"));
if ( playertxid != zeroid )
AddNormalinputs2(mtx,txfee,10);
if (playertxid != zeroid)
mtx.vin.push_back(CTxIn(playertxid, 1)); // spending cc marker as token is being burned
mtx.vout.push_back(MakeCC1of2vout(cp->evalcode,buyin + inputsum - txfee,roguepk,mypk));
GetCCaddress1of2(cp,destaddr,roguepk,roguepk);
CCaddr1of2set(cp,roguepk,roguepk,cp->CCpriv,destaddr);