create account

Proposal #39 - DevPortal Documentation Update - SMT Research by inertia

View this thread on steemit.com
· @inertia · (edited)
$6.28
Proposal #39 - DevPortal Documentation Update - SMT Research
<div class="pull-right">
<img src="https://developers.steem.io/images/hero.png" />
</div>

No documentation pull requests this week.  [Some work is ready](https://github.com/inertia186/devportal/projects/2) but I thought I'd hold off until I had more to submit at once.  I spent most of my time continuing to [researching SMTs](/@inertia/proposal-39-devportal-documentation-update-pull-requests-and-smt-documentation-stubs), thanks this week's [testnet launch by Steemit, Inc.](/@steemitblog/smt-testnet-is-live)

**TL;DR:** My research process works and I have high confidence in the detail I can gather from code.

---

In fact, while I was fiddling with the testnet, I managed to create an SMT.  It's nothing special.  Just a single operation to define the asset and park it.  I wanted to make sure my research process was accurate.  This is because I'm primarily reading the source code to translate it to the devportal for more detailed API definitions.

Once I figured out how to create an SMT, I tried broadcasting it.  But I found a bug:

```json
{"error":"network_broadcast_api.broadcast_transaction: Assert Exception:symbol.decimals() == precision: Mismatch between redundantly provided precision 3 vs 0"}
```

At first, I thought the bug was in my broadcast.  But it turns out, the bug was in `steemd`.  Apparently, there was no way to express asset precision in a broadcast other than zero precision.  The blockchain supports non-zero precision.  It probably works when you use the CLI wallet, though I didn't test that specifically.  But when you used a normal signed broadcast, it didn't pick up the precision I wanted.

In order to test this, I tried setting both redundant precision op values to zero, which worked.  I managed to create an SMT with zero precision, meaning it would only allow non-fractional amounts.  But I know people are going primarily to want to have fractional amounts, so I created a pull request to fix `steemd`.  It's my first `steemd` contribution:

https://github.com/steemit/steem/pull/3537

It's not complicated at all, just a simple fix to a one-line oversight.  And in researching this, I found out that you can also *change* precision for an existing SMT, so long as you use a fee to zero and have not yet issued any emissions for the SMT asset.

---

Here's my SMT, currently in testnet block [# 225263](https://testnet.steemd.com/b/225263):

```bash
curl -s --data '{
  "jsonrpc": "2.0",
  "method": "database_api.list_smt_tokens",
  "params":{"start":{},"limit":10,"order":"by_symbol"},
  "id":1
}' https://testnet.steemitdev.com | jq
```

```json
{
  "jsonrpc": "2.0",
  "result": {
    "tokens": [
      {
        "token": {
          "id": 0,
          "liquid_symbol": {
            "nai": "@@422838704",
            "decimals": 0
          },
          "control_account": "inertia",
          "phase": "setup",
          "current_supply": 0,
          "total_vesting_fund_smt": 0,
          "total_vesting_shares": 0,
          "total_vesting_fund_ballast": 0,
          "total_vesting_shares_ballast": 0,
          "pending_rewarded_vesting_shares": 0,
          "pending_rewarded_vesting_smt": 0,
          "reward_balance": {
            "amount": "0",
            "precision": 3,
            "nai": "@@000000021"
          },
          "recent_claims": "0",
          "last_reward_update": "1970-01-01T00:00:00",
          "last_virtual_emission_time": "1970-01-01T00:00:00",
          "allow_downvotes": true,
          "market_maker": {
            "steem_balance": {
              "amount": "0",
              "precision": 3,
              "nai": "@@000000021"
            },
            "token_balance": {
              "amount": "0",
              "precision": 0,
              "nai": "@@422838704"
            },
            "reserve_ratio": 0
          },
          "allow_voting": true,
          "cashout_window_seconds": 3600,
          "reverse_auction_window_seconds": 900,
          "vote_regeneration_period_seconds": 432000,
          "votes_per_regeneration_period": 50,
          "content_constant": "2000000000000",
          "percent_curation_rewards": 2500,
          "author_reward_curve": "linear",
          "curation_reward_curve": "square_root",
          "max_supply": 0
        }
      }
    ]
  },
  "id": 1
}
```
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 67 others
👎  , ,
properties (23)
post_id80,999,033
authorinertia
permlinkproposal-39-devportal-documentation-update-smt-research
categorysteemdao
json_metadata{"app":"steemit\/0.1","format":"markdown","tags":["smt","devportal","palnet","neoxian"],"links":["https:\/\/github.com\/inertia186\/devportal\/projects\/2","\/@inertia\/proposal-39-devportal-documentation-update-pull-requests-and-smt-documentation-stubs","\/@steemitblog\/smt-testnet-is-live","https:\/\/github.com\/steemit\/steem\/pull\/3537","https:\/\/testnet.steemd.com\/b\/225263"],"image":["https:\/\/developers.steem.io\/images\/hero.png"]}
created2019-10-18 18:32:39
last_update2019-10-19 03:58:33
depth0
children5
net_rshares22,931,900,998,736
last_payout2019-10-25 18:32:39
cashout_time1969-12-31 23:59:59
total_payout_value3.244 SBD
curator_payout_value3.039 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length4,301
author_reputation186,685,725,170,609
root_title"Proposal #39 - DevPortal Documentation Update - SMT Research"
beneficiaries
0.
accountsteempeak
weight500
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (134)
@tytran ·
![inertiasteemdevtemplate.png](https://files.steempeak.com/file/steempeak/tytran/6HpxrSzS-inertiasteemdevtemplate.png)

upvoted, resteemed and i made a little image template for you personalized for your work :) 
👍  
properties (23)
post_id81,001,168
authortytran
permlinkre-inertia-pzl7e0
categorysteemdao
json_metadata{"tags":["steemdao"],"app":"steempeak\/1.18.0"}
created2019-10-18 20:25:12
last_update2019-10-18 20:25:12
depth1
children0
net_rshares29,272,146,908
last_payout2019-10-25 20:25:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length212
author_reputation1,659,586,907,437
root_title"Proposal #39 - DevPortal Documentation Update - SMT Research"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @inertia! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://steemitimages.com/60x70/http://steemitboard.com/@inertia/votes.png?201910190620"></td><td>You distributed more than 27000 upvotes. Your next target is to reach 28000 upvotes.</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@inertia) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=inertia)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>


To support your work, I also upvoted your post!


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
post_id81,011,302
authorsteemitboard
permlinksteemitboard-notify-inertia-20191019t065702000z
categorysteemdao
json_metadata{"image":["https:\/\/steemitboard.com\/img\/notify.png"]}
created2019-10-19 06:57:03
last_update2019-10-19 06:57:03
depth1
children0
net_rshares0
last_payout2019-10-26 06:57:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length895
author_reputation34,408,573,382,651
root_title"Proposal #39 - DevPortal Documentation Update - SMT Research"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steem-plus ·
SteemPlus upvote
Hi, @inertia!

You just got a **0.98%** upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in [here](https://steemit.com/@steem-plus) to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
properties (22)
post_id81,019,286
authorsteem-plus
permlinkproposal-39-devportal-documentation-update-smt-research---vote-steemplus
categorysteemdao
json_metadata{}
created2019-10-19 13:39:54
last_update2019-10-19 13:39:54
depth1
children0
net_rshares0
last_payout2019-10-26 13:39:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length434
author_reputation212,161,543,689,268
root_title"Proposal #39 - DevPortal Documentation Update - SMT Research"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@pennsif ·
This post has been included in the latest edition of  [**The Steem News**](https://steemit.com/steem/@pennsif/the-steem-news-19-october-2019) - a compilation of the key news stories on the Steem blockchain.
properties (22)
post_id81,033,242
authorpennsif
permlinkpznisk
categorysteemdao
json_metadata{"links":["https:\/\/steemit.com\/steem\/@pennsif\/the-steem-news-19-october-2019"],"app":"steemit\/0.1"}
created2019-10-20 02:26:45
last_update2019-10-20 02:26:45
depth1
children0
net_rshares0
last_payout2019-10-27 02:26:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length206
author_reputation414,741,770,948,764
root_title"Proposal #39 - DevPortal Documentation Update - SMT Research"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@jacobyu ·
Hi! Thank you for your hard works.

you created SMT token! 
Do you have a plan to write a tutorial for creating SMT token? 
I am looking forward to create my own SMT token!
properties (22)
post_id81,068,145
authorjacobyu
permlinkre-inertia-pzpu4j
categorysteemdao
json_metadata{"tags":["steemdao"],"app":"steempeak\/1.18.0"}
created2019-10-21 08:26:45
last_update2019-10-21 08:26:45
depth1
children0
net_rshares0
last_payout2019-10-28 08:26:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length172
author_reputation50,118,723,362,727
root_title"Proposal #39 - DevPortal Documentation Update - SMT Research"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000