v0.7.0-alpha.5
Pre-release
Pre-release
github-actions
released this
29 May 20:51
·
690 commits
to main
since this release
Notable changes
- Bug fix on dojoup script which was stuck after the installation of the binaries + help message not displayed.
- Bug fix to ensure any package of dojo can be built separately without error.
- Sozo now supports
init calldata
. The concept is the following: you can now define a dojo_init function into your dojo contracts. This function will be callable only once, at the moment where the contract is deployed (in the same transaction). Once again, the overlays inside manifests are used for that purpose. Only two variables are currently available, to getcontract_address
andclass_hash
of an other contract in the world. More info to come in the book. - Sozo now supports some prefixes to pass call data with
execute
(usesozo execute --help
for more info):u256
sstr
: short string (31 chars)str
: long string (ByteArray)- Any other item is processed as a felt
- Sozo model commands have been reworked + a new
layout
command:sozo model schema <ModelName>
: retrieves the schema of a model to see the types from the on-chain data.sozo model layout <ModelName>
: shows the computed layout in memory for your model. This gives you a detailed view of the number of bits used by each fields, and if packed, it gives you the exact bits layout. You can use this command onPosition
andMoves
of thespawn-and-move
example to see the differences between layouts.sozo model get <ModelName> <KEYS>
: retrieves the data on-chain from the dojo storage of the world for the given model and keys.
- A new derive attribute
IntrospectPacked
is now required to be derived on each struct inside a model you want to be packed by dojo. As a recall,IntrospectPacked
models are stored with all the fields sequentially (as dojo did initially), which has the benefit of a very short footprint in the storage, but less flexibility for model upgrade. You have an example in the repo. - Torii now supports indexing models with multidimensional arrays.
Targeted features for for the 0.7.0
(which will ends up being the first iteration for 1.0
):
- Cairo
2.6
support (currently only a CI problem to be fixed to ensure correct publication of the releases. - New storage layout [1/2] with: Nested structs,
Array<T>
,ByteArray
. - New storage layout [2/2] with: Enums rework to fully support custom enumeration without the same type limitation we currently have.
- Sozo support for constructor / initializer pattern with arguments.
- Update of Torii to support the new types + the new storage layout.
- Starknet foundry for testing
- Namespaces to register / access models.
What's Changed
- Update devcontainer image: v0.7.0-alpha.4 by @tarrencev in #1991
- Katana and ArgentX wallet by @Matth26 in #1958
- chore: remove debug log by @Larkooo in #1996
- Update README.md - Getting Started Link by @mgrunwaldt in #2000
- Unified crate for Cairo deps used in Katana by @kariy in #1999
- docs(sozo): update error message for more context by @lambda-0x in #2005
- refactor(torii-core): fix double pending indexing & use btreemap for sorted blocks by @Larkooo in #2009
- fix(torii-grpc): layout decoding by @Larkooo in #2011
- feat: init calldata for dojo contract by @lambda-0x in #1964
- Sozo model layout and commands by @remybar in #2002
- feat(torii-core): multi dimensional array support by @Larkooo in #1994
- feat(sozo): in build stats add bytecode and class size of casm class by @lambda-0x in #2004
- [dojo-core] use const array for pow2 by @notV4l in #1878
- feat: katana runner log path option by @EvolveArt in #2015
- fix: scarb bump for LS by @glihm in #2012
- feat(dojo-bindgen): support new layout types by @Larkooo in #1954
- Prepare release: v0.7.0-alpha.5 by @tarrencev in #2018
New Contributors
- @mgrunwaldt made their first contribution in #2000
Full Changelog: v0.7.0-alpha.4...v0.7.0-alpha.5