{
 "format": "zoobc-conformance-vectors/1",
 "edition": "0.6.1",
 "chapter": "14",
 "license": "CC BY 4.0, ZooBC Foundation",
 "cases": [
  {
   "id": "14-1-zusd",
   "chapter": "14",
   "section": "1",
   "title": "The genesis coin ZUSD as the token view reports it, from the TestNet genesis file",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "value": "{\"token_id\":\"1\",\"issuer\":\"00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807\",\"symbol\":\"ZUSD\",\"name\":\"Zoo US Dollar\",\"decimals\":8,\"amount_step\":1,\"total_supply\":450000000000000,\"backing_asset\":0,\"backing_amount\":0,\"redeemable\":0,\"mintable\":0,\"unbacked\":1,\"persist_height\":0,\"current_height\":12490}"
   }
  },
  {
   "id": "14-1-genesis-list",
   "chapter": "14",
   "section": "1",
   "title": "The fourteen genesis coins of the TestNet genesis file",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "ids": "1-14",
    "symbols": "ZUSD ZEUR ZCNY ZBTC ZETH ZSOL ZDOT ZBNB ZADA ZXRP ZTRX ZXTZ ZUSDC ZUSDT",
    "decimals": "8",
    "step": "1",
    "backing_amount": "0",
    "persist_height": "0",
    "supplies": "450000000000000 (ZUSD ZEUR ZCNY ZADA ZXRP ZTRX), 45000000000 (ZBTC), 450000000000 (ZETH ZBNB), 4500000000000 (ZSOL ZDOT), 45000000000000 (ZXTZ ZUSDC ZUSDT)",
    "issuer": "00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807"
   },
   "note": "The DevNet genesis file allocates the same supplies."
  },
  {
   "id": "14-1-step-0",
   "chapter": "14",
   "section": "1",
   "title": "The step of a token with 0 decimals",
   "kind": "14-token-step",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "decimals": "0"
   },
   "expected": {
    "step": "100000000"
   }
  },
  {
   "id": "14-1-step-2",
   "chapter": "14",
   "section": "1",
   "title": "The step of a token with 2 decimals",
   "kind": "14-token-step",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "decimals": "2"
   },
   "expected": {
    "step": "1000000"
   }
  },
  {
   "id": "14-1-step-7",
   "chapter": "14",
   "section": "1",
   "title": "The step of a token with 7 decimals",
   "kind": "14-token-step",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "decimals": "7"
   },
   "expected": {
    "step": "10"
   }
  },
  {
   "id": "14-1-step-8",
   "chapter": "14",
   "section": "1",
   "title": "The step of a token with 8 decimals",
   "kind": "14-token-step",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "decimals": "8"
   },
   "expected": {
    "step": "1"
   }
  },
  {
   "id": "14-2-sym-pqlq",
   "chapter": "14",
   "section": "2",
   "title": "The symbol PQLQ is accepted",
   "kind": "14-token-label",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "447573742054776f"
   },
   "expected": {
    "verdict": "accepted"
   }
  },
  {
   "id": "14-2-sym-d214252",
   "chapter": "14",
   "section": "2",
   "title": "The symbol D214252 is accepted",
   "kind": "14-token-label",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "symbol": "D214252",
    "name": "447573742054776f"
   },
   "expected": {
    "verdict": "accepted"
   }
  },
  {
   "id": "14-2-sym-zabcde",
   "chapter": "14",
   "section": "2",
   "title": "The symbol ZABCDE is accepted",
   "kind": "14-token-label",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "symbol": "ZABCDE",
    "name": "447573742054776f"
   },
   "expected": {
    "verdict": "accepted"
   }
  },
  {
   "id": "14-2-sym-bad-zusd1",
   "chapter": "14",
   "section": "2",
   "title": "ZUSD1 is in the bridge namespace",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "ZUSD1",
    "name": "447573742054776f"
   },
   "expected": {
    "error": "Reserved token symbol (bridge namespace): ZUSD1"
   }
  },
  {
   "id": "14-2-sym-bad-abcz",
   "chapter": "14",
   "section": "2",
   "title": "ABCZ is in the bridge namespace",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "ABCZ",
    "name": "447573742054776f"
   },
   "expected": {
    "error": "Reserved token symbol (bridge namespace): ABCZ"
   }
  },
  {
   "id": "14-2-sym-bad-lower-usdc",
   "chapter": "14",
   "section": "2",
   "title": "A lower-case symbol is refused",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "usdc",
    "name": "447573742054776f"
   },
   "expected": {
    "error": "Invalid token symbol (must be uppercase A-Z/0-9, length 2-10): usdc"
   }
  },
  {
   "id": "14-2-sym-bad-usdc",
   "chapter": "14",
   "section": "2",
   "title": "USDC is a blocked symbol",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "USDC",
    "name": "447573742054776f"
   },
   "expected": {
    "error": "Blocked token symbol (well-known asset, cannot be impersonated): USDC"
   }
  },
  {
   "id": "14-2-sym-bad-a",
   "chapter": "14",
   "section": "2",
   "title": "A one-letter symbol is refused",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "A",
    "name": "447573742054776f"
   },
   "expected": {
    "error": "Invalid token symbol (must be uppercase A-Z/0-9, length 2-10): A"
   }
  },
  {
   "id": "14-2-sym-empty",
   "chapter": "14",
   "section": "2",
   "title": "A zero-length symbol is refused statelessly, the symbol echoed empty",
   "kind": "14-issue-token",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "020800e1f50500000000000000000000000000000800447573742054776f00e1f50500000000",
    "hash": "abccd7c45a2a4e43",
    "height": "12500",
    "free": "172800",
    "cost": "10000000",
    "period": "172800"
   },
   "expected": {
    "error": "Invalid token symbol (must be uppercase A-Z/0-9, length 2-10): "
   }
  },
  {
   "id": "14-2-name-ok",
   "chapter": "14",
   "section": "2",
   "title": "The name Dust Two is accepted",
   "kind": "14-token-label",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "447573742054776f"
   },
   "expected": {
    "verdict": "accepted"
   }
  },
  {
   "id": "14-2-name-65",
   "chapter": "14",
   "section": "2",
   "title": "A 65-byte name is refused",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"
   },
   "expected": {
    "error": "Invalid token name: name is longer than 64 bytes"
   }
  },
  {
   "id": "14-2-name-space",
   "chapter": "14",
   "section": "2",
   "title": "A leading space is refused",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "2044757374"
   },
   "expected": {
    "error": "Invalid token name: name has a leading or trailing space"
   }
  },
  {
   "id": "14-2-name-markup",
   "chapter": "14",
   "section": "2",
   "title": "A < in the name is refused",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "613c62"
   },
   "expected": {
    "error": "Invalid token name: name contains one of < > \" ' `"
   }
  },
  {
   "id": "14-2-name-zwsp",
   "chapter": "14",
   "section": "2",
   "title": "A zero-width space is refused",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "4475e2808b7374"
   },
   "expected": {
    "error": "Invalid token name: name contains a control, zero-width or bidi character"
   }
  },
  {
   "id": "14-2-name-overlong",
   "chapter": "14",
   "section": "2",
   "title": "An overlong UTF-8 form is refused",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "c080"
   },
   "expected": {
    "error": "Invalid token name: name is not valid UTF-8"
   }
  },
  {
   "id": "14-2-name-zbc",
   "chapter": "14",
   "section": "2",
   "title": "A ZBC address with separators (66 bytes) is not a name",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "5a42435f4349484f4a5355355f455747584b5a4c4a5f41485745514e5a585f485944584d4d334a5f5656323633444c445f37495934505946585f354144534e443752"
   },
   "expected": {
    "error": "Invalid token name: name is longer than 64 bytes"
   }
  },
  {
   "id": "14-2-name-zbc-bare",
   "chapter": "14",
   "section": "2",
   "title": "A ZBC address without separators is not a name",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "5a42434349484f4a535535455747584b5a4c4a41485745514e5a58485944584d4d334a5656323633444c443749593450594658354144534e443752"
   },
   "expected": {
    "error": "Invalid token name: name is an account address"
   }
  },
  {
   "id": "14-2-name-hex64",
   "chapter": "14",
   "section": "2",
   "title": "A 64-hex key is not a name",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "31323065653463613964323538643735363536393031656334383337333733653037373633333639616437356564386436336661333163376530623765383037"
   },
   "expected": {
    "error": "Invalid token name: name is an account address"
   }
  },
  {
   "id": "14-2-name-hex72",
   "chapter": "14",
   "section": "2",
   "title": "A typed account in hex after 0x (74 bytes) is not a name",
   "kind": "14-token-label",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "symbol": "PQLQ",
    "name": "3078303030303030303031323065653463613964323538643735363536393031656334383337333733653037373633333639616437356564386436336661333163376530623765383037"
   },
   "expected": {
    "error": "Invalid token name: name is longer than 64 bytes"
   }
  },
  {
   "id": "14-3-dust2",
   "chapter": "14",
   "section": "3",
   "title": "IssueToken DUST2 at height 12,500 with a survival payment of 1 ZBC",
   "kind": "14-issue-token",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "020800e1f505000000000000000000000000050044555354320800447573742054776f00e1f50500000000",
    "hash": "abccd7c45a2a4e43",
    "height": "12500",
    "free": "172800",
    "cost": "10000000",
    "period": "172800"
   },
   "expected": {
    "token_id": "4849860418062503083",
    "decimals": "2",
    "flags": "8",
    "supply": "100000000",
    "backing": "0",
    "symbol": "DUST2",
    "name": "Dust Two",
    "payment": "100000000",
    "persist_height": "1913300",
    "issuer_units": "100000000"
   }
  },
  {
   "id": "14-3-dust2-devnet",
   "chapter": "14",
   "section": "3",
   "title": "The same IssueToken on DevNet at height 12,500",
   "kind": "14-issue-token",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "020800e1f505000000000000000000000000050044555354320800447573742054776f00e1f50500000000",
    "hash": "abccd7c45a2a4e43",
    "height": "12500",
    "free": "240",
    "cost": "100000000",
    "period": "240"
   },
   "expected": {
    "persist_height": "12980"
   }
  },
  {
   "id": "14-3-finer-supply",
   "chapter": "14",
   "section": "3",
   "title": "A supply of 100,000,001 is finer than two decimals allow",
   "kind": "14-issue-token",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "020801e1f505000000000000000000000000050044555354320800447573742054776f00e1f50500000000",
    "hash": "abccd7c45a2a4e43",
    "height": "12500",
    "free": "172800",
    "cost": "10000000",
    "period": "172800"
   },
   "expected": {
    "error": "Token supply is finer than the declared decimals allow"
   }
  },
  {
   "id": "14-3-one-byte",
   "chapter": "14",
   "section": "3",
   "title": "A one-byte IssueToken body",
   "kind": "14-issue-token",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "02",
    "hash": "abccd7c45a2a4e43",
    "height": "12500",
    "free": "172800",
    "cost": "10000000",
    "period": "172800"
   },
   "expected": {
    "error": "IssueToken body too short (header)"
   }
  },
  {
   "id": "14-3-decimals-9",
   "chapter": "14",
   "section": "3",
   "title": "Nine decimals are refused",
   "kind": "14-issue-token",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "090800e1f505000000000000000000000000050044555354320800447573742054776f00e1f50500000000",
    "hash": "abccd7c45a2a4e43",
    "height": "12500",
    "free": "172800",
    "cost": "10000000",
    "period": "172800"
   },
   "expected": {
    "error": "Token decimals must be 0..8"
   }
  },
  {
   "id": "14-3-mint-mode-2",
   "chapter": "14",
   "section": "3",
   "title": "Mint mode 2 is undefined",
   "kind": "14-issue-token",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "020400e1f505000000000000000000000000050044555354320800447573742054776f00e1f50500000000",
    "hash": "abccd7c45a2a4e43",
    "height": "12500",
    "free": "172800",
    "cost": "10000000",
    "period": "172800"
   },
   "expected": {
    "error": "Token mint mode must be 0 (fixed supply) or 1 (mintable); flags bits 1-2 had an undefined value"
   }
  },
  {
   "id": "14-4-transfer",
   "chapter": "14",
   "section": "4",
   "title": "The issuer sends 1.00 DUST2 to a type-0 account",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "2",
    "flags": "8",
    "supply": "100000000",
    "backing": "0",
    "persist_height": "1913300",
    "issuer": "sender",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "11",
    "body": "abccd7c45a2a4e4300e1f5050000000000"
   },
   "expected": {
    "sender_units": "0",
    "recipient_units": "100000000",
    "zbc_change": "-2500000",
    "persist_height": "1913300"
   }
  },
  {
   "id": "14-4-finer",
   "chapter": "14",
   "section": "4",
   "title": "0.015 DUST2 is finer than the token's step",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "2",
    "flags": "8",
    "supply": "100000000",
    "backing": "0",
    "persist_height": "1913300",
    "issuer": "sender",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "11",
    "body": "abccd7c45a2a4e4360e3160000000000"
   },
   "expected": {
    "error": "Token amount is finer than the token's decimals allow (token 4849860418062503083 moves multiples of 1000000)"
   }
  },
  {
   "id": "14-4-finer-mined",
   "chapter": "14",
   "section": "4",
   "title": "Mined, the same transfer makes the block invalid",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "2",
    "flags": "8",
    "supply": "100000000",
    "backing": "0",
    "persist_height": "1913300",
    "issuer": "sender",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "11",
    "body": "abccd7c45a2a4e4360e3160000000000",
    "mined": "true"
   },
   "expected": {
    "error": "Transfer amount is finer than the token's decimals allow"
   }
  },
  {
   "id": "14-4-zbs-recipient",
   "chapter": "14",
   "section": "4",
   "title": "A ZBS_ deposit address cannot receive tokens",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "2",
    "flags": "8",
    "supply": "100000000",
    "backing": "0",
    "persist_height": "1913300",
    "issuer": "sender",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "0a0000001111111111111111111111111111111111111111111111111111111111111111",
    "type": "11",
    "body": "abccd7c45a2a4e4300e1f5050000000000"
   },
   "expected": {
    "error": "TransferToken: recipient address type cannot hold tokens (it cannot sign a later spend)"
   },
   "note": "A stateless check: refused at admission, and a block carrying such a transfer is invalid."
  },
  {
   "id": "14-4-full-key-recipient",
   "chapter": "14",
   "section": "4",
   "title": "An envelope recipient in a full-key form is refused before the type checks",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "2",
    "flags": "8",
    "supply": "100000000",
    "backing": "0",
    "persist_height": "1913300",
    "issuer": "sender",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "0400000079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
    "type": "11",
    "body": "abccd7c45a2a4e4300e1f5050000000000"
   },
   "expected": {
    "error": "a full-key account form (an Ethereum or Tron key, a Bitcoin key) is not an account: no transaction can be sent from it; name the 20-byte address (rule canonical_account_forms)"
   },
   "note": "Transaction bytes cannot carry this form (they carry the 20-byte form); a block's named-field form can."
  },
  {
   "id": "14-4-insufficient",
   "chapter": "14",
   "section": "4",
   "title": "Sending more than the sender holds",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "2",
    "flags": "8",
    "supply": "100000000",
    "backing": "0",
    "persist_height": "1913300",
    "issuer": "sender",
    "held": "50000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "11",
    "body": "abccd7c45a2a4e4300e1f5050000000000"
   },
   "expected": {
    "error": "Insufficient token balance for transfer/burn: 4849860418062503083"
   }
  },
  {
   "id": "14-4a-batch",
   "chapter": "14",
   "section": "4a",
   "title": "Two DUST2 transfers to one account in one batch",
   "kind": "14-transfer-batch",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "0200abccd7c45a2a4e432400000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e80700e1f50500000000abccd7c45a2a4e432400000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e80740420f0000000000",
    "recipient": ""
   },
   "expected": {
    "actions": "4849860418062503083 00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807 100000000\n4849860418062503083 00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807 1000000",
    "sums": "4849860418062503083 101000000"
   }
  },
  {
   "id": "14-4a-count-one",
   "chapter": "14",
   "section": "4a",
   "title": "A count of one leaves trailing bytes",
   "kind": "14-transfer-batch",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "0100abccd7c45a2a4e432400000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e80700e1f50500000000abccd7c45a2a4e432400000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e80740420f0000000000",
    "recipient": ""
   },
   "expected": {
    "error": "TransferTokenBatch: trailing bytes after the last transfer"
   }
  },
  {
   "id": "14-4a-envelope-recipient",
   "chapter": "14",
   "section": "4a",
   "title": "A batch with an envelope recipient",
   "kind": "14-transfer-batch",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "0200abccd7c45a2a4e432400000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e80700e1f50500000000abccd7c45a2a4e432400000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e80740420f0000000000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67"
   },
   "expected": {
    "error": "TransferTokenBatchTransaction: a batch names its recipients in its body; the envelope recipient must be empty"
   }
  },
  {
   "id": "14-4a-full-key",
   "chapter": "14",
   "section": "4a",
   "title": "A batch action naming an Ethereum account in its full-key form",
   "kind": "14-transfer-batch",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "0100abccd7c45a2a4e43440400000079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b800e1f50500000000",
    "recipient": ""
   },
   "expected": {
    "error": "TransferTokenBatchTransaction: transfer 0: a full-key account form (an Ethereum or Tron key, a Bitcoin key) is not an account: no transaction can be sent from it; name the 20-byte address (rule canonical_account_forms)"
   }
  },
  {
   "id": "14-4a-twenty-byte",
   "chapter": "14",
   "section": "4a",
   "title": "The same action naming the 20-byte form of that account is accepted",
   "kind": "14-transfer-batch",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "0100abccd7c45a2a4e4318040000007e5f4552091a69125d5dfcb7b8c2659029395bdf00e1f50500000000",
    "recipient": ""
   },
   "expected": {
    "actions": "4849860418062503083 040000007e5f4552091a69125d5dfcb7b8c2659029395bdf 100000000",
    "sums": "4849860418062503083 100000000"
   }
  },
  {
   "id": "14-4a-token-zero",
   "chapter": "14",
   "section": "4a",
   "title": "Token id 0 in a batch",
   "kind": "14-transfer-batch",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "020000000000000000002400000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e80700e1f50500000000abccd7c45a2a4e432400000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e80740420f0000000000",
    "recipient": ""
   },
   "expected": {
    "error": "TransferTokenBatchTransaction: transfer 0: token id 0 is ZBC, which SendZBCBatch moves"
   }
  },
  {
   "id": "14-5-fee-in-token",
   "chapter": "14",
   "section": "5",
   "title": "A transfer whose fee, the floor 2,500,099, is paid in the token",
   "kind": "14-fee-in-token",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "abccd7c45a2a4e4300e1f5050000000001",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "2500099",
    "height": "12600",
    "token_id": "4849860418062503083",
    "decimals": "2",
    "supply": "100000000000",
    "backing": "100000000",
    "persist_height": "0",
    "held": "10000000000",
    "nodes": "11"
   },
   "expected": {
    "floor": "2500099",
    "released": "2500099",
    "fee_units": "2501000000",
    "supply": "97499000000",
    "backing": "97499901",
    "zbc_change": "0",
    "sender_units": "7399000000",
    "recipient_units": "100000000",
    "moved": "true",
    "rows": ""
   }
  },
  {
   "id": "14-5-one-node",
   "chapter": "14",
   "section": "5",
   "title": "With one registered node the same body's floor is 2,500,009 and the units are again 2,501,000,000",
   "kind": "14-fee-in-token",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "abccd7c45a2a4e4300e1f5050000000001",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "2500009",
    "height": "12600",
    "token_id": "4849860418062503083",
    "decimals": "2",
    "supply": "100000000000",
    "backing": "100000000",
    "persist_height": "0",
    "held": "10000000000",
    "nodes": "1"
   },
   "expected": {
    "floor": "2500009",
    "fee_units": "2501000000"
   }
  },
  {
   "id": "14-5-noop-backing",
   "chapter": "14",
   "section": "5",
   "title": "The sender holds the fee units but not amount + units: the floor is settled through the backing",
   "kind": "14-fee-in-token",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "abccd7c45a2a4e4300e1f5050000000001",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "2500099",
    "height": "12600",
    "token_id": "4849860418062503083",
    "decimals": "2",
    "supply": "100000000000",
    "backing": "100000000",
    "persist_height": "0",
    "held": "2550000000",
    "nodes": "11",
    "mined": "true"
   },
   "expected": {
    "moved": "false",
    "sender_units": "49000000",
    "fee_units": "2501000000",
    "supply": "97499000000",
    "backing": "97499901",
    "zbc_change": "0",
    "rows": ""
   }
  },
  {
   "id": "14-5-no-backing",
   "chapter": "14",
   "section": "5",
   "title": "A fee in the token needs a backed token",
   "kind": "14-fee-in-token",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "body": "abccd7c45a2a4e4300e1f5050000000001",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "3000000",
    "height": "12600",
    "token_id": "4849860418062503083",
    "decimals": "2",
    "supply": "100000000000",
    "backing": "0",
    "persist_height": "0",
    "held": "10000000000",
    "nodes": "11",
    "zbc": "10000000"
   },
   "expected": {
    "error": "TransferToken: paying the fee in the token needs a token with ZBC backing (token 4849860418062503083 has none)"
   }
  },
  {
   "id": "14-5-noop-zbc",
   "chapter": "14",
   "section": "5",
   "title": "Mined on a token whose backing is 0, the sender pays the floor in ZBC and gets the overpay back",
   "kind": "14-fee-in-token",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "abccd7c45a2a4e4300e1f5050000000001",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "3000000",
    "height": "12600",
    "token_id": "4849860418062503083",
    "decimals": "2",
    "supply": "100000000000",
    "backing": "0",
    "persist_height": "0",
    "held": "10000000000",
    "nodes": "11",
    "zbc": "10000000",
    "mined": "true"
   },
   "expected": {
    "moved": "false",
    "fee_units": "0",
    "released": "0",
    "zbc_change": "-2500099",
    "rows": "1 -3000000\n22 +499901",
    "sender_units": "10000000000"
   }
  },
  {
   "id": "14-5-noop-no-zbc",
   "chapter": "14",
   "section": "5",
   "title": "The same with a sender holding no ZBC: nothing moves and the fee is not collected",
   "kind": "14-fee-in-token",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "abccd7c45a2a4e4300e1f5050000000001",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "3000000",
    "height": "12600",
    "token_id": "4849860418062503083",
    "decimals": "2",
    "supply": "100000000000",
    "backing": "0",
    "persist_height": "0",
    "held": "10000000000",
    "nodes": "11",
    "zbc": "0",
    "mined": "true"
   },
   "expected": {
    "moved": "false",
    "zbc_change": "0",
    "rows": "22 +3000000\n47 -3000000",
    "sender_units": "10000000000"
   }
  },
  {
   "id": "14-6-ratio",
   "chapter": "14",
   "section": "6",
   "title": "Minting 1 unit of a token with supply 3 and backing 10",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "8",
    "flags": "2",
    "supply": "3",
    "backing": "10",
    "persist_height": "0",
    "issuer": "sender",
    "held": "0",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "12",
    "body": "abccd7c45a2a4e430100000000000000"
   },
   "expected": {
    "backing_change": "4",
    "zbc_change": "-2500004",
    "supply": "4",
    "backing": "14",
    "sender_units": "1"
   }
  },
  {
   "id": "14-6-unbacked",
   "chapter": "14",
   "section": "6",
   "title": "Minting 1.00 of an unbacked mintable token",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "8",
    "flags": "2",
    "supply": "100000000000",
    "backing": "0",
    "persist_height": "0",
    "issuer": "sender",
    "held": "0",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "12",
    "body": "abccd7c45a2a4e4300e1f50500000000"
   },
   "expected": {
    "backing_change": "0",
    "supply": "100100000000",
    "backing": "0"
   }
  },
  {
   "id": "14-6-zusd-stranger",
   "chapter": "14",
   "section": "6",
   "title": "A stranger minting ZUSD is not its issuer",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "1",
    "decimals": "8",
    "flags": "8",
    "supply": "450000000000000",
    "backing": "0",
    "persist_height": "0",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "",
    "type": "12",
    "body": "010000000000000000e1f50500000000",
    "issuer": "other"
   },
   "expected": {
    "error": "Only the issuer can mint: 1"
   }
  },
  {
   "id": "14-6-zusd-issuer",
   "chapter": "14",
   "section": "6",
   "title": "ZUSD's issuer cannot mint it either",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "1",
    "decimals": "8",
    "flags": "8",
    "supply": "450000000000000",
    "backing": "0",
    "persist_height": "0",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "",
    "type": "12",
    "body": "010000000000000000e1f50500000000",
    "issuer": "sender"
   },
   "expected": {
    "error": "Token is not mintable: 1"
   }
  },
  {
   "id": "14-7-redeem",
   "chapter": "14",
   "section": "7",
   "title": "Burning 20 units of a fully backed redeemable token",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "8",
    "flags": "3",
    "supply": "10000000000",
    "backing": "10000000000",
    "persist_height": "0",
    "issuer": "sender",
    "held": "2000000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "13",
    "body": "abccd7c45a2a4e430094357700000000"
   },
   "expected": {
    "backing_change": "-2000000000",
    "zbc_change": "1997500000",
    "supply": "8000000000",
    "backing": "8000000000"
   }
  },
  {
   "id": "14-7-floor",
   "chapter": "14",
   "section": "7",
   "title": "Burning 1 unit of a token with supply 3 and backing 10",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "8",
    "flags": "3",
    "supply": "3",
    "backing": "10",
    "persist_height": "0",
    "issuer": "sender",
    "held": "1",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "13",
    "body": "abccd7c45a2a4e430100000000000000"
   },
   "expected": {
    "backing_change": "-3",
    "supply": "2",
    "backing": "7"
   }
  },
  {
   "id": "14-7-unbacked",
   "chapter": "14",
   "section": "7",
   "title": "Burning the whole supply of an unbacked redeemable token",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "8",
    "flags": "3",
    "supply": "100000000",
    "backing": "0",
    "persist_height": "0",
    "issuer": "sender",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "13",
    "body": "abccd7c45a2a4e4300e1f50500000000"
   },
   "expected": {
    "supply": "0",
    "backing_change": "0"
   }
  },
  {
   "id": "14-7-zusd",
   "chapter": "14",
   "section": "7",
   "title": "ZUSD is not redeemable",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "1",
    "decimals": "8",
    "flags": "8",
    "supply": "450000000000000",
    "backing": "0",
    "persist_height": "0",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "",
    "type": "13",
    "body": "010000000000000000e1f50500000000",
    "issuer": "other"
   },
   "expected": {
    "error": "Token is not redeemable: 1"
   }
  },
  {
   "id": "14-8-finance",
   "chapter": "14",
   "section": "8",
   "title": "FinanceToken with 0.25 ZBC on a token due at 179,902",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "2",
    "flags": "8",
    "supply": "100000000",
    "backing": "0",
    "persist_height": "179902",
    "issuer": "sender",
    "held": "100000000",
    "height": "131300",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "type": "14",
    "body": "abccd7c45a2a4e4340787d0100000000"
   },
   "expected": {
    "persist_height": "611902",
    "zbc_change": "-27500000"
   }
  },
  {
   "id": "14-8-zusd",
   "chapter": "14",
   "section": "8",
   "title": "FinanceToken on ZUSD, which never expires",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "1",
    "decimals": "8",
    "flags": "8",
    "supply": "450000000000000",
    "backing": "0",
    "persist_height": "0",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "",
    "type": "14",
    "body": "01000000000000008096980000000000",
    "issuer": "other"
   },
   "expected": {
    "error": "Token 1 never expires: FinanceToken has nothing to fund"
   }
  },
  {
   "id": "14-8-short",
   "chapter": "14",
   "section": "8",
   "title": "An 8-byte FinanceToken body",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "1",
    "decimals": "8",
    "flags": "8",
    "supply": "450000000000000",
    "backing": "0",
    "persist_height": "0",
    "held": "100000000",
    "height": "12600",
    "fee": "2500000",
    "recipient": "",
    "type": "14",
    "body": "0100000000000000",
    "issuer": "other"
   },
   "expected": {
    "error": "FinanceToken needs token_id + amount: the fee no longer buys persistence"
   }
  },
  {
   "id": "14-9-issued",
   "chapter": "14",
   "section": "9",
   "title": "A token issued at 447 with no payment on DevNet",
   "kind": "13-token-persist",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "op": "issue",
    "token": "20",
    "height": "447",
    "payment": "0",
    "cost": "100000000",
    "period": "240",
    "free": "240"
   },
   "expected": {
    "persist_height": "687"
   }
  },
  {
   "id": "14-9-live",
   "chapter": "14",
   "section": "9",
   "title": "A transfer at 450 with no payment leaves persist_height at 687",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "8",
    "flags": "8",
    "supply": "8000000000",
    "backing": "8000000000",
    "persist_height": "687",
    "issuer": "sender",
    "held": "100000000",
    "height": "450",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "cost": "100000000",
    "period": "240",
    "type": "11",
    "body": "abccd7c45a2a4e4300e1f50500000000"
   },
   "expected": {
    "persist_height": "687"
   }
  },
  {
   "id": "14-9-last",
   "chapter": "14",
   "section": "9",
   "title": "A transfer at 687 is still accepted",
   "kind": "14-token-op",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "8",
    "flags": "8",
    "supply": "8000000000",
    "backing": "8000000000",
    "persist_height": "687",
    "issuer": "sender",
    "held": "100000000",
    "height": "687",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "cost": "100000000",
    "period": "240",
    "type": "11",
    "body": "abccd7c45a2a4e4300e1f50500000000"
   },
   "expected": {
    "persist_height": "687"
   }
  },
  {
   "id": "14-9-expired",
   "chapter": "14",
   "section": "9",
   "title": "At height 688 the token is gone",
   "kind": "14-token-op",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "token_id": "4849860418062503083",
    "decimals": "8",
    "flags": "8",
    "supply": "8000000000",
    "backing": "8000000000",
    "persist_height": "687",
    "issuer": "sender",
    "held": "100000000",
    "height": "688",
    "fee": "2500000",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "cost": "100000000",
    "period": "240",
    "type": "11",
    "body": "abccd7c45a2a4e4300e1f50500000000"
   },
   "expected": {
    "error": "Unknown or expired token: 4849860418062503083"
   }
  }
 ]
}
