The manifest syntax for instruction arguments forms a representation of an encoded “Manifest SBOR” value. The Manifest SBOR value is converted by the transaction processor into “Scrypto SBOR” which is then used to make calls to other objects in the engine.
A specific SBOR implementation is formed of a core of “basic” value kinds, and then implementation specific additional value kinds. When the transaction processor processes the manifest, it maps basic value kinds are mapped as-is, and remaps the Manifest value kinds to Scrypto value kinds.
Basic Leaf Value Kinds
Below are all the value kinds in the basic (common) SBOR model.
Basic Value Kind
Manifest Syntax Example
Bool
true
false
I8, I16, I32, I64, I128
5i8
-412i32
12345678i128
U8, U16, U32, U64, U128
5u8
412u32
12345678u128
String
"I like "quoted message"!\n"
Basic Composite Value Kinds
Below are all the composite value kinds in the basic (common) SBOR model.
Basic Value Kind
Manifest Syntax Example
Tuple
Represents a product type, such as a Rust tuple or struct.
Contains 0 or more child values.
Examples:
Tuple(“Hello”, 43u8)
Tuple()
As an example, if you want to reference a structure or tuple from Scrypto, all the three examples below would have their values written in the form Tuple(55u64, "David"):
Option and Result also have rust-like ident aliases for their variants, and so can be represented as Some("value") / None and Ok("Success") / Err("Failure!").
If you are representing enum variants of an enum defined in scrypto, you can’t use the alias-syntax, and instead will have to rely on discriminant numbers. So you’ll need to work out the enum variant to use. EG the MouseMove variant below has index 1, and has two u32 fields, so you would write this in your transaction manifest as Enum<1u8>(320u32, 480u32). Similarly, the MousePress variant has index 3, and a single String field, so would be represented as eg Enum<3u8>("scroll-wheel").
Represents a repeated value (such as an Array / Vec / Set / List, etc)
All contained values must be of the same value kind. This value kind is specified in the angle brackets.
This also includes bytes - which are effectively an Array<U8>, although their canonical representation is using the Bytes("<hex>") alias covered later.
Array<String>("foo", "bar")
Map
Represents a map (effectively an array of two-tuples).
All contained values must have the same value kind for their keys and the same value kind for their values. These value kinds are specified in the angle brackets.
At the moment, two expressions are available. Expression("ENTIRE_WORKTOP") takes all resources present on the worktop and puts them in a vector of buckets that can then be used as an argument. Expression("ENTIRE_AUTH_ZONE") works similarly but with proofs present on the AuthZone.
Was this article helpful?
Thank you for your feedback! Our team will get back to you