Skip to content

Commit

Permalink
Add storage score test vector
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Dec 21, 2023
1 parent 54b7bed commit 39e1ec4
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions tips/TIP-0043/tip-0043.md
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,67 @@ that i > k. Hence, an <i>NFT Unlock</i> can only reference an _Unlock_ at a smal
- `NFT Reference Unlock Index` defines a previous input of the transaction and its unlock. This input must be an <i>NFT
Output</i> with `NFT ID` that refers to the <i>NFT Address</i> being unlocked.

# 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).

NFT Output (json-encoded):

```json
{
"type": 4,
"amount": "421000000",
"mana": "0",
"nftId": "0x3163482ff326658dd1bfead468a609bc6b3e74cb2e5094e0da9b63eae7e0166c",
"unlockConditions": [
{
"type": 0,
"address": {
"type": 8,
"accountId": "0x17432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a"
}
},
{
"type": 1,
"returnAddress": {
"type": 0,
"pubKeyHash": "0xed1484f4d1f7d8c037087fed661dd92faccae1eed3c01182d6fdd6828cea144a"
},
"amount": "4000000"
}
],
"features": [
{
"type": 2,
"entries": {
"iota": "0x322e30"
}
}
],
"immutableFeatures": [
{
"type": 2,
"entries": {
"nft": "0x696f7461"
}
}
]
}
```

NFT Output (hex-encoded binary serialization):

```
0x0440f317190000000000000000000000003163482ff326658dd1bfead468a609bc6b3e74cb2e5094e0da9b63eae7e0166c02000817432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a0100ed1484f4d1f7d8c037087fed661dd92faccae1eed3c01182d6fdd6828cea144a00093d000000000001020104696f74610300322e30010201036e66740400696f7461
```

NFT Output Storage Score: `240`.

# Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 comments on commit 39e1ec4

Please sign in to comment.