#UPDATE-BITSHARES-How to creating a new UIA [ASSET] Manually

in #bitshares8 years ago

 CREATING AN ASSET

<p dir="auto">Of course a UIA can also be created <em>manually by means of the <a href="http://docs.bitshares.org/integration/apps/cliwallet.html" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">CLI Wallet command:  <pre><code><strong>>>> create_asset <issuer> <symbol> <precision> <options> {} false <p dir="auto"> <em><strong>Note : <em>A false at the end allows to check and verify the constructed transaction and does <em><strong>not<em> broadcast it. The empty {} could be used to construct a <a href="http://docs.bitshares.org/bitshares/user/mpa.html" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link"><em>Market Pegged Assets<em> and is subject of another tutorial.  <p dir="auto"> <strong>PARAMETERS <p dir="auto">The precision can any positive integer starting from 0. As options we pass a JSON object that can contain these settings:  <pre><code>{<br />   "max_supply" : 10000,    # Integer in satoshi! (100 for precision 1 and max 10)<br />   "market_fee_percent" : 0.3,<br />   "max_market_fee" : 1000, # in satoshi<br />   "issuer_permissions" : <permissions>,<br />   "flags" : <flags>,<br />   "core_exchange_rate" : {<br />       "base": {<br />         "amount": 21,           # denominator<br />         "asset_id": "1.3.0"     # BTS<br />       },<br />       "quote": {<br />         "amount": 76399,        # numerator<br />         "asset_id": "1.3.1"     # !THIS! asset<br />       }<br />   },<br />   "whitelist_authorities" : [],<br />   "blacklist_authorities" : [],<br />   "whitelist_markets" : [],<br />   "blacklist_markets" : [],<br />   "description" : "My fancy description"<br /> }<br /> <p dir="auto">The flags are construction as an JSON object containing these flags/permissions (see <a href="http://docs.bitshares.org/bitshares/user/assets-faq.html" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Assets FAQ): <pre><code>{<br />   "charge_market_fee" : <strong>true,<br />   "white_list" : <strong>true,<br />   "override_authority" : <strong>true,<br />   "transfer_restricted" : <strong>true,<br />   "disable_force_settle" : <strong>true,<br />   "global_settle" : <strong>true,<br />   "disable_confidential" : <strong>true,<br />   "witness_fed_asset" : <strong>true,<br />   "committee_fed_asset" : <strong>true<br /> }<br /> <p dir="auto">Permissions and flags are modelled as sum of binary flags (see example below)White-listing is described in more detail in <a href="http://docs.bitshares.org/integration/asset-whitelist.html" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Asset User Whitelists.  <p dir="auto"> <strong>ISSUING SHARES <p dir="auto">After creation of the asset, no shares will be in existence until they are issued by the issuer: <pre><code>issue_asset <account> <amount> <symbol> <memo> <strong>True<br /> <h2><strong>PYTHON EXAMPLE <pre><code><strong>from <strong>grapheneapi <strong>import GrapheneClient<br /> <strong>import <strong>json<br /> <br /> perm = {}<br /> perm["charge_market_fee"] = 0x01<br /> perm["white_list"] = 0x02<br /> perm["override_authority"] = 0x04<br /> perm["transfer_restricted"] = 0x08<br /> perm["disable_force_settle"] = 0x10<br /> perm["global_settle"] = 0x20<br /> perm["disable_confidential"] = 0x40<br /> perm["witness_fed_asset"] = 0x80<br /> perm["committee_fed_asset"] = 0x100<br /> <br /> <br /> <strong>class <strong>Config():<br />    wallet_host           = "localhost"<br />    wallet_port           = 8092<br />    wallet_user           = ""<br />    wallet_password       = ""<br /> <br /> <strong>if __name__ == '__main__':<br />    graphene = GrapheneClient(Config)<br /> <br />    permissions = {"charge_market_fee" : True,<br />                   "white_list" : True,<br />                   "override_authority" : True,<br />                   "transfer_restricted" : True,<br />                   "disable_force_settle" : True,<br />                   "global_settle" : True,<br />                   "disable_confidential" : True,<br />                   "witness_fed_asset" : True,<br />                   "committee_fed_asset" : True,<br />                   }<br />    flags       = {"charge_market_fee" : False,<br />                   "white_list" : False,<br />                   "override_authority" : False,<br />                   "transfer_restricted" : False,<br />                   "disable_force_settle" : False,<br />                   "global_settle" : False,<br />                   "disable_confidential" : False,<br />                   "witness_fed_asset" : False,<br />                   "committee_fed_asset" : False,<br />                   }<br />    permissions_int = 0<br />    <strong>for p <strong>in permissions :<br />        <strong>if permissions[p]:<br />            permissions_int += perm[p]<br />    flags_int = 0<br />    <strong>for p <strong>in permissions :<br />        <strong>if flags[p]:<br />            flags_int += perm[p]<br />    options = {"max_supply" : 10000,<br />               "market_fee_percent" : 0,<br />               "max_market_fee" : 0,<br />               "issuer_permissions" : permissions_int,<br />               "flags" : flags_int,<br />               "core_exchange_rate" : {<br />                   "base": {<br />                       "amount": 10,<br />                       "asset_id": "1.3.0"},<br />                   "quote": {<br />                       "amount": 10,<br />                       "asset_id": "1.3.1"}},<br />               "whitelist_authorities" : [],<br />               "blacklist_authorities" : [],<br />               "whitelist_markets" : [],<br />               "blacklist_markets" : [],<br />               "description" : "My fancy description"<br />               }<br /> <br />    tx = graphene.rpc.create_asset("nathan", "SYMBOL", 3, options, {}, True)<br />    <strong>print(json.dumps(tx, indent=4)) <p dir="auto"><em><span>source : <a href="http://docs.bitshares.org/bitshares/tutorials/uia-create-manual.html" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">http://docs.bitshares.org/bitshares/tutorials/uia-create-manual.html <p dir="auto"><span><a href="/trending/bitshares">#bitshares <a href="/trending/asset"> #asset <a href="/trending/uia"> #UIA
Sort:  

This is why i cant create token in bitshare
But I should,