diff --git a/tips/TIP-0038/tip-0038.md b/tips/TIP-0038/tip-0038.md index e2c585d99..ee1b1f042 100644 --- a/tips/TIP-0038/tip-0038.md +++ b/tips/TIP-0038/tip-0038.md @@ -800,13 +800,9 @@ protocol treats this metadata as pure binary data, it has no effect on the valid increases the required storage deposit. ISC is a great example of a higher-layer protocol that makes use of Metadata Feature: smart contract request parameters are encoded in the metadata field of outputs. -#### Additional syntactic transaction validation rules: - -- An output with Metadata Feature is valid, if and only if 0 < `length(Data)` ≤ `Max Metadata Length`. -
Metadata Feature -
Defines metadata (arbitrary binary data) that will be stored in the output.
+
Defines a map of key-value pairs that is stored in the output.
@@ -826,12 +822,51 @@ Feature: smart contract request parameters are encoded in the metadata field - - - + + + + + + +
Set to value 2 to denote a Metadata Feature.
Data(uint16)ByteArrayBinary data. A leading uint16 denotes its length.Entries Countuint8The number of entries in the map.
Entries anyOf +
+ Metadata Entry +
A map entry consisting of a string key and an arbitrary byte value.
+ + + + + + + + + + + + + + + + +
+ Name + + Type + + Description +
Key(uint8)ByteArrayA string which may only consist of ASCII characters. A leading uint8 denotes its length.
Value(uint16)ByteArrayAn array of arbitrary binary data. A leading uint16 denotes its length.
+
+
+#### Additional syntactic transaction validation rules: + +- Each `Key` in the `Entries` must consist only of bytes that are valid ASCII characters, that is, each byte may not + exceed `127`. +- `Entries Count` must be at least `1`. +- The serialized size of the feature may not exceed `8192` bytes. + ### Tag Feature A Tag Feature makes it possible to tag outputs with an index, so they can be retrieved through an indexer API not @@ -901,7 +936,7 @@ plugin. Token ID ByteArray[38] - Identifier of the native token. Its derivation is defined in TIP-44. + Identifier of the native token. Its derivation is defined in TIP-44 (Foundry Output). Amount