Comments (5)
On top of this, we should disable direct calls to Gno stdlibs via maketx call
(refrence comment).
@moul, I think its okay that p/
has top-level variables such as constants, since these can be useful. This is currently possible - read about it in this issue.
Closing #2224 in favor of this.
from gno.
@moul, I think its okay that p/ has top-level variables such as constants, since these can be useful. This is currently possible - read about it in #1538.
I think that p/ should be OK to contain package-level variables.
While the following is off-topic:
It's peculiar that you need to constantly remember that this is a p/ and that the variable isn't meant to be persisted, similar to how you must be mindful that it will be persisted when working within a Realm (comment in packages in r/). All these rules are implicit, which can be confusing.
from gno.
For p/
, package-level constants are allowed, but variables/state that can change are not. The Go linter should prohibit this.
Do you have examples of package-level variables that would make sense?
from gno.
I mean something like this:
errXXX := errors.New("a common error shares within packages").
gno/examples/gno.land/p/demo/flow/io.gno
Line 14 in 28111d9
but of course, we actually don't want to modify it.
from gno.
Prohibit the use of maketx call with a p/ entrypoint.
Completed in #2242. We could make the error a bit more informative: invalid package path
from gno.
Related Issues (20)
- importing "std" not working in gno.playground HOT 2
- Network peering discovery - Seed mode - Addrbook.json HOT 1
- Missing return value error in Poll tutorial HOT 2
- [gnokey] `Verify` and `Sign` functions now are not a pair HOT 2
- Proposal: Zero-Knowledge Proofs (ZKPs) for Login Process - Adena
- [Discussion] `std.ZeroAddress` HOT 5
- chore(docs): TODO removal
- amino.WithTypes accepts types being given the same name
- Public key format mismatch between `gnoland secrets init` and `gnoland genesis validator add` HOT 6
- [GnoVM]: Do not allow realms to store references to objects owned by other realms
- RFC(philosophy): Limiting depth of commands and subcommands in CLIs HOT 1
- RFC(philosophy): Merge some standalone repos into this monorepo
- [Discussion/Request] Add a way to catch emitted events in `gno test`
- `Time.Now()` always return initial UNIX time HOT 2
- [gnokey] Make `gnokey query` more convenient HOT 1
- main README should disambiguate with gnosis project
- Oracle VRF HOT 2
- out of gas error is unclear `(VM call panic {WritePerByte})` HOT 1
- Incompatibility of `gnoland secrets init` with Read-Only mounted k8s Secrets
- [GnoVM] `TestSetRealm` not working properly in `gno test`
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.