Giter Site home page Giter Site logo

[Discussion] `std.ZeroAddress` about gno HOT 7 OPEN

leohhhn avatar leohhhn commented on September 27, 2024 1
[Discussion] `std.ZeroAddress`

from gno.

Comments (7)

leohhhn avatar leohhhn commented on September 27, 2024 2

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.

from gno.

moul avatar moul commented on September 27, 2024 1

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.

from gno.

thinhnx-var avatar thinhnx-var commented on September 27, 2024 1

@leohhhn
yea I am working on this and will update our approach and implementation over here.

from gno.

grepsuzette avatar grepsuzette commented on September 27, 2024 1

Good idea.

Which is best:

  • ZeroAddress
  • AddressZero

AddressZero is more scary.
There's a movie called Patient Zero.

from gno.

linhpn99 avatar linhpn99 commented on September 27, 2024

If we prioritize transaction transparency, approach 2 is likely the better method

from gno.

thinhnx-var avatar thinhnx-var commented on September 27, 2024

@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.

from gno.

thinhnx-var avatar thinhnx-var commented on September 27, 2024

@grepsuzette
I am thinking about (maybe) the best approach and you are giving me one more thing to put in mind. Cool :D

from gno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.