Skip to content

v0.7.0-alpha.5

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 29 May 20:51
· 312 commits to main since this release
328004d

Notable changes

  1. Bug fix on dojoup script which was stuck after the installation of the binaries + help message not displayed.
  2. Bug fix to ensure any package of dojo can be built separately without error.
  3. 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 get contract_address and class_hash of an other contract in the world. More info to come in the book.
  4. Sozo now supports some prefixes to pass call data with execute (use sozo execute --help for more info):
    • u256
    • sstr: short string (31 chars)
    • str: long string (ByteArray)
    • Any other item is processed as a felt
  5. 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 on Position and Moves of the spawn-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.
  6. 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.
  7. 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

New Contributors

Full Changelog: v0.7.0-alpha.4...v0.7.0-alpha.5