tx · 4TFnEEEZGNH6qxfgtBZdDpPoVyLn97ExuhC6vKkCskJT 3Mz7zzdQoHabgytXU3UuTAzADXPBBLgFqu8: -0.01400000 Waves 2019.12.11 01:50 [803315] smart account 3Mz7zzdQoHabgytXU3UuTAzADXPBBLgFqu8 > SELF 0.00000000 Waves
{ "type": 13, "id": "4TFnEEEZGNH6qxfgtBZdDpPoVyLn97ExuhC6vKkCskJT", "fee": 1400000, "feeAssetId": null, "timestamp": 1576018189636, "version": 1, "sender": "3Mz7zzdQoHabgytXU3UuTAzADXPBBLgFqu8", "senderPublicKey": "6uncmj7GmSzxFAGGX8NcToqPxTxWUHW7Aj1WSbMH2qXw", "proofs": [ "5WZoGHAb7F6XDjNYLferozUMQ8cNU4LqxP5NKfpw6WoczEDuuaanZ2Ym8hu9CxFSqAns6ibunHAo6PsKmfRwkKFz" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAADwAAAAAJUlNBUFVCTElDCQACWwAAAAECAAABj2Jhc2U2NDpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQWc0ZEFSNlhiQkRBUzloci9FajNkSnY2RmZjNDY2eC9tT0dNV1UzbHJBQnMzcWE4QkhtdUpHbmtmYnBFZjJ2QXdZVE9XUHZ2emZNMTBPQmJmbG9TeXEzYzlNS3Z5VGUxbHVCTEdxVzR2WlVYSXl2U2d6MWxpeVVWZWZJUXkzZHlGOWpiZVRaYkMwYmJjVC83TzNERUwrMDF6NkErckRDYWNTWjBsR29sU1E2QW5oTHh6SWtWcE9RSmJyQm1DK3grWnVaUENNV3pKeW5kNWFlT243amFqL21rUlZ5eGU2Zy8wT2hXejROaWlaWGV1TVJCKzhtS3kwZldEL1VsSWxaV0hzQVMyWm1ya1hLcWpMcTAvMHdyOElMSmt6bmpTcWRuSTVJYmpnM3VRcmovNEFOK2k5cjI4YVE3My9aa1B0WTVTYncwQU9pQUJCdTdnSG1xOWF5VnhaUUlEQVFBQ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A9jYWxsZXJQdWJsaWNLZXkEAAAAC2dhbWVEYXRhU3RyCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADlNUQVRFU1VCTUlUVEVEAgAAAAFfBQAAAA5wbGF5ZXJQdWJLZXk1OAIAAAABXwUAAAAEYmV0cwkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAD0dBTUVTQ09VTlRFUktFWQUAAAAKbmV3R2FtZU51bQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAGZ2FtZUlkBQAAAAtnYW1lRGF0YVN0cgUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwAAAAA2x1kTA==", "chainId": 84, "height": 803315, "spentComplexity": 0 } View: original | compacted Prev: BkeAYrsim4zz7fwZHGJwqC5ED9nwaNkMjSeum7bKY8E8 Next: 6JkRa4ErCMiCbFSgakUMvXJRJLUCJ6wmnU1kTCD5AfL4 Diff:
Old | New | Differences | |
---|---|---|---|
73 | 73 | else if (F) | |
74 | 74 | then throw("Passed gameId had been used before. Game aborted.") | |
75 | 75 | else if ((J != G.amount)) | |
76 | - | then throw("Payment value is different from bet value.") | |
76 | + | then throw(("Payment value is different from bet value. " + toString(J))) | |
77 | 77 | else { | |
78 | 78 | let K = z() | |
79 | 79 | let L = toBase58String(D.callerPublicKey) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg4dAR6XbBDAS9hr/Ej3dJv6Ffc466x/mOGMWU3lrABs3qa8BHmuJGnkfbpEf2vAwYTOWPvvzfM10OBbfloSyq3c9MKvyTe1luBLGqW4vZUXIyvSgz1liyUVefIQy3dyF9jbeTZbC0bbcT/7O3DEL+01z6A+rDCacSZ0lGolSQ6AnhLxzIkVpOQJbrBmC+x+ZuZPCMWzJynd5aeOn7jaj/mkRVyxe6g/0OhWz4NiiZXeuMRB+8mKy0fWD/UlIlZWHsAS2ZmrkXKqjLq0/0wr8ILJkznjSqdnI5Ibjg3uQrj/4AN+i9r28aQ73/ZkPtY5Sbw0AOiABBu7gHmq9ayVxZQIDAQAB") | |
5 | 5 | ||
6 | 6 | let b = "$GAME_NUM" | |
7 | 7 | ||
8 | 8 | let c = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw' | |
9 | 9 | ||
10 | 10 | let d = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8') | |
11 | 11 | ||
12 | 12 | let e = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8') | |
13 | 13 | ||
14 | 14 | let f = 100000000 | |
15 | 15 | ||
16 | 16 | let g = 4 | |
17 | 17 | ||
18 | 18 | let h = 2 | |
19 | 19 | ||
20 | 20 | let i = "SUBMITTED" | |
21 | 21 | ||
22 | 22 | let j = "WON" | |
23 | 23 | ||
24 | 24 | let k = "LOST" | |
25 | 25 | ||
26 | 26 | let l = (1 * f) | |
27 | 27 | ||
28 | 28 | let m = (20000000 * f) | |
29 | 29 | ||
30 | 30 | func n (o) = { | |
31 | 31 | let p = take(drop(o, 4), 10) | |
32 | 32 | let q = take(drop(o, 19), 10) | |
33 | 33 | let r = take(drop(o, 34), 10) | |
34 | 34 | let s = take(drop(o, 49), 10) | |
35 | 35 | let t = take(drop(o, 64), 10) | |
36 | 36 | let u = take(drop(o, 79), 10) | |
37 | 37 | let v = take(drop(o, 94), 10) | |
38 | 38 | let w = take(drop(o, 109), 10) | |
39 | 39 | let x = take(drop(o, 124), 10) | |
40 | 40 | let y = take(drop(o, 139), 10) | |
41 | 41 | (((((((((parseIntValue(p) + parseIntValue(q)) + parseIntValue(r)) + parseIntValue(s)) + parseIntValue(t)) + parseIntValue(u)) + parseIntValue(v)) + parseIntValue(w)) + parseIntValue(x)) + parseIntValue(y)) | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func z () = { | |
46 | 46 | let A = { | |
47 | 47 | let B = getInteger(this, b) | |
48 | 48 | if ($isInstanceOf(B, "Int")) | |
49 | 49 | then { | |
50 | 50 | let C = B | |
51 | 51 | C | |
52 | 52 | } | |
53 | 53 | else 0 | |
54 | 54 | } | |
55 | 55 | (A + 1) | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | @Callable(D) | |
60 | 60 | func playRoulette (o) = { | |
61 | 61 | let E = toBase58String(D.transactionId) | |
62 | 62 | let F = isDefined(getString(this, E)) | |
63 | 63 | let G = extract(D.payment) | |
64 | 64 | let H = isDefined(D.feeAssetId) | |
65 | 65 | let I = wavesBalance(D.caller) | |
66 | 66 | let J = n(o) | |
67 | 67 | if ((G.assetId != c)) | |
68 | 68 | then throw("Payment should be in Wavesbet") | |
69 | 69 | else if ((1000000 > I)) | |
70 | 70 | then throw("There are not enough waves, it takes 0.01 Waves to bet. Game aborted.") | |
71 | 71 | else if (H) | |
72 | 72 | then throw("Transaction's fee must be in Waves. Game aborted.") | |
73 | 73 | else if (F) | |
74 | 74 | then throw("Passed gameId had been used before. Game aborted.") | |
75 | 75 | else if ((J != G.amount)) | |
76 | - | then throw("Payment value is different from bet value.") | |
76 | + | then throw(("Payment value is different from bet value. " + toString(J))) | |
77 | 77 | else { | |
78 | 78 | let K = z() | |
79 | 79 | let L = toBase58String(D.callerPublicKey) | |
80 | 80 | let M = ((((i + "_") + L) + "_") + o) | |
81 | 81 | ScriptResult(WriteSet([DataEntry(b, K), DataEntry(E, M)]), TransferSet(nil)) | |
82 | 82 | } | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 |
github/deemru/w8io/169f3d6 42.88 ms ◑