All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Access to Pyth
Price.publish_time
(#91) - Accounts can now store complex types (lists, user-defined classes, multi-dimensional arrays, etc.)
- Bug with unary not operator
- Pyth compile error on latest version (#91)
- Bug that prevented lists from being used in events
- Bug that prevented users from importing accounts from other files
- Conditionally generate Pyth import (#93)
- Constants may be defined in source files
sum
now works with floats (and also handles type errors properly)- Bug that caused compilation errors based on the order that modules were imported in
- Error when using account key() as seed
- Bug caused by array/list indexing
- Import handling is different:
prelude
is now imported automatically, and objects imported from it are not re-exported
- Getters for
TokenAccount
's mint key andTokenMint
's freeze authority, decimals, and supply - Type hints for comparison operators for numeric types
- Bug when assigning to variables in deeper scopes
- Bug that caused strings to not be converted to owned types in generate code
- Bug that kept clones from appearing in generated code, leading to borrow checker errors
Pubkey.find_program_address()
function, to find a PDA given a list of seeds and the program key- Decorator @dataclass for classes to automatically generate a default constructor
TokenMint.authority()
works- Support strings in events
- Bug where syntactic transformations would be duplicated in some arithmetic expressions
- Make token mints and accounts mutable in instruction contexts
- Pyth integration
- System clock is now immutable in instruction contexts (a.k.a. it works now)
- Fix accessing index 0 of arrays
- Allow storing arrays of enums on an account
- New
size
function that returns the size of a string (for now) in bytes - Allow setting
space
orpadding
on account init to customise account size - Support for Anchor events
- Allow using pubkeys as seeds
- Support for importing from local files
len(str)
now has the same behaviour as Python, and returns character count. This may be different to the size in bytes
- Bug that prevented numeric constant types from being unified (impacted array handling)
- Ambiguous error messages caused by unresolved imports
- Allow casting
Array
s as iterables
- Removed some of the unnecessary
borrow()
s from appearing in seed lists.
- Support for compiling to WASM
- Allow non-enum classes to define methods, including static methods
- Allow non-account classes to define constructors
- Added changelog.