v0.6.0
This is a small release with some bug fixes, internal improvements, and one breaking change for code that embeds Cadence.
π₯ Breaking Changes
-
Removed the unused
controller
parameter from the storage interface methods:-
func GetValue(owner, controller, key []byte) (value []byte, err error)
βfunc GetValue(owner, key []byte) (value []byte, err error)
-
SetValue(owner, controller, key, value []byte) (err error)
βSetValue(owner, key, value []byte) (err error)
-
ValueExists(owner, controller, key []byte) (exists bool, err error)
βValueExists(owner, key []byte) (exists bool, err error)
This is only a breaking change in the implementation of Cadence, i.e for code that embeds Cadence, not in the Cadence language, i.e. for users of Cadence.
-
β Features
-
Added an optional callback for writes with high-level values to the interface:
type HighLevelStorage interface { // HighLevelStorageEnabled should return true // if the functions of HighLevelStorage should be called, // e.g. SetCadenceValue HighLevelStorageEnabled() bool // SetCadenceValue sets a value for the given key in the storage, owned by the given account. SetCadenceValue(owner Address, key string, value cadence.Value) (err error) }
This is a feature in the implementation of Cadence, i.e for code that embeds Cadence, not in the Cadence language, i.e. for users of Cadence.
π Improvements
- Don't report an error for a restriction with an invalid type
- Record the occurrences of types. This enables the "Go to definition" feature for types in the language server
- Parse member expressions without a name. This allows the checker to run. This will enable adding code completion support or members in the future.
π Bug Fixes
- Fixed a crash when checking the invocation of a function on an undeclared variable
- Fixed handling of functions in composite values in the JSON-CDC encoding
- Fixed a potential stack overflow when checking member storability