Closed hitwill closed 3 months ago
I think it has to be Name
possibly add better instructions for setting it when creating a token process
I think it has to be
Name
possibly add better instructions for setting it when creating a token process
Perhaps one option is:
Name = Name or 'Points Coin'
Info handler, add this comment
--[[
Info
Note: token Name is inherited from the process name
]]
--
Handlers.add('info', Handlers.utils.hasMatchingTag('Action', 'Info'), function(msg)
ao.send({
Target = msg.From,
Name = Name,
Ticker = Ticker,
Logo = Logo,
Denomination = tostring(Denomination)
})
end)
Closed as superseded by: https://github.com/permaweb/aos/pull/287
Each process has a global var called Name, and this clashes with the token blueprint's Name variable.
The line:
Name = Name or 'Points Coin'
is never assigned, sinceName
already has the value of the process name. (Default or whatever the dev names it)For example, the dev might name the process
Currency Contract
when instantiating it. In this case, the token never gets the name Points Coin.This can be fixed by updating the line to:
TokenName = TokenName or 'Points Coin'