You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chain - containing critical chain types, like Address, AddressList.
chain/runtime - containing meta-VM functions, like CurrentRealm, PrevRealm, AssertOriginCall.
not runtime as it has a different API and usage than Go's runtime
chain/banker - containing the Banker and Coin types, and related functions and methods to deal with the native banker.
chain/params - containing the SetParamBool, SetParamString, ... types
The division into packages should help to reduce the scope of each package, helping us create modular packages. It's not definitive; some questions remain on where to put the Emit functions.
Why: at the time being, all Gno-specific functions are lumped together in a single, big std package. Naming packages like base, util or common is considered bad practice in Go, where instead packages should be more specific and be concerned with specific purposes.
Description
Split into different packages
Package name ideas (see related gist)
chain
- containing critical chain types, likeAddress
,AddressList
.chain/runtime
- containing meta-VM functions, likeCurrentRealm
,PrevRealm
,AssertOriginCall
.runtime
as it has a different API and usage than Go'sruntime
chain/banker
- containing theBanker
andCoin
types, and related functions and methods to deal with the native banker.chain/params
- containing theSetParamBool
,SetParamString
,...
typesThe division into packages should help to reduce the scope of each package, helping us create modular packages. It's not definitive; some questions remain on where to put the
Emit
functions.Why: at the time being, all Gno-specific functions are lumped together in a single, big
std
package. Naming packages like base, util or common is considered bad practice in Go, where instead packages should be more specific and be concerned with specific purposes.Status: consensus.
References:
std
#1475 (comment)std
#1475 (comment)Meta issue: #1475
The text was updated successfully, but these errors were encountered: