T3236
Chronik-client's .token() API currently does not return the token minter address. This diff derives the minter address from the specific genesis tx output which transferred the initial token supply to the minter at the point of genesis.
Differential D14326
[Chronik-client] Add token minter to the .token() API response emack on Jul 31 2023, 06:11. Authored by Tags None Subscribers None
Details
T3236 Chronik-client's .token() API currently does not return the token minter address. This diff derives the minter address from the specific genesis tx output which transferred the initial token supply to the minter at the point of genesis. npm test
Diff Detail
Event TimelineComment Actions This is needed when executing SLP-based airdrop campaigns where XEC is pro-rata distributed to holders of a particular token. In this context the token minter should always be excluded from the pro-rata token balance calculations otherwise their typically significant holding of the token supply will skew the pro-rata distribution across genuine token holders. Currently, the token minter address is manually derived similar to above so I felt it made sense to have it returned as part of the overall token object via chronik-client. It's also useful for slp token explorers which displays all the relevant info of the token, which should include the token minter. Its use will eventually extend to non-type1 tokens such as NFTs where the creator is an integral part of the metadata. Comment Actions This doesn't have to be in the client library though, it can be in the code for the airdrop. This slows down everyone that just wants to have token ticker / token name / token decimals. |