tx · 9zgD8NoTc6ZJ1zbBFLpqNarUF5BXD7PenxGTucHDMARM 3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX: -0.10000000 Waves 2022.01.13 18:56 [1877394] smart account 3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX > SELF 0.00000000 Waves
{ "type": 13, "id": "9zgD8NoTc6ZJ1zbBFLpqNarUF5BXD7PenxGTucHDMARM", "fee": 10000000, "feeAssetId": null, "timestamp": 1642089378419, "version": 2, "chainId": 84, "sender": "3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX", "senderPublicKey": "AcdhXSF5aWK6Lmdtv3cyCZ7vehbxsNNGagWCd2FpZo1M", "proofs": [ "5yFh8UpzaSHxbZUXg61AXLjwLErQeaoVaFe1b9kv38JezwgNSbqhJchrM8ACXFTwq6VAvP14utd2W9gEwg2q7JSe" ], "script": "base64:AAIFAAAAAAAAABQIAhIFCgMIAQESABIHCgUBCAgICAAAAA8AAAAAE2dhbWVNYXN0ZXJQdWJsaWNLZXkBAAAAIF1t2Oq4Jp6DRGnJV2x+n66xACBB37xnTL7cQnLLqBNvAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGTYmFzZTY0Ok1JSUJJekFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUkFBTUlJQkN3S0NBUUlBK0NwYnpNQktwcSs3VmFyU0RITFcwd1FTb2gyTFRiZ2wxckFoZnJ1WkdDanQ2TU80bzF2MWlMcUt5TkgzRkpzdndsTFVxbXFFN0UyV2w3TGJJUEEyNlB4TzJYQ0RmdmowT1dwN2NFSmtVQkVpeVBZQ24raXVQWFVQd3Vkb0ZnTTRXSGYwSVBiREoyTzZPZ3pRbEJCbU51Nk93cjduYUlUaUpyUEF2YWtQZ0FkbVVQdjRyT3pjdTZCUjBUOEd3c3p3cHJ2d1dabEtGNkFkMDBvbUxGRG14NjZIdkJFNTFzUkJpWElSYkpuakRobG9waXplNExvUjFGSXJRYUF1MXNmczViRUhMQ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NhcmRzMgUAAAAGY2FyZHMzCQAAAgAAAAECAAAAEUluaXRHYW1lIFJlcXVpcmVkAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnI2iCP", "height": 1877394, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9tTeEjZKwdLMcf5MqFQ4ypKk6pAo1jcxvxoMP1EAAUiZ Next: Bx6s2W9sv91RCp19DALgsMeR5t43NJQC1ZZzZ68Ju6aE Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | func q (l) = (("G_" + toString(l)) + "_OFFSET") | |
38 | 38 | ||
39 | 39 | ||
40 | - | func r (l,s,t) = [IntegerEntry(c, l), IntegerEntry(p(l), 0), IntegerEntry(q(l), s), StringEntry(k(l, 0), t)] | |
40 | + | func r (l,s,t,u,v,w) = [IntegerEntry(c, l), IntegerEntry(p(l), 0), IntegerEntry(q(l), s), StringEntry(k(l, 0), t), StringEntry(k(l, 1), u), StringEntry(k(l, 2), v), StringEntry(k(l, 3), w)] | |
41 | 41 | ||
42 | 42 | ||
43 | - | @Callable( | |
44 | - | func verifyCard (m,l, | |
45 | - | let | |
46 | - | throw(toString( | |
43 | + | @Callable(x) | |
44 | + | func verifyCard (m,l,y) = { | |
45 | + | let z = rsaVerify_16Kb(SHA256, toBytes(m), fromBase64String(split(value(n(l, y)), " ")[0]), b) | |
46 | + | throw(toString(z)) | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | - | @Callable( | |
52 | - | func initGame () = if (i( | |
51 | + | @Callable(x) | |
52 | + | func initGame () = if (i(x.callerPublicKey)) | |
53 | 53 | then throw("initGame_FORBBIDEN") | |
54 | 54 | else { | |
55 | - | let | |
56 | - | if ($isInstanceOf( | |
55 | + | let A = g() | |
56 | + | if ($isInstanceOf(A, "Int")) | |
57 | 57 | then { | |
58 | - | let | |
58 | + | let B = A | |
59 | 59 | throw("INIT_ALREADY_DONE") | |
60 | 60 | } | |
61 | 61 | else [IntegerEntry(c, 0), IntegerEntry(d, 0), IntegerEntry(f, 100000000), StringEntry(e, "")] | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | - | @Callable( | |
67 | - | func setupGame (l,t, | |
66 | + | @Callable(x) | |
67 | + | func setupGame (l,t,u,v,w) = if (i(x.callerPublicKey)) | |
68 | 68 | then throw("setupGame_FORBIDEN") | |
69 | 69 | else { | |
70 | - | let | |
71 | - | if ($isInstanceOf( | |
70 | + | let A = g() | |
71 | + | if ($isInstanceOf(A, "Int")) | |
72 | 72 | then { | |
73 | - | let C = | |
74 | - | let s = (toInt(sha256((take(lastBlock.generationSignature, 16) + take( | |
73 | + | let C = A | |
74 | + | let s = (toInt(sha256((take(lastBlock.generationSignature, 16) + take(x.transactionId, 16)))) % 2) | |
75 | 75 | let D = (C + 1) | |
76 | 76 | if ((l != D)) | |
77 | 77 | then throw("Wrong game number.") | |
78 | - | else r(D, s, t) | |
78 | + | else r(D, s, t, u, v, w) | |
79 | 79 | } | |
80 | 80 | else throw("InitGame Required") | |
81 | 81 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi' | |
5 | 5 | ||
6 | 6 | let b = fromBase64String("base64:MIIBIzANBgkqhkiG9w0BAQEFAAOCARAAMIIBCwKCAQIA+CpbzMBKpq+7VarSDHLW0wQSoh2LTbgl1rAhfruZGCjt6MO4o1v1iLqKyNH3FJsvwlLUqmqE7E2Wl7LbIPA26PxO2XCDfvj0OWp7cEJkUBEiyPYCn+iuPXUPwudoFgM4WHf0IPbDJ2O6OgzQlBBmNu6Owr7naITiJrPAvakPgAdmUPv4rOzcu6BR0T8GwszwprvwWZlKF6Ad00omLFDmx66HvBE51sRBiXIRbJnjDhlopize4LoR1FIrQaAu1sfs5bEHLA33jvKybne+IDawCsiINZYdPZV1WWcURC+XAFfBiYCw4PYyguxaBRHotzLc2dOsBV1HDNIjLKVoRknyt50CAwEAAQ==") | |
7 | 7 | ||
8 | 8 | let c = "G_SETUPGAMESCOUNTER" | |
9 | 9 | ||
10 | 10 | let d = "G_USEDGAMESCOUNTER" | |
11 | 11 | ||
12 | 12 | let e = "G_DEALERQUEUE" | |
13 | 13 | ||
14 | 14 | let f = "G_MAXBET" | |
15 | 15 | ||
16 | 16 | func g () = getInteger(this, c) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func h () = getInteger(this, d) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func i (j) = (j != a) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func k (l,m) = ((("G_" + toString(l)) + "_CARDSIGNATURE_") + toString(m)) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func n (l,m) = getString(this, k(l, m)) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func o (l,m) = ((("G_" + toString(l)) + "_CARD_") + toString(m)) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func p (l) = (("G_" + toString(l)) + "_STATE") | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func q (l) = (("G_" + toString(l)) + "_OFFSET") | |
38 | 38 | ||
39 | 39 | ||
40 | - | func r (l,s,t) = [IntegerEntry(c, l), IntegerEntry(p(l), 0), IntegerEntry(q(l), s), StringEntry(k(l, 0), t)] | |
40 | + | func r (l,s,t,u,v,w) = [IntegerEntry(c, l), IntegerEntry(p(l), 0), IntegerEntry(q(l), s), StringEntry(k(l, 0), t), StringEntry(k(l, 1), u), StringEntry(k(l, 2), v), StringEntry(k(l, 3), w)] | |
41 | 41 | ||
42 | 42 | ||
43 | - | @Callable( | |
44 | - | func verifyCard (m,l, | |
45 | - | let | |
46 | - | throw(toString( | |
43 | + | @Callable(x) | |
44 | + | func verifyCard (m,l,y) = { | |
45 | + | let z = rsaVerify_16Kb(SHA256, toBytes(m), fromBase64String(split(value(n(l, y)), " ")[0]), b) | |
46 | + | throw(toString(z)) | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | - | @Callable( | |
52 | - | func initGame () = if (i( | |
51 | + | @Callable(x) | |
52 | + | func initGame () = if (i(x.callerPublicKey)) | |
53 | 53 | then throw("initGame_FORBBIDEN") | |
54 | 54 | else { | |
55 | - | let | |
56 | - | if ($isInstanceOf( | |
55 | + | let A = g() | |
56 | + | if ($isInstanceOf(A, "Int")) | |
57 | 57 | then { | |
58 | - | let | |
58 | + | let B = A | |
59 | 59 | throw("INIT_ALREADY_DONE") | |
60 | 60 | } | |
61 | 61 | else [IntegerEntry(c, 0), IntegerEntry(d, 0), IntegerEntry(f, 100000000), StringEntry(e, "")] | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | - | @Callable( | |
67 | - | func setupGame (l,t, | |
66 | + | @Callable(x) | |
67 | + | func setupGame (l,t,u,v,w) = if (i(x.callerPublicKey)) | |
68 | 68 | then throw("setupGame_FORBIDEN") | |
69 | 69 | else { | |
70 | - | let | |
71 | - | if ($isInstanceOf( | |
70 | + | let A = g() | |
71 | + | if ($isInstanceOf(A, "Int")) | |
72 | 72 | then { | |
73 | - | let C = | |
74 | - | let s = (toInt(sha256((take(lastBlock.generationSignature, 16) + take( | |
73 | + | let C = A | |
74 | + | let s = (toInt(sha256((take(lastBlock.generationSignature, 16) + take(x.transactionId, 16)))) % 2) | |
75 | 75 | let D = (C + 1) | |
76 | 76 | if ((l != D)) | |
77 | 77 | then throw("Wrong game number.") | |
78 | - | else r(D, s, t) | |
78 | + | else r(D, s, t, u, v, w) | |
79 | 79 | } | |
80 | 80 | else throw("InitGame Required") | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | @Verifier(E) | |
85 | 85 | func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey) | |
86 | 86 |
github/deemru/w8io/169f3d6 41.34 ms ◑