Open leohhhn opened 2 weeks ago
If we prioritize transaction transparency, approach 2 is likely the better method
@leohhhn :
In my view, we surely need ZeroAddress
. This is the basis of tokens. I was suprised when I saw this issue :)
And I also think this implementation should be inspired by ETH 0x00 address
.
Yes, the feature seems useful and will likely improve readability.
Just considering whether std
is the most appropriate place. Perhaps we should explore ways to limit the size of the std
API.
We could have a "consts" stdlib or similar for this if we had more constants. Related.
I think std
is the right place right now, and as soon as #1695 is merged, we can work on the split of std
and have a separate place for it.
@thinhnx-var @linhpn99 - would you be open to doing a bit of research on the best way to do this? One solution is to simply have a constant that is std.Address("")
, but possibly there is a better way where we actually utilize the address derivation system to generate something that would be akin of a zero address. It needs to not have a private key or similar. It should also be harmonious with std.Address.IsValid()
in some way. Also, please think about the possible use cases and examples, and provide them along with the PR, so that the case for it is even stronger.
If you can, after doing the research, please post your suggested approach either here on in the PR description.
@leohhhn yea I am working on this and will update our approach and implementation over here.
Good idea.
Which is best:
AddressZero
is more scary.
There's a movie called Patient Zero.
@grepsuzette I am thinking about (maybe) the best approach and you are giving me one more thing to put in mind. Cool :D
Description
Should we have a
ZeroAddress
constant in Gno which will represent a universal burn address? This should be an address for which nobody can obtain the private key. I've found it missing multiple times when developing.For example, in the case of GRC20 and other similar tokens, people usually send the tokens they want to burn to a zero address.
This "burn" functionality can be implemented in two ways as I see:
ZeroAddress
constant in Gno, for example in thestd
package, for which everyone knows the private key is not obtainable.WDYT?