Skip to content

Calldata format

In the Dojo ecosystem, several tools or configuration files like sozo and the dojo_<PROFILE>.toml file require some calldata to be provided. This page describes the format which is expected for these calldata.

By default, any calldata value is a Cairo felt or any type that fits into one felt.

To be decoded as other Cairo types, calldata values must be prefixed. Here is a list of available prefixes:

PrefixDescriptionExample
u256a 256-bit unsigned integeru256:0x1234
stra Cairo string (ByteArray)str:'hello world'
sstra Cairo short stringsstr:'hello world'
inta signed integer that fits into a i128int:0x1234
arra dynamic array of values that fits into one feltarr:0x01,0x02,0x03
u256arra dynamic array of 256-bit unsigned integersu256arr:0x01,0x02,0x03
farra fixed-size array of values that fits into one feltfarr:0x01,0x02,0x03
u256farra fixed-size array of 256-bit unsigned integersu256farr:0x01,0x02,0x03