Comments (7)
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.
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.
@leohhhn
yea I am working on this and will update our approach and implementation over here.
from gno.
Good idea.
Which is best:
- ZeroAddress
- AddressZero
AddressZero
is more scary.
There's a movie called Patient Zero.
from gno.
If we prioritize transaction transparency, approach 2 is likely the better method
from gno.
@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.
@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)
- Constant folding:
- setup `gnobro` hosting HOT 1
- gnoweb shows `<` for `<` when browsing source code HOT 1
- [Docs]: Lack of information about `std.Test` functions HOT 1
- NO informations about *_filetest.gno in the docs HOT 1
- RFC disable branch creation on origin HOT 3
- feedback needed: how are you using `gnoland genesis ...`?
- auto-rerun github workflow failures
- ci: consider adding back the gnovm parallel testing HOT 1
- `r/sys/users` Mainnet v1 (mvp) & v2
- GnoVM: Constant expressions do not work with some built-in functions HOT 4
- Can we use Namespaces norm? HOT 1
- `gno run` should have an ExecContext HOT 1
- GnoVM: Expose methods of exported struct variables to the `MsgCall` API
- Assignment to Constant Pkg Value in Gno
- Uint64 overflow HOT 6
- Assigning a value to Function Name in Gno should be prohibited
- bug: crash stack overflow / size exceeded when printing value of self referencing structure HOT 1
- error: panic: Orphan expires before it comes alive. 1 > 0
- Portal loop CI testing against its genesis.json
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gno.