|
| 1 | +{ |
| 2 | + "comment": "raw field is used only for debugging.", |
| 3 | + "setup": { |
| 4 | + "mnemonic": "all all all all all all all all all all all all", |
| 5 | + "passphrase": "" |
| 6 | + }, |
| 7 | + "tests": [ |
| 8 | + { |
| 9 | + "name": "TransferContract", |
| 10 | + "parameters": { |
| 11 | + "address_n": "m/44'/195'/0'/0/0", |
| 12 | + "tx": { |
| 13 | + "ref_block_bytes": "e942", |
| 14 | + "ref_block_hash": "6394747da9fee421", |
| 15 | + "expiration": 1752562632000, |
| 16 | + "timestamp": 1752562572000 |
| 17 | + }, |
| 18 | + "contract": { |
| 19 | + "_message_type": "TronTransferContract", |
| 20 | + "owner_address": "TY72iA3SBtrds3QLYsS7LwYfkzXwAXCRWT", |
| 21 | + "to_address": "TFz2CJn9CJb8C4i1Gke3jmZX2fRMJxniH2", |
| 22 | + "amount": 18123456 |
| 23 | + }, |
| 24 | + "raw": { |
| 25 | + "visible": false, |
| 26 | + "txID": "91813c4e057a4c881d9dc4981f041c33cffb17c41e860a53eb68e7995f5de821", |
| 27 | + "raw_data_hex": "0a02e94222086394747da9fee42140c08afee680335a68080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412330a1541f2cd810c48c401d392ead3c6e1e1cb9f57750a5812154141f82674a30ae1328745d08afe2d1a0a2419528318c095d20870e0b5fae68033", |
| 28 | + "raw_data": { |
| 29 | + "contract": [ |
| 30 | + { |
| 31 | + "parameter": { |
| 32 | + "value": { |
| 33 | + "to_address": "4141f82674a30ae1328745d08afe2d1a0a24195283", |
| 34 | + "owner_address": "41f2cd810c48c401d392ead3c6e1e1cb9f57750a58", |
| 35 | + "amount": 18123456 |
| 36 | + }, |
| 37 | + "type_url": "type.googleapis.com/protocol.TransferContract" |
| 38 | + }, |
| 39 | + "type": "TransferContract" |
| 40 | + } |
| 41 | + ], |
| 42 | + "ref_block_bytes": "e942", |
| 43 | + "ref_block_hash": "6394747da9fee421", |
| 44 | + "expiration": 1752562632000, |
| 45 | + "timestamp": 1752562572000 |
| 46 | + } |
| 47 | + } |
| 48 | + }, |
| 49 | + "result": { |
| 50 | + "signature": "a7f8602b02413e9dded0170daa5b4ada9a2679198af276be456f4faea1bc326f5070789bec5e6471de3f726f4fe0c9daced8df183e4a62804db26d5650c59a521C" |
| 51 | + } |
| 52 | + }, |
| 53 | + { |
| 54 | + "name": "TransferContract_owner_address_not_equals_trezor_account", |
| 55 | + "parameters": { |
| 56 | + "address_n": "m/44'/195'/0'/0/1", |
| 57 | + "tx": { |
| 58 | + "ref_block_bytes": "e942", |
| 59 | + "ref_block_hash": "6394747da9fee421", |
| 60 | + "expiration": 1752562632000, |
| 61 | + "timestamp": 1752562572000 |
| 62 | + }, |
| 63 | + "contract": { |
| 64 | + "_message_type": "TronTransferContract", |
| 65 | + "owner_address": "TY72iA3SBtrds3QLYsS7LwYfkzXwAXCRWT", |
| 66 | + "to_address": "TFz2CJn9CJb8C4i1Gke3jmZX2fRMJxniH2", |
| 67 | + "amount": 18123456 |
| 68 | + }, |
| 69 | + "raw": { |
| 70 | + "visible": false, |
| 71 | + "txID": "91813c4e057a4c881d9dc4981f041c33cffb17c41e860a53eb68e7995f5de821", |
| 72 | + "raw_data_hex": "0a02e94222086394747da9fee42140c08afee680335a68080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412330a1541f2cd810c48c401d392ead3c6e1e1cb9f57750a5812154141f82674a30ae1328745d08afe2d1a0a2419528318c095d20870e0b5fae68033", |
| 73 | + "raw_data": { |
| 74 | + "contract": [ |
| 75 | + { |
| 76 | + "parameter": { |
| 77 | + "value": { |
| 78 | + "to_address": "4141f82674a30ae1328745d08afe2d1a0a24195283", |
| 79 | + "owner_address": "41f2cd810c48c401d392ead3c6e1e1cb9f57750a58", |
| 80 | + "amount": 18123456 |
| 81 | + }, |
| 82 | + "type_url": "type.googleapis.com/protocol.TransferContract" |
| 83 | + }, |
| 84 | + "type": "TransferContract" |
| 85 | + } |
| 86 | + ], |
| 87 | + "ref_block_bytes": "e942", |
| 88 | + "ref_block_hash": "6394747da9fee421", |
| 89 | + "expiration": 1752562632000, |
| 90 | + "timestamp": 1752562572000 |
| 91 | + } |
| 92 | + } |
| 93 | + }, |
| 94 | + "result": { |
| 95 | + "signature": "14d5eae24e33eb6af03998ea845f98e105e8a2d3206b12163b11702ed3479f41719f757c50e2d85ab6b41ff28ce9752a6bbb74158b8a1aaffb44a837466d93ba1B" |
| 96 | + } |
| 97 | + }, |
| 98 | + { |
| 99 | + "name": "TransferContract_amount_int64_max", |
| 100 | + "parameters": { |
| 101 | + "address_n": "m/44'/195'/0'/0/0", |
| 102 | + "tx": { |
| 103 | + "ref_block_bytes": "0fc4", |
| 104 | + "ref_block_hash": "9643b084bc8b5cde", |
| 105 | + "expiration": 1752568944000, |
| 106 | + "timestamp": 1752571244333 |
| 107 | + }, |
| 108 | + "contract": { |
| 109 | + "_message_type": "TronTransferContract", |
| 110 | + "owner_address": "TY72iA3SBtrds3QLYsS7LwYfkzXwAXCRWT", |
| 111 | + "to_address": "TFz2CJn9CJb8C4i1Gke3jmZX2fRMJxniH2", |
| 112 | + "amount": 9223372036854775807 |
| 113 | + }, |
| 114 | + "comment": "tornweb JavaScript SDK does not support big integers" |
| 115 | + }, |
| 116 | + "result": { |
| 117 | + "signature": "36db819a6c50b8c770ff1067a2753692fa8c8bfa7efde8ddfc2f891f7053d9955f6ffd0ee7d6217b448ac3515d97f6877159b721f2a78da78d1fcc10c1019dd51b" |
| 118 | + } |
| 119 | + }, |
| 120 | + { |
| 121 | + "name": "Memo_hello_world", |
| 122 | + "parameters": { |
| 123 | + "address_n": "m/44'/195'/0'/0/0", |
| 124 | + "tx": { |
| 125 | + "ref_block_bytes": "ea2a", |
| 126 | + "ref_block_hash": "d43320ee5a8b677f", |
| 127 | + "expiration": 1752563334000, |
| 128 | + "timestamp": 1752563274000, |
| 129 | + "data": "68656c6c6f20776f726c6421" |
| 130 | + }, |
| 131 | + "contract": { |
| 132 | + "_message_type": "TronTransferContract", |
| 133 | + "owner_address": "TY72iA3SBtrds3QLYsS7LwYfkzXwAXCRWT", |
| 134 | + "to_address": "TFz2CJn9CJb8C4i1Gke3jmZX2fRMJxniH2", |
| 135 | + "amount": 18123456 |
| 136 | + }, |
| 137 | + "raw": { |
| 138 | + "txID": "2b166e72fe1cfb71345d5061d15e10ac2cc5ee3bb85b5ad34a14c9bf112b8372", |
| 139 | + "raw_data": { |
| 140 | + "data": "68656c6c6f20776f726c6421", |
| 141 | + "contract": [ |
| 142 | + { |
| 143 | + "parameter": { |
| 144 | + "value": { |
| 145 | + "amount": 18123456, |
| 146 | + "owner_address": "41f2cd810c48c401d392ead3c6e1e1cb9f57750a58", |
| 147 | + "to_address": "4141f82674a30ae1328745d08afe2d1a0a24195283" |
| 148 | + }, |
| 149 | + "type_url": "type.googleapis.com/protocol.TransferContract" |
| 150 | + }, |
| 151 | + "type": "TransferContract" |
| 152 | + } |
| 153 | + ], |
| 154 | + "ref_block_bytes": "ea2a", |
| 155 | + "ref_block_hash": "d43320ee5a8b677f", |
| 156 | + "expiration": 1752563334000, |
| 157 | + "timestamp": 1752563274000 |
| 158 | + }, |
| 159 | + "raw_data_hex": "0a02ea2a2208d43320ee5a8b677f40f0f6a8e78033520c68656c6c6f20776f726c64215a68080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412330a1541f2cd810c48c401d392ead3c6e1e1cb9f57750a5812154141f82674a30ae1328745d08afe2d1a0a2419528318c095d2087090a2a5e78033", |
| 160 | + "visible": false |
| 161 | + } |
| 162 | + }, |
| 163 | + "result": { |
| 164 | + "signature": "7b43c3e8977db4f5475656eec2e643bf1549d923f29c28c009c85b51556a78602aa0f3f2780cb19655dfa8d4eb2102a3c6b3440ce5b7448a814c860cdc925dd21C" |
| 165 | + } |
| 166 | + }, |
| 167 | + { |
| 168 | + "name": "Memo_long_hex_string", |
| 169 | + "parameters": { |
| 170 | + "address_n": "m/44'/195'/0'/0/0", |
| 171 | + "tx": { |
| 172 | + "ref_block_bytes": "ea54", |
| 173 | + "ref_block_hash": "e5ae03970dae489a", |
| 174 | + "expiration": 1752563466000, |
| 175 | + "timestamp": 1752563406000, |
| 176 | + "data": "e7fb3e7e39d4c650449e8d80c2731c4cc7fe0c7888a189a6eb1ead3621729a3ae8578299b2a1a35edf5ce3d9ae732cc4f202a34304900156ab37a78917609ae58dae01cb4de5ed98ff79a56e7f0e41f6042d3a734ae3b438209294a8a1899ddd4dee47c1cc86a0b2bf7d57d8457dfeed5fc2a24cd553c08a831f10a02ce5fb776d287e71e6a1a899ae966a0928f01ce6d3c4b0ee5151872c6dd80fefbfb79cff1949bfb5aba76b624e4c58eadf6c8ad97680e34d50807dc628dce44b39f3f405d5da406eb109cabdfc8c782be22f39c2e8814946e69977781fd66c691416b2785f41b508db37e819257751ee97794a57d7a8db5fb4b2cfce6031b76874922010" |
| 177 | + }, |
| 178 | + "contract": { |
| 179 | + "_message_type": "TronTransferContract", |
| 180 | + "owner_address": "TY72iA3SBtrds3QLYsS7LwYfkzXwAXCRWT", |
| 181 | + "to_address": "TFz2CJn9CJb8C4i1Gke3jmZX2fRMJxniH2", |
| 182 | + "amount": 18123456 |
| 183 | + }, |
| 184 | + "raw": { |
| 185 | + "txID": "005fe60597b52c7d9e021795f084ca7da323f4fc08a406292443ce7a4d480dc5", |
| 186 | + "raw_data": { |
| 187 | + "data": "e7fb3e7e39d4c650449e8d80c2731c4cc7fe0c7888a189a6eb1ead3621729a3ae8578299b2a1a35edf5ce3d9ae732cc4f202a34304900156ab37a78917609ae58dae01cb4de5ed98ff79a56e7f0e41f6042d3a734ae3b438209294a8a1899ddd4dee47c1cc86a0b2bf7d57d8457dfeed5fc2a24cd553c08a831f10a02ce5fb776d287e71e6a1a899ae966a0928f01ce6d3c4b0ee5151872c6dd80fefbfb79cff1949bfb5aba76b624e4c58eadf6c8ad97680e34d50807dc628dce44b39f3f405d5da406eb109cabdfc8c782be22f39c2e8814946e69977781fd66c691416b2785f41b508db37e819257751ee97794a57d7a8db5fb4b2cfce6031b76874922010", |
| 188 | + "contract": [ |
| 189 | + { |
| 190 | + "parameter": { |
| 191 | + "value": { |
| 192 | + "amount": 18123456, |
| 193 | + "owner_address": "41f2cd810c48c401d392ead3c6e1e1cb9f57750a58", |
| 194 | + "to_address": "4141f82674a30ae1328745d08afe2d1a0a24195283" |
| 195 | + }, |
| 196 | + "type_url": "type.googleapis.com/protocol.TransferContract" |
| 197 | + }, |
| 198 | + "type": "TransferContract" |
| 199 | + } |
| 200 | + ], |
| 201 | + "ref_block_bytes": "ea54", |
| 202 | + "ref_block_hash": "e5ae03970dae489a", |
| 203 | + "expiration": 1752563466000, |
| 204 | + "timestamp": 1752563406000 |
| 205 | + }, |
| 206 | + "raw_data_hex": "0a02ea542208e5ae03970dae489a4090feb0e78033528002e7fb3e7e39d4c650449e8d80c2731c4cc7fe0c7888a189a6eb1ead3621729a3ae8578299b2a1a35edf5ce3d9ae732cc4f202a34304900156ab37a78917609ae58dae01cb4de5ed98ff79a56e7f0e41f6042d3a734ae3b438209294a8a1899ddd4dee47c1cc86a0b2bf7d57d8457dfeed5fc2a24cd553c08a831f10a02ce5fb776d287e71e6a1a899ae966a0928f01ce6d3c4b0ee5151872c6dd80fefbfb79cff1949bfb5aba76b624e4c58eadf6c8ad97680e34d50807dc628dce44b39f3f405d5da406eb109cabdfc8c782be22f39c2e8814946e69977781fd66c691416b2785f41b508db37e819257751ee97794a57d7a8db5fb4b2cfce6031b768749220105a68080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412330a1541f2cd810c48c401d392ead3c6e1e1cb9f57750a5812154141f82674a30ae1328745d08afe2d1a0a2419528318c095d20870b0a9ade78033", |
| 207 | + "visible": false |
| 208 | + } |
| 209 | + }, |
| 210 | + "result": { |
| 211 | + "signature": "22cc2bf4942334a0ac8d5536f372cb514b0768b32abfa2fa9bdc16067e92ad8313f23848beb7d938134fe829ef2d46409e950b4dea7312977ff1e478b2e5b90a1B" |
| 212 | + } |
| 213 | + } |
| 214 | + ] |
| 215 | +} |
0 commit comments