github.com/n1ghtfa1l/go-vnt@v0.6.4-alpha.6/core/wavm/tests/env.json (about) 1 { 2 "env": { 3 "previousHash": "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", 4 "currentNumber": 257, 5 "currentGasLimit": 4000000, 6 "currentDifficulty": 256, 7 "currentTimestamp": 1546273000, 8 "currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" 9 }, 10 "exec": { 11 "address": "0xcccccccccccccccccccccccccccccccccccccccc", 12 "value": 0, 13 "gas": 4000000, 14 "caller": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 15 "origin": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 16 "gasPrice": 1000000 17 }, 18 "pre": { 19 "0xcccccccccccccccccccccccccccccccccccccccc": { 20 "balance": "0xDE0B6B3A7640000", 21 "code": "0x0161736d0100789cec596b6c1cd775feeede9ddde5ae48ad4cbdfc5eade558b6283e448a9625d9d22e49514c2445b4445b8e2b50c3dde16aa2e52c33334b49764429b2e5ca7622a769142b8fd61662b7761ab5719fb1d18781a2688bbae88f04490a2445d3a24dfba340f223059ca24170eedc79ec83d2f2155a81f607e79ef39d7be6ccbde79cb9f3f1fd8f5c7dfbf6cb50ad09068075278eb233381a9a9ec651368da3c0d1d09933380a367d14eccc517686fe4cb333a47686d3a1f7f91d5c33a6228f6a539a690324241f37755b7b5cb78f1d28e986ad9960a45efea8a6e66bb4914c3e3fa85a0891d03a64e8b6ae16f5a7b4c7545357c78a9a054e48ec80a91bf641db4498c465839a7d489fd02c5b9d988442aaa641cd3ea81979cd44c4953f6aea05dd70e4d8a0663fa616cb9a23360f6a76bf3e3eaee7ca45fb94a35b35a8d959b5a81a396db7599ac8e4f3a66659881276cba066f7950cdb5473b60b44dc50b2c552eef81ed53a8618a95a5cd5fef2c498663af1258403ddc8aa960c217c704fa6dbf11e19d46c5a05cf7250b5f6ea13baed682219cba2e515cf9ea4a7a4f8dc701cf5ca43a66a58e39a59013589471fd9bca5773493cf07c583e5b1a0b8af5c0c8afdfa54503c503a1114fb2626d1c4db3672cea3f1683c1a8d4695b8f84522914834125394485451c0116e727e3cacb049c698c219429155fc0ccbbc7b219c3803f7f2cd5822fa75655364429b2899a742488c8e1ed3d4c9d131d5d2388b8f8ee6555b1dd58c3c0f25f35aaea89a5a7e77d9c8d97ac9c09d515bb3ec01630a7735d168c8b0bb37e36e77dcdb83549cc623ba00d679426f0fd20957d8bca517f7c448ca964a45ac1756076d53370ab85758b91bff2171bffda513b84fdce3094d352d6c10e3c735edb885fb859f7ef5948507847a4fa96c5ad828dcecd38db2ad596813d2412d5732f216363593e46771bb2bcb2cee685e2f154e1a77ae9062208dbb6e95ba3a69bc79b5c4aad3b83be94ef2d2b8e796a04aa6f116d7ceafbcdee59e4f99d90f8a071799bd352e41caec8796fb8293d9db042c337bbb106417d99170844f947553c3c32b9d55aa4afa47d692ba6ed2ef5c26b6d44dfa5dbe48499ff1454afaac2f52d2f7f922257dbf2f52d20fc476abc5e2989a3b8eddf1f7f8c6101277218b2c929f3a7bf6ac333ae78c92cfd035711b92cfd22073f602fdfd34fd4d9e175018a986fec4907c4e4c882385ecd91f3dbb7c3ad124863f5def8ebeaa4c276234faec1dd389280d764c7bb37f5dcc8e2179c11d3cef0e5ef01c275f74759ff6759f717517ddc173eee025dfeab3aeee37dcc1e7c4208914325f144ffc9b42d182ccab423c2bc45508ed4aa11999df0d2813cb90428a253f2f24295c0a0a5f080a2f0785cb41e18b41e14b41e1cb6e307f10bcef4e86ccd958626bae6458b659ced92513b2ada47443b7a13aa96a3a496acaf41c771302df4c24daf3da58b930aa1be3a53714200cfa85e9f58a65b807ce6f27fc5f88b01500ca1ce0a7e9cf054e731400770178835ecddf132e4200dea6ab125e0fe036007f436254218f74af7f2471d93e05880c737708a55fc2ff497072d483c510ca9084e926a1959ff0603184b25fc21b085efb8c078b219483121e26f88e4b1e2c86500e4b582338f579eec26208e588840d82d77fd983c510ca98844f11bce155cfb918225a001003f01982db281e6512401cc02552758a680f727708e569004d005e21b8c7877b1cf8bc84df2478ab0f6f75e097e4fdfe90e01d3ebcc3812f534c00fe9ce05d3ebccb815f950ff37704f7fbb01822faba74fe6d82f7d003467f5faafe8d547b85eacfa4eac7a43a406b1c7d57aa7e4eaa43a452fe5eae423204840e8b4d19a15b1d76d6eddb72c603048f924ef9819c9121554e6cc4c76846ce09eebfe48c4709fe38e9a23f912a8d548650fd4caaa648650abf9c397e9f23d594f03bcedd21a22dcc99f112c14f09276ba4ea4ba49a26552cc5802480af91ea5ce402e5f1399140e12e06b400f813829e6b3a4be5728409137644a4db653114b78b7f4e945ce277387085d49b96fd1e07e25f011061b15d0c5805e05df2f582739b17c847335527a1ada47a3150a7883dc6a8b681f768d24567992f8a4c3d2e864e19e4a4d50fc9ea92884b585ef22d2f91658b49c3cb4e714cca493fa349bf2576f124f78653de10ca69691925dd15dff28a6f79c5b17c415aae24ddebbee5ebbee5eb8ee5cbd2721de9def42ddff42ddf742c5f9396eda4bbea5b5ef52daf3a966f49cbeda47b6b9f67f9966f298608ffa5dcd73da4fbe3c46105f857dab1b6f877c95138f17105f8396936c67f4c9a58e2930ab08e01ec81f8720644c3898b0af061d2dc1fef264d4cecfc11d27488e1791a7602c916d9b927d41c356fe07f43cd5265aa4641b3a801df42f7014423279936893af123b2a9f701a05ebb070035d57d00a87b3e0a80dae4e300a81ffe1a006a7c2a00ea70e300a895950050ff7a0a0035aa67015047ba480502e0650094cdaf00a066f21a00ea1a570150abf85300d41ffe8a72981a0d00ea04dfa2ae02e0fb00a8ce7f04800a9ad68daaf87dca31f932a27a6da6b567c06a065035decd002ac14e0650bded644e358c3080d27f8c0194e0250650ce7e92019491cf3380f2ed0b0ca06cfa2a032857bec100ca84bf6000edf37b2cf046fc67e62ebc3a36666a536c05bbb7a555e12dc935b7b7ac60236b80503b5bc16e8974b5025c015dc2ed200d6fd996d89ed8792ba038268ee2be5b875a491951e028865a8168708a83c72a2791aaa99df9622a01c4d783b73c92482480c46a0cb53a28b06c39c86bf39dacab959c1c4e3c91005a7a027704de69724f0845ddd0be16a6f701250963ecff5a9ae9c29cd4629699ebd08ca98ef6f68ef676b852a96c4f966d60cab08bfa58fb31329d34b55c6962522f6aed39714480220e15fcfb604a34be4e510a117ee5cc398545f80f910a313006254479ccbf4b1f64f1275e7946610501844372f66a85c5d7f92acaf2b50a8ba795b5917125134bf910253e4f3025195f17e2ae92aa802faf525249f0d62a25d5075f53a5a462e1b75729a972f8dd554a2a237e4f95926a8adf57a5a402e31b99b226be4e4946c6fd07a08ae31d2e70ce07a80479b70bd83e4035c91fac035091f2ed75ee4155cb77bac0611fa032e67f8daa58a9a8f9dfa28e232a73fe0ff5102a7cfe4ff5106a05fc5bf5106a0efc7b604a3c9e5678f0d9a95df07fa937871a08fff77a73a8a5f0ffae37879a0cff9f7a08b51dfe937a083522fe53d4d9176a4dfcfd7a73a859f1ffaf8750fbe29f62629d954d91eff80835347e5e22e9c83b3e422d8e3fcf5898ea881f4ac94a7a271c523a22fc45162802ea82fca2a8a6b4c25ef1016a8bfc12634a0bad5600a03ec9bfc2dc507fdb47a873f257eb21d44bf96bf510eaaefc8d7a08f55bfef57a087560fe8d7a08f564fe477249d6cb25c1f9685c362fcb367345d528a4a634d3d24b466a6b7b677b676a836d968de3a9ee9eae877a3befaf6a5a1d157daa63c4d24cabe384a65baafed431d52874f49772e509cdb0ad8e42a983e61674fb5879ac3d579ae8d0ec639aa995273a72ee27be4b0ee44a465e171cd0a8206d26ac0272c7541396c3dbd45045c7b55385ee871eb4edd2a4fb75079f322a968c424a376c384491cf1f092088f6f620c02809a46c587ac1d0f2c2a4ec7b904493efa2c630e06cf3965ea1a2ab47450588a8200da5caab4b46f954944f447934944f420529a8200155493f55924f95d4532df13433ed3403e9544339d5219c6ae8a66ab2c9a39a02445335cd1420990214539060aa4b2fcd482e55504b15c45205ad54412a55504a1584924727e930c47e628c16c0701620afda2ad48952d9b0616a164ee124f01fd1b0a14e68ec07d14148de9dd550eea16ab69d4ba23d5c8f63573c7a3d52c1ac477d523de6f3e94d1e951eaf64d113f509f46575b8f3e60adabca58a315f1e24cb9382275f2129f25b82ec78ab24c657d670e2abead2e1ab3d267c8d4782aff5f8ef5b3deafb368ff5bedd23bcef58313a7a42b52646736ab1389ab34ba675670d137d974b44dfedf3d0299f865e1760a1d30112fa9e2007bddea3a0ef0d30d01f0a12d0f7b9fcf3069f7ebedf679f1ff0c8e78d3ef7dc16a49e370599e7f64ae2b9a39277eeaca49dbb6a59e7cd3393cedd3370ce3d3594f3963a8c736f0de1fc6035dfbcd5a39b1f0ab0cddbaac9e6ed01ae7947806a7e38c8343f529768de3923cfbcab8266ce54b0ccd90a92b9af8263eeafa098072a18e6dd1ec1fcf66dbd4f3e9da64a4f6f4bcbac4ab7a5053ba91a767adbb85ab4b4b6b46e4c966d2bbdedc9236d69e7552b05fbd4244d0dd099e9d36d151e65225ecba967afa73d8f65779a6ee4b5935a5ece3a5d118037d15135345b5a8ccb62aa0e777fe944e30b70cdfbf7f6cce5fe5e492c4014f2d53d97309c7e30eb5db3dc6973dab56bccbe4eb8a2233516add1d02e2dea1e53d3bc6182157dfd868936d8ed1b0b3a70145aa8f0e79ec76e676f2cf49395016fded25b7b4fdfffa906ac1bdf9e99a65f7f7fbcf7ec92f659e7d53c9777dd8c7be7c632fb17dd52554acd51aab1e8e9bdd2d85b66d1932970905bead7b67b0c5cd238aa0f960bbaa1fead9ccfc5d93694c66ac8f133fb225a9a8636abc2d117ac6ae671b4f3bec196f68419f8be5ada409c0fb6c636d06302fd3b8f954ac5f9e7bdfcbefb957defbb1fa9bfb20f28398f1be6a02c69991b26de5a7a67893f90f764ba1b5bbcbc6aab4bff855c8f5bfa401d0e667ce6191b6c232da75fbf369f7523b71c97cefb603fe09c99b8a1397d4ecdab3dcdb93b659d1c9d5da80d9c1c16bc282a38f505fa5299fbd7dba0ba105d7c3e2480e0e43f0067bf03d7a19d97bc8ce7b1d14373fa07c0bcf8ff39371df15fae1be25054f10fb35f76251f797bd5779e7c3add57ca6be96d46b9586c4b1f52c78a9eb04f3dd9af4ddac7d2db3adbd2874ab65adc5bcaa9c5c76871b775d253dc9c7a73eacda937a7de9c7a73ea1ca6a6870b0319f73790d947976cda7346efbc59b83a5ee52adbe7292ac699e1cc30190df99ae0389b11b6c3854cc3a16dbe5e6823d5ae86b34218c8d07578f8c480d00d0be5c373becd50f56de433ccecb2abd665d74d97375d2eb2cbe16c61d62e2b533d573fca818f64f66d1c10c595d9d3339b82ed6ad0fd47dd3eb338ee47860716cffdd070bfdbd516c5fd560f988ffb5f4e029e986702d6baec9b7d94d775799d37c25c5cceb7f2f6d5df9e6c66afb80e3fbc90dbd43fdf359d31dafd8b11ed7cd776111a659d28e79bfa33aee9f022ace9c0c297c0c07cd774b8fe020c0c7c8cde3c03d9599f16bbaeb9bed9ec102d6d562a67b7bed73e6e67fb32fe3977384399214fcafd2356a6deaf5e781f3e31e7f0ba1a59d83ec7f98073409ecdc26e9e95fb91c575ffc4e2bacf2daefbc2e2ba3fbeb8ee4b8bebde9a9ffbda92da3bf792ea3c7de417000000ffff", 22 "nonce": "0x00", 23 "storage": {} 24 }, 25 "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": { 26 "balance": "0xDE0B6B3A7640000", 27 "code": "", 28 "nonce": "0x00", 29 "storage": {} 30 } 31 }, 32 "testcase": [ 33 { 34 "code": "env/testEnv.compress", 35 "abi": "env/abi.json", 36 "initcase": { 37 "needinit": false, 38 "input": [] 39 }, 40 "tests": [ 41 { 42 "function": "testUint32", 43 "input": [ 44 { 45 "data": "0", 46 "type": "uint32" 47 } 48 ], 49 "wanted": { 50 "data": "0", 51 "type": "uint32" 52 } 53 }, 54 { 55 "function": "testUint32", 56 "input": [ 57 { 58 "data": "4294967295", 59 "type": "uint32" 60 } 61 ], 62 "wanted": { 63 "data": "4294967295", 64 "type": "uint32" 65 } 66 }, 67 { 68 "function": "testUint64", 69 "input": [ 70 { 71 "data": "0", 72 "type": "uint64" 73 } 74 ], 75 "wanted": { 76 "data": "0", 77 "type": "uint64" 78 } 79 }, 80 { 81 "function": "testUint64", 82 "input": [ 83 { 84 "data": "18446744073709551615", 85 "type": "uint64" 86 } 87 ], 88 "wanted": { 89 "data": "18446744073709551615", 90 "type": "uint64" 91 } 92 }, 93 { 94 "function": "testInt32", 95 "input": [ 96 { 97 "data": "-2147483648", 98 "type": "int32" 99 } 100 ], 101 "wanted": { 102 "data": "-2147483648", 103 "type": "int32" 104 } 105 }, 106 { 107 "function": "testInt32", 108 "input": [ 109 { 110 "data": "2147483647", 111 "type": "int32" 112 } 113 ], 114 "wanted": { 115 "data": "2147483647", 116 "type": "int32" 117 } 118 }, 119 { 120 "function": "testInt64", 121 "input": [ 122 { 123 "data": "-9223372036854775808", 124 "type": "int64" 125 } 126 ], 127 "wanted": { 128 "data": "-9223372036854775808", 129 "type": "int64" 130 } 131 }, 132 { 133 "function": "testInt64", 134 "input": [ 135 { 136 "data": "9223372036854775807", 137 "type": "int64" 138 } 139 ], 140 "wanted": { 141 "data": "9223372036854775807", 142 "type": "int64" 143 } 144 }, 145 { 146 "function": "testUint256", 147 "input": [ 148 { 149 "data": "0", 150 "type": "uint256" 151 } 152 ], 153 "wanted": { 154 "data": "0", 155 "type": "uint256" 156 } 157 }, 158 { 159 "function": "testUint256", 160 "input": [ 161 { 162 "data": "11579208923731630000000000000000000000000000000000000000000000000000000000000", 163 "type": "uint256" 164 } 165 ], 166 "wanted": { 167 "data": "11579208923731630000000000000000000000000000000000000000000000000000000000000", 168 "type": "uint256" 169 } 170 }, 171 { 172 "function": "testBool", 173 "input": [ 174 { 175 "data": "false", 176 "type": "bool" 177 } 178 ], 179 "wanted": { 180 "data": "false", 181 "type": "bool" 182 } 183 }, 184 { 185 "function": "testBool", 186 "input": [ 187 { 188 "data": "true", 189 "type": "bool" 190 } 191 ], 192 "wanted": { 193 "data": "true", 194 "type": "bool" 195 } 196 }, 197 { 198 "function": "testString", 199 "input": [ 200 { 201 "data": "short", 202 "type": "string" 203 } 204 ], 205 "wanted": { 206 "data": "short", 207 "type": "string" 208 } 209 }, 210 { 211 "function": "testString", 212 "input": [ 213 { 214 "data": "longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglong", 215 "type": "string" 216 } 217 ], 218 "wanted": { 219 "data": "longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglong", 220 "type": "string" 221 } 222 }, 223 { 224 "function": "testAddress", 225 "input": [ 226 { 227 "data": "0x0", 228 "type": "address" 229 } 230 ], 231 "wanted": { 232 "data": "0x0", 233 "type": "address" 234 } 235 }, 236 { 237 "function": "testAddress", 238 "input": [ 239 { 240 "data": "0x1", 241 "type": "address" 242 } 243 ], 244 "wanted": { 245 "data": "0x1", 246 "type": "address" 247 } 248 }, 249 { 250 "function": "testNow", 251 "input": [], 252 "wanted": { 253 "data": "1546273000", 254 "type": "uint64" 255 } 256 }, 257 { 258 "function": "testYears", 259 "input": [ 260 { 261 "data": "0", 262 "type": "uint64" 263 } 264 ], 265 "wanted": { 266 "data": "0", 267 "type": "uint64" 268 } 269 }, 270 { 271 "function": "testYears", 272 "input": [ 273 { 274 "data": "100", 275 "type": "uint64" 276 } 277 ], 278 "wanted": { 279 "data": "3153600000", 280 "type": "uint64" 281 } 282 }, 283 { 284 "function": "testWeeks", 285 "input": [ 286 { 287 "data": "0", 288 "type": "uint64" 289 } 290 ], 291 "wanted": { 292 "data": "0", 293 "type": "uint64" 294 } 295 }, 296 { 297 "function": "testWeeks", 298 "input": [ 299 { 300 "data": "100", 301 "type": "uint64" 302 } 303 ], 304 "wanted": { 305 "data": "60480000", 306 "type": "uint64" 307 } 308 }, 309 { 310 "function": "testDays", 311 "input": [ 312 { 313 "data": "0", 314 "type": "uint64" 315 } 316 ], 317 "wanted": { 318 "data": "0", 319 "type": "uint64" 320 } 321 }, 322 { 323 "function": "testDays", 324 "input": [ 325 { 326 "data": "100", 327 "type": "uint64" 328 } 329 ], 330 "wanted": { 331 "data": "8640000", 332 "type": "uint64" 333 } 334 }, 335 { 336 "function": "testHours", 337 "input": [ 338 { 339 "data": "0", 340 "type": "uint64" 341 } 342 ], 343 "wanted": { 344 "data": "0", 345 "type": "uint64" 346 } 347 }, 348 { 349 "function": "testHours", 350 "input": [ 351 { 352 "data": "100", 353 "type": "uint64" 354 } 355 ], 356 "wanted": { 357 "data": "360000", 358 "type": "uint64" 359 } 360 }, 361 { 362 "function": "testMinutes", 363 "input": [ 364 { 365 "data": "0", 366 "type": "uint64" 367 } 368 ], 369 "wanted": { 370 "data": "0", 371 "type": "uint64" 372 } 373 }, 374 { 375 "function": "testMinutes", 376 "input": [ 377 { 378 "data": "100", 379 "type": "uint64" 380 } 381 ], 382 "wanted": { 383 "data": "6000", 384 "type": "uint64" 385 } 386 }, 387 { 388 "function": "testSeconds", 389 "input": [ 390 { 391 "data": "0", 392 "type": "uint64" 393 } 394 ], 395 "wanted": { 396 "data": "0", 397 "type": "uint64" 398 } 399 }, 400 { 401 "function": "testSeconds", 402 "input": [ 403 { 404 "data": "100", 405 "type": "uint64" 406 } 407 ], 408 "wanted": { 409 "data": "100", 410 "type": "uint64" 411 } 412 }, 413 { 414 "function": "testGetSender", 415 "input": [], 416 "wanted": { 417 "data": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 418 "type": "address" 419 } 420 }, 421 { 422 "function": "testGetOrigin", 423 "input": [], 424 "wanted": { 425 "data": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 426 "type": "address" 427 } 428 }, 429 { 430 "function": "$testGetValue", 431 "input": [], 432 "wanted": { 433 "data": "0", 434 "type": "uint256" 435 } 436 }, 437 { 438 "function": "testGetBalanceFromAddress", 439 "input": [ 440 { 441 "data": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 442 "type": "address" 443 } 444 ], 445 "wanted": { 446 "data": "1000000000000000000", 447 "type": "uint256" 448 } 449 }, 450 { 451 "function": "testGetBalanceFromAddress", 452 "input": [ 453 { 454 "data": "0xcccccccccccccccccccccccccccccccccccccccc", 455 "type": "address" 456 } 457 ], 458 "wanted": { 459 "data": "1000000000000000000", 460 "type": "uint256" 461 } 462 }, 463 { 464 "function": "testGetBalanceFromAddress", 465 "input": [ 466 { 467 "data": "0x0", 468 "type": "address" 469 } 470 ], 471 "wanted": { 472 "data": "0", 473 "type": "uint256" 474 } 475 }, 476 { 477 "function": "testGetContractAddress", 478 "input": [], 479 "wanted": { 480 "data": "0xcccccccccccccccccccccccccccccccccccccccc", 481 "type": "address" 482 } 483 }, 484 { 485 "function": "testGetBlockHash", 486 "input": [ 487 { 488 "data": "0", 489 "type": "uint64" 490 } 491 ], 492 "wanted": { 493 "data": "0x0000000000000000000000000000000000000000000000000000000000000000", 494 "type": "string" 495 } 496 }, 497 { 498 "function": "testGetBlockHash", 499 "input": [ 500 { 501 "data": "1", 502 "type": "uint64" 503 } 504 ], 505 "wanted": { 506 "data": "0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", 507 "type": "string" 508 } 509 }, 510 { 511 "function": "testGetBlockHash", 512 "input": [ 513 { 514 "data": "256", 515 "type": "uint64" 516 } 517 ], 518 "wanted": { 519 "data": "0x6ca54da2c4784ea43fd88b3402de07ae4bced597cbb19f323b7595857a6720ae", 520 "type": "string" 521 } 522 }, 523 { 524 "function": "testGetBlockHash", 525 "input": [ 526 { 527 "data": "257", 528 "type": "uint64" 529 } 530 ], 531 "wanted": { 532 "data": "0x0000000000000000000000000000000000000000000000000000000000000000", 533 "type": "string" 534 } 535 }, 536 { 537 "function": "testGetBlockNumber", 538 "input": [], 539 "wanted": { 540 "data": "257", 541 "type": "uint64" 542 } 543 }, 544 { 545 "function": "testGetTimestamp", 546 "input": [], 547 "wanted": { 548 "data": "1546273000", 549 "type": "uint64" 550 } 551 }, 552 { 553 "function": "testGetBlockProduser", 554 "input": [], 555 "wanted": { 556 "data": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", 557 "type": "address" 558 } 559 }, 560 { 561 "function": "testSHA3", 562 "input": [ 563 { 564 "data": "111", 565 "type": "string" 566 } 567 ], 568 "wanted": { 569 "data": "0xde838e9e0a4b3e84cad3a9d39f9fe437c20f318b30d3166f08c0cdbee96032ab", 570 "type": "string" 571 } 572 }, 573 { 574 "function": "testEcrecover", 575 "input": [ 576 { 577 "data": "0x2f90786fec13ca1cffaac6f7e688f1bba8e723644c770554898fe48b7665974f", 578 "type": "string" 579 }, 580 { 581 "data": "0x1c", 582 "type": "string" 583 }, 584 { 585 "data": "0x022c30da4f9eb936621fbf3216b691fbd5289c507f5c475eb5a205b3efdcbfd9", 586 "type": "string" 587 }, 588 { 589 "data": "0x56baff0f1d788eb59c063dc4b96fcaa2055516c5408c769fe2a55b4373980577", 590 "type": "string" 591 } 592 ], 593 "wanted": { 594 "data": "0x71562b71999873DB5b286dF957af199Ec94617F7", 595 "type": "address" 596 } 597 }, 598 { 599 "function": "testEcrecover", 600 "input": [ 601 { 602 "data": "0x8309e99c09154c8f03d373c270965cf6d2be0af1fc1395e518596c4d7945b989", 603 "type": "string" 604 }, 605 { 606 "data": "0x1c", 607 "type": "string" 608 }, 609 { 610 "data": "0xdd3d526fb1154524d4c61a9e673d4bfc6fcc9fdcce39108a8486437196dd828b", 611 "type": "string" 612 }, 613 { 614 "data": "0x5d7b80ae2985f43a817e1043ac02f6d421e9704b9bb31f4c3211aac9493d0d91", 615 "type": "string" 616 } 617 ], 618 "wanted": { 619 "data": "0x71562b71999873DB5b286dF957af199Ec94617F7", 620 "type": "address" 621 } 622 }, 623 { 624 "function": "testEcrecover", 625 "input": [ 626 { 627 "data": "7c76ac3cf8823e27c42ef5b4bce89910bb2a1629fb87d94d6859c944391b8967", 628 "type": "string" 629 }, 630 { 631 "data": "1b", 632 "type": "string" 633 }, 634 { 635 "data": "db86f1c95bef6726ce24af7e78f910f210e30274e0c1ba670eed83e2ae1d0abf", 636 "type": "string" 637 }, 638 { 639 "data": "6b26787dd2f200b6d5994dc5a814e3e06d5f361cb866dba7ef9f3d2c876806a1", 640 "type": "string" 641 } 642 ], 643 "wanted": { 644 "data": "0x122369F04f32269598789998de33e3d56E2C507a", 645 "type": "address" 646 } 647 }, 648 { 649 "function": "testEcrecover", 650 "input": [ 651 { 652 "data": "zzzzzz", 653 "type": "string" 654 }, 655 { 656 "data": "zz", 657 "type": "string" 658 }, 659 { 660 "data": "zz", 661 "type": "string" 662 }, 663 { 664 "data": "zzz", 665 "type": "string" 666 } 667 ], 668 "wanted": { 669 "data": "0x0000000000000000000000000000000000000000,", 670 "type": "address" 671 } 672 }, 673 { 674 "function": "testEcrecover", 675 "input": [ 676 { 677 "data": "zzzzzz", 678 "type": "string" 679 }, 680 { 681 "data": "zz", 682 "type": "string" 683 }, 684 { 685 "data": "zz", 686 "type": "string" 687 }, 688 { 689 "data": "zzz", 690 "type": "string" 691 } 692 ], 693 "wanted": { 694 "data": "0x0000000000000000000000000000000000000000,", 695 "type": "address" 696 } 697 }, 698 { 699 "function": "testGetGas", 700 "input": [], 701 "wanted": { 702 "data": "3999996", 703 "type": "uint64" 704 } 705 }, 706 { 707 "function": "testGetGasLimit", 708 "input": [], 709 "wanted": { 710 "data": "4000000", 711 "type": "uint64" 712 } 713 }, 714 { 715 "function": "testSendFromContract", 716 "input": [ 717 { 718 "data": "0x9999999", 719 "type": "address" 720 }, 721 { 722 "data": "4000000", 723 "type": "uint256" 724 } 725 ], 726 "wanted": {} 727 }, 728 { 729 "function": "testGetBalanceFromAddress", 730 "input": [ 731 { 732 "data": "0x9999999", 733 "type": "address" 734 } 735 ], 736 "wanted": { 737 "data": "4000000", 738 "type": "uint256" 739 } 740 }, 741 { 742 "function": "testGetBalanceFromAddress", 743 "input": [ 744 { 745 "data": "0xcccccccccccccccccccccccccccccccccccccccc", 746 "type": "address" 747 } 748 ], 749 "wanted": { 750 "data": "999999999996000000", 751 "type": "uint256" 752 } 753 }, 754 { 755 "function": "testSendFromContract", 756 "input": [ 757 { 758 "data": "0x121212", 759 "type": "address" 760 }, 761 { 762 "data": "2000000000000000000", 763 "type": "uint256" 764 } 765 ], 766 "wanted": {} 767 }, 768 { 769 "function": "testGetBalanceFromAddress", 770 "input": [ 771 { 772 "data": "0x121212", 773 "type": "address" 774 } 775 ], 776 "wanted": { 777 "data": "0", 778 "type": "uint256" 779 } 780 }, 781 { 782 "function": "testGetBalanceFromAddress", 783 "input": [ 784 { 785 "data": "0xcccccccccccccccccccccccccccccccccccccccc", 786 "type": "address" 787 } 788 ], 789 "wanted": { 790 "data": "999999999996000000", 791 "type": "uint256" 792 } 793 }, 794 { 795 "function": "testTransferFromContract", 796 "input": [ 797 { 798 "data": "0x131313", 799 "type": "address" 800 }, 801 { 802 "data": "4000000", 803 "type": "uint256" 804 } 805 ], 806 "wanted": { 807 "data": "true", 808 "type": "bool" 809 } 810 }, 811 { 812 "function": "testGetBalanceFromAddress", 813 "input": [ 814 { 815 "data": "0x131313", 816 "type": "address" 817 } 818 ], 819 "wanted": { 820 "data": "4000000", 821 "type": "uint256" 822 } 823 }, 824 { 825 "function": "testGetBalanceFromAddress", 826 "input": [ 827 { 828 "data": "0xcccccccccccccccccccccccccccccccccccccccc", 829 "type": "address" 830 } 831 ], 832 "wanted": { 833 "data": "999999999992000000", 834 "type": "uint256" 835 } 836 }, 837 { 838 "function": "testTransferFromContract", 839 "input": [ 840 { 841 "data": "0x141414", 842 "type": "address" 843 }, 844 { 845 "data": "2000000000000000000", 846 "type": "uint256" 847 } 848 ], 849 "wanted": { 850 "data": "false", 851 "type": "bool" 852 } 853 }, 854 { 855 "function": "testGetBalanceFromAddress", 856 "input": [ 857 { 858 "data": "0x141414", 859 "type": "address" 860 } 861 ], 862 "wanted": { 863 "data": "0", 864 "type": "uint256" 865 } 866 }, 867 { 868 "function": "testGetBalanceFromAddress", 869 "input": [ 870 { 871 "data": "0xcccccccccccccccccccccccccccccccccccccccc", 872 "type": "address" 873 } 874 ], 875 "wanted": { 876 "data": "999999999992000000", 877 "type": "uint256" 878 } 879 }, 880 { 881 "function": "testAssert", 882 "input": [ 883 { 884 "data": "true", 885 "type": "bool" 886 } 887 ], 888 "wanted": {} 889 }, 890 { 891 "function": "testAssert", 892 "input": [ 893 { 894 "data": "false", 895 "type": "bool" 896 } 897 ], 898 "wanted": {} 899 }, 900 { 901 "function": "testRequire", 902 "input": [ 903 { 904 "data": "true", 905 "type": "bool" 906 } 907 ], 908 "wanted": {} 909 }, 910 { 911 "function": "testRequire", 912 "input": [ 913 { 914 "data": "false", 915 "type": "bool" 916 } 917 ], 918 "wanted": {} 919 }, 920 { 921 "function": "testRevert", 922 "input": [], 923 "wanted": {} 924 }, 925 { 926 "function": "testU256_Add", 927 "input": [ 928 { 929 "data": "1000000000000000000000000000000000", 930 "type": "uint256" 931 }, 932 { 933 "data": "10000000000000000000000000000000000000000000", 934 "type": "uint256" 935 } 936 ], 937 "wanted": { 938 "data": "10000000001000000000000000000000000000000000", 939 "type": "uint256" 940 } 941 }, 942 { 943 "function": "testU256_Sub", 944 "input": [ 945 { 946 "data": "10000000001000000000000000000000000000000000", 947 "type": "uint256" 948 }, 949 { 950 "data": "10000000000000000000000000000000000000000000", 951 "type": "uint256" 952 } 953 ], 954 "wanted": { 955 "data": "1000000000000000000000000000000000", 956 "type": "uint256" 957 } 958 }, 959 { 960 "function": "testU256_Mul", 961 "input": [ 962 { 963 "data": "10000", 964 "type": "uint256" 965 }, 966 { 967 "data": "10000000000000000000000000000000000000000000", 968 "type": "uint256" 969 } 970 ], 971 "wanted": { 972 "data": "100000000000000000000000000000000000000000000000", 973 "type": "uint256" 974 } 975 }, 976 { 977 "function": "testU256_Div", 978 "input": [ 979 { 980 "data": "10000000000000000000000000000000000000000000", 981 "type": "uint256" 982 }, 983 { 984 "data": "10000", 985 "type": "uint256" 986 } 987 ], 988 "wanted": { 989 "data": "1000000000000000000000000000000000000000", 990 "type": "uint256" 991 } 992 }, 993 { 994 "function": "testU256_Div", 995 "input": [ 996 { 997 "data": "100", 998 "type": "uint256" 999 }, 1000 { 1001 "data": "3", 1002 "type": "uint256" 1003 } 1004 ], 1005 "wanted": { 1006 "data": "33", 1007 "type": "uint256" 1008 } 1009 }, 1010 { 1011 "function": "testU256_Mod", 1012 "input": [ 1013 { 1014 "data": "10", 1015 "type": "uint256" 1016 }, 1017 { 1018 "data": "3", 1019 "type": "uint256" 1020 } 1021 ], 1022 "wanted": { 1023 "data": "1", 1024 "type": "uint256" 1025 } 1026 }, 1027 { 1028 "function": "testU256_Mod", 1029 "input": [ 1030 { 1031 "data": "10", 1032 "type": "uint256" 1033 }, 1034 { 1035 "data": "0", 1036 "type": "uint256" 1037 } 1038 ], 1039 "wanted": { 1040 "data": "0", 1041 "type": "uint256" 1042 } 1043 }, 1044 { 1045 "function": "testU256_Pow", 1046 "input": [ 1047 { 1048 "data": "100000000", 1049 "type": "uint256" 1050 }, 1051 { 1052 "data": "8", 1053 "type": "uint256" 1054 } 1055 ], 1056 "wanted": { 1057 "data": "10000000000000000000000000000000000000000000000000000000000000000", 1058 "type": "uint256" 1059 } 1060 }, 1061 { 1062 "function": "testU256_Shl", 1063 "input": [ 1064 { 1065 "data": "1", 1066 "type": "uint256" 1067 }, 1068 { 1069 "data": "1", 1070 "type": "uint256" 1071 } 1072 ], 1073 "wanted": { 1074 "data": "2", 1075 "type": "uint256" 1076 } 1077 }, 1078 { 1079 "function": "testU256_Shl", 1080 "input": [ 1081 { 1082 "data": "1", 1083 "type": "uint256" 1084 }, 1085 { 1086 "data": "10", 1087 "type": "uint256" 1088 } 1089 ], 1090 "wanted": { 1091 "data": "1024", 1092 "type": "uint256" 1093 } 1094 }, 1095 { 1096 "function": "testU256_Shl", 1097 "input": [ 1098 { 1099 "data": "1", 1100 "type": "uint256" 1101 }, 1102 { 1103 "data": "256", 1104 "type": "uint256" 1105 } 1106 ], 1107 "wanted": { 1108 "data": "0", 1109 "type": "uint256" 1110 } 1111 }, 1112 { 1113 "function": "testU256_Shr", 1114 "input": [ 1115 { 1116 "data": "1", 1117 "type": "uint256" 1118 }, 1119 { 1120 "data": "1", 1121 "type": "uint256" 1122 } 1123 ], 1124 "wanted": { 1125 "data": "0", 1126 "type": "uint256" 1127 } 1128 }, 1129 { 1130 "function": "testU256_Shr", 1131 "input": [ 1132 { 1133 "data": "2", 1134 "type": "uint256" 1135 }, 1136 { 1137 "data": "1", 1138 "type": "uint256" 1139 } 1140 ], 1141 "wanted": { 1142 "data": "1", 1143 "type": "uint256" 1144 } 1145 }, 1146 { 1147 "function": "testU256_Shr", 1148 "input": [ 1149 { 1150 "data": "2", 1151 "type": "uint256" 1152 }, 1153 { 1154 "data": "2", 1155 "type": "uint256" 1156 } 1157 ], 1158 "wanted": { 1159 "data": "0", 1160 "type": "uint256" 1161 } 1162 }, 1163 { 1164 "function": "testU256_Shr", 1165 "input": [ 1166 { 1167 "data": "1024", 1168 "type": "uint256" 1169 }, 1170 { 1171 "data": "10", 1172 "type": "uint256" 1173 } 1174 ], 1175 "wanted": { 1176 "data": "1", 1177 "type": "uint256" 1178 } 1179 }, 1180 { 1181 "function": "testU256_And", 1182 "input": [ 1183 { 1184 "data": "1", 1185 "type": "uint256" 1186 }, 1187 { 1188 "data": "1", 1189 "type": "uint256" 1190 } 1191 ], 1192 "wanted": { 1193 "data": "1", 1194 "type": "uint256" 1195 } 1196 }, 1197 { 1198 "function": "testU256_And", 1199 "input": [ 1200 { 1201 "data": "1", 1202 "type": "uint256" 1203 }, 1204 { 1205 "data": "0", 1206 "type": "uint256" 1207 } 1208 ], 1209 "wanted": { 1210 "data": "0", 1211 "type": "uint256" 1212 } 1213 }, 1214 { 1215 "function": "testU256_And", 1216 "input": [ 1217 { 1218 "data": "1021", 1219 "type": "uint256" 1220 }, 1221 { 1222 "data": "1022", 1223 "type": "uint256" 1224 } 1225 ], 1226 "wanted": { 1227 "data": "1020", 1228 "type": "uint256" 1229 } 1230 }, 1231 { 1232 "function": "testU256_Or", 1233 "input": [ 1234 { 1235 "data": "1", 1236 "type": "uint256" 1237 }, 1238 { 1239 "data": "1", 1240 "type": "uint256" 1241 } 1242 ], 1243 "wanted": { 1244 "data": "1", 1245 "type": "uint256" 1246 } 1247 }, 1248 { 1249 "function": "testU256_Or", 1250 "input": [ 1251 { 1252 "data": "1", 1253 "type": "uint256" 1254 }, 1255 { 1256 "data": "0", 1257 "type": "uint256" 1258 } 1259 ], 1260 "wanted": { 1261 "data": "1", 1262 "type": "uint256" 1263 } 1264 }, 1265 { 1266 "function": "testU256_Or", 1267 "input": [ 1268 { 1269 "data": "0", 1270 "type": "uint256" 1271 }, 1272 { 1273 "data": "1", 1274 "type": "uint256" 1275 } 1276 ], 1277 "wanted": { 1278 "data": "1", 1279 "type": "uint256" 1280 } 1281 }, 1282 { 1283 "function": "testU256_Or", 1284 "input": [ 1285 { 1286 "data": "1023", 1287 "type": "uint256" 1288 }, 1289 { 1290 "data": "1022", 1291 "type": "uint256" 1292 } 1293 ], 1294 "wanted": { 1295 "data": "1023", 1296 "type": "uint256" 1297 } 1298 }, 1299 { 1300 "function": "testU256_Xor", 1301 "input": [ 1302 { 1303 "data": "1", 1304 "type": "uint256" 1305 }, 1306 { 1307 "data": "1", 1308 "type": "uint256" 1309 } 1310 ], 1311 "wanted": { 1312 "data": "0", 1313 "type": "uint256" 1314 } 1315 }, 1316 { 1317 "function": "testU256_Xor", 1318 "input": [ 1319 { 1320 "data": "1", 1321 "type": "uint256" 1322 }, 1323 { 1324 "data": "0", 1325 "type": "uint256" 1326 } 1327 ], 1328 "wanted": { 1329 "data": "1", 1330 "type": "uint256" 1331 } 1332 }, 1333 { 1334 "function": "testU256_Xor", 1335 "input": [ 1336 { 1337 "data": "0", 1338 "type": "uint256" 1339 }, 1340 { 1341 "data": "1", 1342 "type": "uint256" 1343 } 1344 ], 1345 "wanted": { 1346 "data": "1", 1347 "type": "uint256" 1348 } 1349 }, 1350 { 1351 "function": "testU256_Xor", 1352 "input": [ 1353 { 1354 "data": "1023", 1355 "type": "uint256" 1356 }, 1357 { 1358 "data": "1022", 1359 "type": "uint256" 1360 } 1361 ], 1362 "wanted": { 1363 "data": "1", 1364 "type": "uint256" 1365 } 1366 }, 1367 { 1368 "function": "testU256_Cmp", 1369 "input": [ 1370 { 1371 "data": "10000000000000000000000000000000000000000000000000000000", 1372 "type": "uint256" 1373 }, 1374 { 1375 "data": "100000000000000000000000000000000000000000000000000000000", 1376 "type": "uint256" 1377 } 1378 ], 1379 "wanted": { 1380 "data": "-1", 1381 "type": "int32" 1382 } 1383 }, 1384 { 1385 "function": "testU256_Cmp", 1386 "input": [ 1387 { 1388 "data": "100000000000000000000000000000000000000000000000000000000", 1389 "type": "uint256" 1390 }, 1391 { 1392 "data": "100000000000000000000000000000000000000000000000000000000", 1393 "type": "uint256" 1394 } 1395 ], 1396 "wanted": { 1397 "data": "0", 1398 "type": "int32" 1399 } 1400 }, 1401 { 1402 "function": "testU256_Cmp", 1403 "input": [ 1404 { 1405 "data": "1000000000000000000000000000000000000000000000000000000000", 1406 "type": "uint256" 1407 }, 1408 { 1409 "data": "100000000000000000000000000000000000000000000000000000000", 1410 "type": "uint256" 1411 } 1412 ], 1413 "wanted": { 1414 "data": "1", 1415 "type": "int32" 1416 } 1417 }, 1418 { 1419 "function": "testfunctionnoexist", 1420 "input": [], 1421 "wanted": {} 1422 } 1423 ] 1424 }, 1425 { 1426 "code": "uint256/testUint256.compress", 1427 "abi": "uint256/abi.json", 1428 "initcase": { 1429 "needinit": true, 1430 "input": [] 1431 }, 1432 "tests": [ 1433 { 1434 "function": "test", 1435 "input": [ 1436 { 1437 "data": "1000000000000000000000000000000000", 1438 "type": "uint256" 1439 }, 1440 { 1441 "data": "10000000000000000000000000000000000000000000", 1442 "type": "uint256" 1443 } 1444 ], 1445 "wanted": { 1446 "data": "10000000001000000000000000000000000000000000", 1447 "type": "uint256" 1448 } 1449 }, 1450 { 1451 "function": "testU256From", 1452 "input": [ 1453 { 1454 "data": "1000000000000000000000000000000000", 1455 "type": "string" 1456 } 1457 ], 1458 "wanted": { 1459 "data": "1000000000000000000000000000000000", 1460 "type": "uint256" 1461 } 1462 }, 1463 { 1464 "function": "testU256From", 1465 "input": [ 1466 { 1467 "data": "115792089237316195423570985008687907853269984665640564039457584007913129639935", 1468 "type": "string" 1469 } 1470 ], 1471 "wanted": { 1472 "data": "115792089237316195423570985008687907853269984665640564039457584007913129639935", 1473 "type": "uint256" 1474 } 1475 }, 1476 { 1477 "function": "testU256From", 1478 "input": [ 1479 { 1480 "data": "115792089237316195423570985008687907853269984665640564039457584007913129639936", 1481 "type": "string" 1482 } 1483 ], 1484 "wanted": { 1485 "data": "0", 1486 "type": "uint256" 1487 } 1488 }, 1489 { 1490 "function": "testU256FromU64", 1491 "input": [ 1492 { 1493 "data": "0", 1494 "type": "uint64" 1495 } 1496 ], 1497 "wanted": { 1498 "data": "0", 1499 "type": "uint256" 1500 } 1501 }, 1502 { 1503 "function": "testU256FromU64", 1504 "input": [ 1505 { 1506 "data": "18446744073709551615", 1507 "type": "uint64" 1508 } 1509 ], 1510 "wanted": { 1511 "data": "18446744073709551615", 1512 "type": "uint256" 1513 } 1514 }, 1515 { 1516 "function": "testU256FromI64", 1517 "input": [ 1518 { 1519 "data": "-1", 1520 "type": "int64" 1521 } 1522 ], 1523 "wanted": { 1524 "data": "115792089237316195423570985008687907853269984665640564039457584007913129639935", 1525 "type": "uint256" 1526 } 1527 }, 1528 { 1529 "function": "testU256FromI64", 1530 "input": [ 1531 { 1532 "data": "9223372036854775807", 1533 "type": "int64" 1534 } 1535 ], 1536 "wanted": { 1537 "data": "9223372036854775807", 1538 "type": "uint256" 1539 } 1540 }, 1541 { 1542 "function": "testU256ToString", 1543 "input": [ 1544 { 1545 "data": "11111", 1546 "type": "uint256" 1547 } 1548 ], 1549 "wanted": { 1550 "data": "11111", 1551 "type": "string" 1552 } 1553 } 1554 ] 1555 }, 1556 { 1557 "code": "event/init.compress", 1558 "abi": "event/abi.json", 1559 "initcase": { 1560 "needinit": true, 1561 "input": [] 1562 }, 1563 "tests": [ 1564 { 1565 "function": "testEvent", 1566 "input": [ 1567 { 1568 "data": "string1111111", 1569 "type": "string" 1570 }, 1571 { 1572 "data": "0xadeeedadsdsa1111111111", 1573 "type": "address" 1574 }, 1575 { 1576 "data": "18446744073709551615", 1577 "type": "uint64" 1578 }, 1579 { 1580 "data": "1111", 1581 "type": "uint32" 1582 }, 1583 { 1584 "data": "-9223372036854775808", 1585 "type": "int64" 1586 }, 1587 { 1588 "data": "1111", 1589 "type": "int32" 1590 }, 1591 { 1592 "data": "1111", 1593 "type": "uint256" 1594 }, 1595 { 1596 "data": "false", 1597 "type": "bool" 1598 } 1599 ], 1600 "wanted": {}, 1601 "event": [ 1602 { 1603 "data": "string1", 1604 "type": "string" 1605 }, 1606 { 1607 "data": "0xadeeedadsdsa1111111111", 1608 "type": "address" 1609 }, 1610 { 1611 "data": "1111", 1612 "type": "uint64" 1613 }, 1614 { 1615 "data": "1111", 1616 "type": "uint32" 1617 }, 1618 { 1619 "data": "-9223372036854775808", 1620 "type": "int64" 1621 }, 1622 { 1623 "data": "1111", 1624 "type": "int32" 1625 }, 1626 { 1627 "data": "1111", 1628 "type": "uint256" 1629 }, 1630 { 1631 "data": "true", 1632 "type": "bool" 1633 } 1634 ] 1635 } 1636 ] 1637 } 1638 ] 1639 }