Creating a fixed supply smart property

A fixed issuance creates a smart property that has a fixed supply at the start that cannot be changed later.

To create a new token you need a legacy or P2SH-SegWit address to be used as the issuer address, for reference a legacy address begins with a 6 or 7 and a P2SH-SegWit address begins with a 3. The getnewaddress command will generate P2SH-SegWit addresses by default and can also be used to generate a legacy address. This is the address that will own all the initial tokens created.

Creating a smart property with a fixed supply involves creating a fixed issuance transaction that will be parsed by the OmniLayer protocol resulting in a new smart property being created. The issuing address needs enough feathercoin to pay the cost of the transaction fee, any funds used on the transaction over the fee will be returned to the issuing address.

The command to create a fixed issuance transaction either remotely or in Feathercoin’s user interface console is omni_sendissuancefixed, for demonstration purposes the user interface console is shown in the examples below.

The arguments to omni_sendissuancefixed are as follows:

  • fromaddress – This is the address that will issue and hold all initially created tokens.
  • ecosystem – 1 for main and 2 for test ecosystem.
  • type – 1 for indivisible tokens and 2 for divisible tokens.
  • previousid – 0 for new tokens otherwise used to identify a predecessor token.
  • category – Category for the new tokens, can be empty, max 255 bytes.
  • subcategory – Subcategory for the new token, can be empty, max 255 bytes.
  • name – Name of the new token, cannot be empty, max 255 bytes.
  • url – URL for further information, can be empty, max 255 bytes.
  • data – Additional arbitrary data, can be empty, max 255 bytes.
  • amount – Must be a positive non-zero value.

The following example command call with arguments would be used to create a new divisible token on the main ecosystem, 100,000 tokens will be created, the token is called “Test Token”, other text fields have generic information for demonstration purposes, note that all text fields except the name field can be left blank. The issuer address is funded with some feathercoin to cover the transaction fee.

omni_sendissuancefixed 6ssfk7GS7168aYEUjYFRFcJ7BdHL3v1Ds6 1 2 0 “category” “subcategory” “Test Token” “https://test.com” “data” “100000”

The result of this command should be a transaction hash, otherwise an error or help text should display. You can use the following command with the transaction hash to look up the transaction on the OmniLayer. The following shows that the transaction is valid as the line starting with “valid” is set to true.

When using the OmniFeather GUI it needs to be restarted to recognise new tokens. Restarting it should now show the new token on the overview, balances and send tab.

A new fixed supply smart property has been created and can now be sent to others or used in a sell order on the decentralised exchange. For documentation on omni_sendissuancefixed and all other available OmniFeather commands refer to the documentation linked in below.

https://github.com/OmniLayer/omnifeather/blob/master/src/omnicore/doc/rpc-api.md