From 2e40a4d70688e040b4e1cb6aa584eb0f2277a373 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 26 Aug 2018 23:50:07 -1100 Subject: [PATCH] Update assets doc --- src/assetchains.old | 4 --- src/cc/CC made easy | 67 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 4 deletions(-) diff --git a/src/assetchains.old b/src/assetchains.old index a11846b23..d7a18811d 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -38,8 +38,4 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=RFOX -ac_supply=1000000000 -ac_reward=100000000 -addnode=78.47.196.146 & ~/VerusCoin/src/komodod -pubkey=$pubkey -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_veruspos=50 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -addnode=185.25.48.236 -addnode=185.64.105.111 & ./komodod -pubkey=$pubkey -ac_name=SEC -ac_cc=333 -ac_supply=1000000000 -addnode=185.148.145.43 & -<<<<<<< HEAD -./komodod -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 & -======= ./komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 & ->>>>>>> jl777 diff --git a/src/cc/CC made easy b/src/cc/CC made easy index 596b10bde..94756ef54 100644 --- a/src/cc/CC made easy +++ b/src/cc/CC made easy @@ -312,8 +312,75 @@ In the future, it is expected that a token swap rpc can be supported to allow di With just these rpc calls and associated validation, we get the ability to issue tokens and trade them on a DEX! +create +vin.0: normal input +vout.0: issuance assetoshis to CC +vout.1: tag sent to normal address of AssetsCCaddress +vout.2: normal output for change (if any) +vout.n-1: opreturn [EVAL_ASSETS] ['c'] [origpubkey] "" "" + +transfer +vin.0: normal input +vin.1 .. vin.n-1: valid CC outputs +vout.0 to n-2: assetoshis output to CC +vout.n-2: normal output for change (if any) +vout.n-1: opreturn [EVAL_ASSETS] ['t'] [assetid] + +buyoffer: +vins.*: normal inputs (bid + change) +vout.0: amount of bid to unspendable +vout.1: normal output for change (if any) +vout.n-1: opreturn [EVAL_ASSETS] ['b'] [assetid] [amount of asset required] [origpubkey] + +cancelbuy: +vin.0: normal input +vin.1: unspendable.(vout.0 from buyoffer) buyTx.vout[0] +vout.0: vin.1 value to original pubkey buyTx.vout[0].nValue -> [origpubkey] +vout.1: normal output for change (if any) +vout.n-1: opreturn [EVAL_ASSETS] ['o'] [assetid] + +fillbuy: +vin.0: normal input +vin.1: unspendable.(vout.0 from buyoffer) buyTx.vout[0] +vin.2+: valid CC output satisfies buyoffer (*tx.vin[2])->nValue +vout.0: remaining amount of bid to unspendable +vout.1: vin.1 value to signer of vin.2 +vout.2: vin.2 assetoshis to original pubkey +vout.3: CC output for assetoshis change (if any) +vout.4: normal output for change (if any) +vout.n-1: opreturn [EVAL_ASSETS] ['B'] [assetid] [remaining asset required] [origpubkey] + +selloffer: +vin.0: normal input +vin.1+: valid CC output for sale +vout.0: vin.1 assetoshis output to CC to unspendable +vout.1: CC output for change (if any) +vout.2: normal output for change (if any) +vout.n-1: opreturn [EVAL_ASSETS] ['s'] [assetid] [amount of native coin required] [origpubkey] + +cancel: +vin.0: normal input +vin.1: unspendable.(vout.0 from exchange or selloffer) sellTx/exchangeTx.vout[0] inputTx +vout.0: vin.1 assetoshis to original pubkey CC sellTx/exchangeTx.vout[0].nValue -> [origpubkey] +vout.1: normal output for change (if any) +vout.n-1: opreturn [EVAL_ASSETS] ['x'] [assetid] + +fillsell: +vin.0: normal input +vin.1: unspendable.(vout.0 assetoshis from selloffer) sellTx.vout[0] +vin.2+: normal output that satisfies selloffer (*tx.vin[2])->nValue +vout.0: remaining assetoshis -> unspendable +vout.1: vin.1 assetoshis to signer of vin.2 sellTx.vout[0].nValue -> any +vout.2: vin.2 value to original pubkey [origpubkey] +vout.3: CC asset for change (if any) +vout.4: CC asset2 for change (if any) 'E' only +vout.5: normal output for change (if any) +vout.n-1: opreturn [EVAL_ASSETS] ['S'] [assetid] [amount of coin still required] [origpubkey] + Chapter 9 - dice example + Chapter 10 - lotto example + Chapter 11 - channels example Chapter 12 - limitless possibilities