diff --git a/tips/TIP-0054/tip-0054.md b/tips/TIP-0054/tip-0054.md index eb53e5e6c..37c85f0a9 100644 --- a/tips/TIP-0054/tip-0054.md +++ b/tips/TIP-0054/tip-0054.md @@ -795,6 +795,74 @@ and `governance transition`. address -> output mapping table, so that given an Anchor Address, its most recent unspent anchor output can be retrieved. +# Test Vectors + +The protocol parameters used in the following test vectors are the same as in +[TIP-49 (Protocol Parameters Hash)](../TIP-0049/tip-0049.md#protocol-parameters-hash). + +## Storage Score + +The following test vector shows the calculation of the storage score according to [TIP-47](../TIP-0047/tip-0047.md). + +Anchor Output (json-encoded): + +```json +{ + "type": 2, + "amount": "420000000", + "mana": "42", + "anchorId": "0x0000000000000000000000000000000000000000000000000000000000000000", + "stateIndex": 0, + "unlockConditions": [ + { + "type": 4, + "address": { + "type": 8, + "accountId": "0x17432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a" + } + }, + { + "type": 5, + "address": { + "type": 8, + "accountId": "0x17432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a" + } + } + ], + "features": [ + { + "type": 0, + "address": { + "type": 0, + "pubKeyHash": "0xed1484f4d1f7d8c037087fed661dd92faccae1eed3c01182d6fdd6828cea144a" + } + }, + { + "type": 2, + "entries": { + "iota": "0x322e30" + } + } + ], + "immutableFeatures": [ + { + "type": 2, + "entries": { + "iota": "0x322e30" + } + } + ] +} +``` + +Anchor Output (hex-encoded binary serialization): + +``` +0x0200b10819000000002a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000002040817432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a050817432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a020000ed1484f4d1f7d8c037087fed661dd92faccae1eed3c01182d6fdd6828cea144a020104696f74610300322e3001020104696f74610300322e30 +``` + +Anchor Output Storage Score: `270`. + # Copyright Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).