Manifest Value Syntax
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 |
|
I8, I16, I32, I64, I128 |
|
U8, U16, U32, U64, U128 |
|
String |
Strings must be valid unicode. The string literal follows JSON escaping rules:
If writing in Javascript, |
Basic Composite Value Kinds
Below are all the composite value kinds in the basic (common) SBOR model.
| Basic Value Kind | Manifest Syntax Example |
| Examples:
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 |
| The canonical representation is:
Some engine-specific enums also have a nicer alias-syntax for their variants, eg: The full list of supported manifest enum variant names is given here. Option and Result also have rust-like ident aliases for their variants, and so can be represented as 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 |
| Array<String>("foo", "bar") |
|
You can also nest Map: |
Manifest Value Kinds
| Manifest Value Kind | Example |
Resolves to a reference to the given address - either fixed, or from a bound reference.
If used as a NamedAddress:
|
|
| AddressReservation("address_reservation") |
|
|
|
|
Resolves to an array of owned Buckets or owned Proofs respectively. | Only the following are supported:
|
Resolves to a | Blob("<black2b_hash_of_the_blob_contents>") |
Resolves as a Decimal. | Decimal("-123.456") |
Resolves as a PreciseDecimal. | PreciseDecimal("1231232342342.123213123123") |
Resolves as a NonFungibleLocalId. |
|
Manifest aliases
| Manifest Alias | Example |
Resolves as a Tuple of length 0. | () |
Resolves as a Tuple of the resource address and the non fungible local id. | Various examples:
Which resolves to:
|
Resolves as an Array<U8> via hex decoding. This is the canonical representation of a Array<U8> in the manifest. | Bytes("deadbeef") |
Various Enum ident aliases:
These resolve to the relevant enum variant. | Examples: |
Expressions
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.