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