tx · 9zyoZV4p2Zr3MGLcHxtstmu74XuMaaVpxxTzSVyzc19Q 3Mu9qAjmg8fVTxxpwPZnBAH948ujt4m6Xvk: -0.01000000 Waves 2021.10.15 00:54 [1746508] smart account 3Mu9qAjmg8fVTxxpwPZnBAH948ujt4m6Xvk > SELF 0.00000000 Waves
{ "type": 13, "id": "9zyoZV4p2Zr3MGLcHxtstmu74XuMaaVpxxTzSVyzc19Q", "fee": 1000000, "feeAssetId": null, "timestamp": 1634248506195, "version": 2, "chainId": 84, "sender": "3Mu9qAjmg8fVTxxpwPZnBAH948ujt4m6Xvk", "senderPublicKey": "8v9pmcXqHz9DTc5k1Z8duTYyDwykFxN3EzdZ9WAn3KXJ", "proofs": [ "2VjP83t8Cu6kugmkJRwzx4Hb4CFhhzifjfgcPfiXWTAXkKe1QNABhcYy9YRotLvnuQcUWzTS1orAdh5Yb5BccaqV" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIBAQAAAAgAAAAADWdhbWVOdW1iZXJLZXkCAAAADCRHQU1FX05VTUJFUgAAAAALbGFzdFBsYXlLZXkCAAAACiRMQVNUX1BMQVkAAAAAB3Rlc3RLZXkCAAAABSRURVNUAAAAAANXT04AAAAAAAAAAAEAAAAABExPU0UAAAAAAAAAAAIBAAAACnBheW91dGNhbGMAAAABAAAABm51bWJlcgQAAAAFaG91c2UAAAAAAAAAAAYEAAAABGJhc2UAAAAAAAAAJxAJAABpAAAAAgkAAGgAAAACBQAAAARiYXNlCQAAaQAAAAIJAABlAAAAAgAAAAAAAAAAZAAAAAAAAAAABgAAAAAAAAAAZAUAAAAGbnVtYmVyAQAAAApyYW5kb21pemVyAAAAAQAAAAFpBAAAAAhsYXN0UGxheQQAAAAHJG1hdGNoMAkABBwAAAACBQAAAAR0aGlzBQAAAAtsYXN0UGxheUtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwMJAAABAAAAAgUAAA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lsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAANd3JpdGVMYXN0UGxheQkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAADbmlsAAAAAQAAAAFpAQAAAAl6ZXJvMmhlcm8AAAACAAAACmd1ZXNzU3RhcnQAAAAIZ3Vlc3NFbmQJAQAAAApzdGFydExvdHRvAAAAAwUAAAABaQUAAAAKZ3Vlc3NTdGFydAUAAAAIZ3Vlc3NFbmQAAAAAgKs6cg==", "height": 1746508, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dxmmapjih7X6uXGeptDJPXbQAP5KbF5nViKqnTLqRAXk Next: J7AfqSYcbRhSbR7ip51YqxyajwJKRiQxaA5XQtE9PLCE Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let b = "$LAST_PLAY" | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = "$TEST" | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = 1 | |
11 | 11 | ||
12 | - | func e (f) = { | |
13 | - | let g = 6 | |
14 | - | let h = 10000 | |
15 | - | ((h * ((100 - 6) / 100)) / f) | |
12 | + | let e = 2 | |
13 | + | ||
14 | + | func f (g) = { | |
15 | + | let h = 6 | |
16 | + | let i = 10000 | |
17 | + | ((i * ((100 - 6) / 100)) / g) | |
16 | 18 | } | |
17 | 19 | ||
18 | 20 | ||
19 | - | func | |
20 | - | let | |
21 | - | let | |
22 | - | if ($isInstanceOf( | |
21 | + | func j (k) = { | |
22 | + | let l = { | |
23 | + | let m = getBinary(this, b) | |
24 | + | if ($isInstanceOf(m, "ByteVector")) | |
23 | 25 | then { | |
24 | - | let | |
25 | - | | |
26 | + | let n = m | |
27 | + | n | |
26 | 28 | } | |
27 | - | else if ($isInstanceOf( | |
29 | + | else if ($isInstanceOf(m, "Unit")) | |
28 | 30 | then base58'2ee4oFDYriWJ9EMeR' | |
29 | 31 | else throw("Match error") | |
30 | 32 | } | |
31 | - | let | |
32 | - | sha256( | |
33 | + | let o = (((((l + k.transactionId) + k.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
34 | + | sha256(o) | |
33 | 35 | } | |
34 | 36 | ||
35 | 37 | ||
36 | - | func | |
37 | - | let | |
38 | - | let | |
39 | - | if (!(isDefined( | |
38 | + | func p (k,q,r) = { | |
39 | + | let s = (wavesBalance(this) / 100) | |
40 | + | let t = extract(k.payment) | |
41 | + | if (!(isDefined(k.payment))) | |
40 | 42 | then throw("Should be with Payment in Waves") | |
41 | - | else if (isDefined( | |
43 | + | else if (isDefined(t.assetId)) | |
42 | 44 | then throw("Payment should be in Waves") | |
43 | - | else if (( | |
44 | - | then throw(("Payment should be less than " + toString( | |
45 | - | else if ((0 > | |
45 | + | else if ((t.amount > s)) | |
46 | + | then throw(("Payment should be less than " + toString(s))) | |
47 | + | else if ((0 > q)) | |
46 | 48 | then throw("guessStart and guessEnd Must be in between 0-99") | |
47 | - | else if (( | |
49 | + | else if ((r > 99)) | |
48 | 50 | then throw("guessStart and guessEnd Must be in between 0-99") | |
49 | - | else if (( | |
51 | + | else if ((q > r)) | |
50 | 52 | then throw("guessStart and guessEnd Must be in between 0-99") | |
51 | - | else if ((5 > (( | |
53 | + | else if ((5 > ((r - q) + 1))) | |
52 | 54 | then throw("guessStart and guessEnd Must be at least 5 apart") | |
53 | - | else if (((( | |
55 | + | else if ((((r - q) + 1) > 95)) | |
54 | 56 | then throw("guessStart and guessEnd Must not be at least 95 apart") | |
55 | 57 | else { | |
56 | - | let | |
57 | - | let | |
58 | - | let | |
59 | - | let | |
60 | - | let | |
61 | - | let | |
62 | - | if ($isInstanceOf( | |
58 | + | let u = toBase58String(k.caller.bytes) | |
59 | + | let v = toBase58String(k.transactionId) | |
60 | + | let w = j(k) | |
61 | + | let o = (toInt(w) % 100) | |
62 | + | let x = { | |
63 | + | let m = getInteger(this, a) | |
64 | + | if ($isInstanceOf(m, "Int")) | |
63 | 65 | then { | |
64 | - | let | |
65 | - | | |
66 | + | let y = m | |
67 | + | y | |
66 | 68 | } | |
67 | - | else if ($isInstanceOf( | |
69 | + | else if ($isInstanceOf(m, "Unit")) | |
68 | 70 | then 1 | |
69 | 71 | else throw("Match error") | |
70 | 72 | } | |
71 | - | let | |
72 | - | if (if ((( | |
73 | - | then ( | |
73 | + | let z = ((u + "_") + toString(x)) | |
74 | + | if (if (((r + 1) > o)) | |
75 | + | then (o > (q - 1)) | |
74 | 76 | else false) | |
75 | 77 | then { | |
76 | - | let z = ((((((((((toString(c) + "_WON_") + u) + "_") + y) + "_") + toString(p)) + "-") + toString(q)) + "_") + toString(n)) | |
77 | - | let A = WriteSet([DataEntry(b, n), DataEntry(y, z), DataEntry(a, (w + 1))]) | |
78 | - | ScriptResult(A, TransferSet([ScriptTransfer(j.caller, ((s.amount * e(((q - p) + 1))) / 100), unit)])) | |
78 | + | let A = ((((((((((toString(d) + "_WON_") + v) + "_") + z) + "_") + toString(q)) + "-") + toString(r)) + "_") + toString(o)) | |
79 | + | let B = (f(((r - q) + 1)) / 100) | |
80 | + | let C = WriteSet([DataEntry(b, o), DataEntry(z, A), DataEntry(a, (x + 1)), DataEntry(c, ((toString(B) + "_") + toString((t.amount * B))))]) | |
81 | + | ScriptResult(C, TransferSet([ScriptTransfer(k.caller, ((t.amount * f(((r - q) + 1))) / 100), unit)])) | |
79 | 82 | } | |
80 | 83 | else { | |
81 | - | let | |
82 | - | let | |
83 | - | ScriptResult( | |
84 | + | let A = ((((((((((toString(d) + "_LOSE_") + v) + "_") + z) + "_") + toString(q)) + "-") + toString(r)) + "_") + toString(o)) | |
85 | + | let C = WriteSet([DataEntry(b, o), DataEntry(z, A), DataEntry(a, (x + 1))]) | |
86 | + | ScriptResult(C, TransferSet(nil)) | |
84 | 87 | } | |
85 | 88 | } | |
86 | 89 | } | |
87 | 90 | ||
88 | 91 | ||
89 | - | @Callable( | |
90 | - | func zero2hero ( | |
92 | + | @Callable(k) | |
93 | + | func zero2hero (q,r) = p(k, q, r) | |
91 | 94 | ||
92 | 95 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "$GAME_NUMBER" | |
5 | 5 | ||
6 | 6 | let b = "$LAST_PLAY" | |
7 | 7 | ||
8 | - | let c = | |
8 | + | let c = "$TEST" | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = 1 | |
11 | 11 | ||
12 | - | func e (f) = { | |
13 | - | let g = 6 | |
14 | - | let h = 10000 | |
15 | - | ((h * ((100 - 6) / 100)) / f) | |
12 | + | let e = 2 | |
13 | + | ||
14 | + | func f (g) = { | |
15 | + | let h = 6 | |
16 | + | let i = 10000 | |
17 | + | ((i * ((100 - 6) / 100)) / g) | |
16 | 18 | } | |
17 | 19 | ||
18 | 20 | ||
19 | - | func | |
20 | - | let | |
21 | - | let | |
22 | - | if ($isInstanceOf( | |
21 | + | func j (k) = { | |
22 | + | let l = { | |
23 | + | let m = getBinary(this, b) | |
24 | + | if ($isInstanceOf(m, "ByteVector")) | |
23 | 25 | then { | |
24 | - | let | |
25 | - | | |
26 | + | let n = m | |
27 | + | n | |
26 | 28 | } | |
27 | - | else if ($isInstanceOf( | |
29 | + | else if ($isInstanceOf(m, "Unit")) | |
28 | 30 | then base58'2ee4oFDYriWJ9EMeR' | |
29 | 31 | else throw("Match error") | |
30 | 32 | } | |
31 | - | let | |
32 | - | sha256( | |
33 | + | let o = (((((l + k.transactionId) + k.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
34 | + | sha256(o) | |
33 | 35 | } | |
34 | 36 | ||
35 | 37 | ||
36 | - | func | |
37 | - | let | |
38 | - | let | |
39 | - | if (!(isDefined( | |
38 | + | func p (k,q,r) = { | |
39 | + | let s = (wavesBalance(this) / 100) | |
40 | + | let t = extract(k.payment) | |
41 | + | if (!(isDefined(k.payment))) | |
40 | 42 | then throw("Should be with Payment in Waves") | |
41 | - | else if (isDefined( | |
43 | + | else if (isDefined(t.assetId)) | |
42 | 44 | then throw("Payment should be in Waves") | |
43 | - | else if (( | |
44 | - | then throw(("Payment should be less than " + toString( | |
45 | - | else if ((0 > | |
45 | + | else if ((t.amount > s)) | |
46 | + | then throw(("Payment should be less than " + toString(s))) | |
47 | + | else if ((0 > q)) | |
46 | 48 | then throw("guessStart and guessEnd Must be in between 0-99") | |
47 | - | else if (( | |
49 | + | else if ((r > 99)) | |
48 | 50 | then throw("guessStart and guessEnd Must be in between 0-99") | |
49 | - | else if (( | |
51 | + | else if ((q > r)) | |
50 | 52 | then throw("guessStart and guessEnd Must be in between 0-99") | |
51 | - | else if ((5 > (( | |
53 | + | else if ((5 > ((r - q) + 1))) | |
52 | 54 | then throw("guessStart and guessEnd Must be at least 5 apart") | |
53 | - | else if (((( | |
55 | + | else if ((((r - q) + 1) > 95)) | |
54 | 56 | then throw("guessStart and guessEnd Must not be at least 95 apart") | |
55 | 57 | else { | |
56 | - | let | |
57 | - | let | |
58 | - | let | |
59 | - | let | |
60 | - | let | |
61 | - | let | |
62 | - | if ($isInstanceOf( | |
58 | + | let u = toBase58String(k.caller.bytes) | |
59 | + | let v = toBase58String(k.transactionId) | |
60 | + | let w = j(k) | |
61 | + | let o = (toInt(w) % 100) | |
62 | + | let x = { | |
63 | + | let m = getInteger(this, a) | |
64 | + | if ($isInstanceOf(m, "Int")) | |
63 | 65 | then { | |
64 | - | let | |
65 | - | | |
66 | + | let y = m | |
67 | + | y | |
66 | 68 | } | |
67 | - | else if ($isInstanceOf( | |
69 | + | else if ($isInstanceOf(m, "Unit")) | |
68 | 70 | then 1 | |
69 | 71 | else throw("Match error") | |
70 | 72 | } | |
71 | - | let | |
72 | - | if (if ((( | |
73 | - | then ( | |
73 | + | let z = ((u + "_") + toString(x)) | |
74 | + | if (if (((r + 1) > o)) | |
75 | + | then (o > (q - 1)) | |
74 | 76 | else false) | |
75 | 77 | then { | |
76 | - | let z = ((((((((((toString(c) + "_WON_") + u) + "_") + y) + "_") + toString(p)) + "-") + toString(q)) + "_") + toString(n)) | |
77 | - | let A = WriteSet([DataEntry(b, n), DataEntry(y, z), DataEntry(a, (w + 1))]) | |
78 | - | ScriptResult(A, TransferSet([ScriptTransfer(j.caller, ((s.amount * e(((q - p) + 1))) / 100), unit)])) | |
78 | + | let A = ((((((((((toString(d) + "_WON_") + v) + "_") + z) + "_") + toString(q)) + "-") + toString(r)) + "_") + toString(o)) | |
79 | + | let B = (f(((r - q) + 1)) / 100) | |
80 | + | let C = WriteSet([DataEntry(b, o), DataEntry(z, A), DataEntry(a, (x + 1)), DataEntry(c, ((toString(B) + "_") + toString((t.amount * B))))]) | |
81 | + | ScriptResult(C, TransferSet([ScriptTransfer(k.caller, ((t.amount * f(((r - q) + 1))) / 100), unit)])) | |
79 | 82 | } | |
80 | 83 | else { | |
81 | - | let | |
82 | - | let | |
83 | - | ScriptResult( | |
84 | + | let A = ((((((((((toString(d) + "_LOSE_") + v) + "_") + z) + "_") + toString(q)) + "-") + toString(r)) + "_") + toString(o)) | |
85 | + | let C = WriteSet([DataEntry(b, o), DataEntry(z, A), DataEntry(a, (x + 1))]) | |
86 | + | ScriptResult(C, TransferSet(nil)) | |
84 | 87 | } | |
85 | 88 | } | |
86 | 89 | } | |
87 | 90 | ||
88 | 91 | ||
89 | - | @Callable( | |
90 | - | func zero2hero ( | |
92 | + | @Callable(k) | |
93 | + | func zero2hero (q,r) = p(k, q, r) | |
91 | 94 | ||
92 | 95 |
github/deemru/w8io/169f3d6 55.15 ms ◑