LiskArchive/lips

Improve LIP 0051 - endpoints, values for constants, clarify token support

Closed this issue · 0 comments

Motivation

Several sections of the Token module LIP can be improved:

  1. The Supported Tokens section could be improved on clarity of exposition.
  2. In Constant and Notations section, all constants should have defined values.
  3. Endpoints for Off-Chain Services section should have non-trivial or recommended endpoints listed.

Current Specifications

  1. The following paragraph could be considered logically inconsistent, since in the opening sentence it is stated that all chains must support their native tokens, while later in the section an example of a chain with no native tokens is given, i.e. an example of a chain that only supports the LSK token:

The choice of supported tokens must abide by two rules: all chains must support their native tokens and all chains must support the LSK token. The supported tokens can be specified as part of the initial configuration of the Token module at the chain creation.

  1. Multiple constants have missing values.
  2. No endpoints are listed.

Proposed Specifications

  1. We suggest to rephrase the above paragraph in the following way:

The choice of supported tokens must abide by two rules: all chains must support the LSK token and their native tokens, if they have any. The supported tokens can be specified as part of the initial configuration of the Token module at the chain creation.

  1. We suggest the following values:
Constant Suggested value
CROSS_CHAIN_COMMAND_NAME_TRANSFER “crossChainTransferCommand”
EVENT_NAME_INITIALIZE_TOKEN “initializeToken”
EVENT_NAME_INITIALIZE_USER_ACCOUNT “initializeUserAccount”
EVENT_NAME_INITIALIZE_ESCROW_ACCOUNT “initializeEscrowAccount”
EVENT_NAME_ALL_TOKENS_SUPPORTED “allTokensSupported”
EVENT_NAME_ALL_TOKENS_SUPPORT_REMOVED “allTokensSupportedRemoved”
EVENT_NAME_ALL_TOKENS_FROM_CHAIN_SUPPORTED “allTokensFromChainSupported”
EVENT_NAME_ALL_TOKENS_FROM_CHAIN_SUPPORT_REMOVED “allTokensFromChainSupportedRemoved”
EVENT_NAME_TOKEN_ID_SUPPORTED “tokenIDSupported”
EVENT_NAME_TOKEN_ID_SUPPORT_REMOVED “tokenIDSupportedRemoved”
  1. We suggest defining the following endpoints:
    getBalances
    getSupportedTokens
    getEscrowedAmounts

Affected LIPs

0051