BlockPo / BlockPo-to-Tradelayer

Incubation Repo for the TradeLayer protocol, 0.2.0
http://www.tradelayer.org
Other
8 stars 8 forks source link

Identifying Native Contracts, Native Coins, Oracle Contracts and Issued Tokens as Categories #346

Closed patrickdugan closed 3 years ago

patrickdugan commented 4 years ago

In addition to the elaborate ticket for the Oracle release regarding how futures contracts' property id's work, here's a reallly simple thing that will make the listproperties call return much more parse-able data without having to pass every single id through the getContractInfo call: have Category default to one of the 4 types: Native Contracts, Native Coins, Oracle Contracts and Issued Tokens. That would mean disabling the Category parameter for issueFixed and issueManaged since we'll have these canonical categories. There are different tx types relating to these tokens and there are very few native coins, just ALL, Vesting Tokens, sLTC, USDL, EURL, JPYL, CNYL. There are somewhat more native contracts. Oracles and tokens have well defined tx associated with their creation. Therefore labeling these by category in list properties makes sense.

patrickdugan commented 3 years ago

We could cut this if it's too much trouble, but it seems like the easiest thing is to just "hardcode" these strings into the Category part of the first few dozen property ids and assign Oracle Contracts and Issued Tokens as the default category for issued things.

patrickdugan commented 3 years ago

Maybe it's even too late to do that since we already published a property list? I'm ok with cutting.

santos177 commented 3 years ago

for now we have properties and contracts separated. You can have now propertyId=1 and also contractId=1. We are listing contract in a different level db struct. Working on it using futures-01 branch. We can also add categories in builder txs, like always.