What is the best way to implement a FA1.2 token with TZIP-016 metadata (symbol, name, decimals...)? I am using SmartPy. So far, I noted two methods: the first one is to implement a FA1.2 token with a json metadata such as
{
"name": "mytoken",
"description": "This is constructed just to be an example to be put on IPFS.\nAt the time of writing, the TZIP is now at `30b4bd3` a.k.a. “WIP-TZIP-16: Mention future work & extensions.”",
"version": "0.42",
"decimals": 42,
"symbol": "AAAA",
"interfaces": [
"TZIP-16 draft"
]
}
By there is also a method where people: Implement a FA2 token that generates the desired FA1.2 token with a method called :
make_metadata(symbol, name, decimals):
"Helper function to build metadata JSON bytes values."
return (sp.map(l = {
# Remember that michelson wants map already in ordered
"decimals" : sp.bytes_of_string("%d" % decimals),
"name" : sp.bytes_of_string(name),
"symbol" : sp.bytes_of_string(symbol)
}))
What is the best method?