tokamak-network / tokyo

tokyo monorepo
Apache License 2.0
4 stars 5 forks source link

comment issue #24

Open ggs134 opened 6 years ago

ggs134 commented 6 years ago

If comment is nedded to tokyo-schema, what am i supposed to do?

I reccommand to use "_comment" key, value pair.

For example,

token : {
    token_type : {
      _comment : ["Client does not want minime token"],
      is_minime : Boolean,
      token_option : {
        burnable : Boolean,          // self-burnable
        pausable : Boolean,          // pause token transfer. MiniMe token is pausable as default.
        no_mint_after_sale: Boolean, // no more token generation after sale
      }
    },
    token_name : String,
    token_symbol : String,
    decimals : Number,
  }
4000D commented 6 years ago

Where and why should "_comment" be used?

ggs134 commented 6 years ago

Every JSON object if we want to. Is this policy affects tokyo-generator?

Let's assume situation, what if we want to distinguish between dev team's account and onther's when it comes to ether distribution?

4000D commented 6 years ago

It is not allowed. tokyo-schema uses Joi, and it rejects unexpected { key, value } pair. We can't add "_comment" fields to all possible spots.

4000D commented 6 years ago

"_comment" is used in sale.distributioin.token, sale.distributioin.ether, sale.stages. Does other fields need to be "_comment"ed?

ggs134 commented 6 years ago

If that job is too huge, don't take this proposal seriously. Consider Cost(time)/Effect in terms of utility of _comment.