tx · BFZGexcE3uPKdyXBjSKPMRs3cHosT5yNHvxte9EsiYH2 3MxhV8QbgciCkAE5twYzDprkmDEGA4YxnwX: -0.01400000 Waves 2019.06.23 18:08 [554852] smart account 3MxhV8QbgciCkAE5twYzDprkmDEGA4YxnwX > SELF 0.00000000 Waves
{ "type": 13, "id": "BFZGexcE3uPKdyXBjSKPMRs3cHosT5yNHvxte9EsiYH2", "fee": 1400000, "feeAssetId": null, "timestamp": 1561302555022, "version": 1, "sender": "3MxhV8QbgciCkAE5twYzDprkmDEGA4YxnwX", "senderPublicKey": "AqHMLr2PzT2K7S86S9F5zdWeMrL3zwY1iiXzigRitbxZ", "proofs": [ "65BHXQ3i1mpTjbSFZsvunwipMPBTDGwscvmh3hqjL6Pkzqbeh7oQPjECtw9ZbtPiXB2w7qgrtJtdjQH81d4wz14o" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAA9TZXJ2ZXJQdWJsaWNLZXkBAAAAIJIXjIssJPfgvbphWODVSbibY5Lqcz5CQaL3WdNEPrMmAAAAABBSb3VsZXR0ZVNlY3Rpb25zAAAAAAAAAAAVAAAAAA1EYXRhR2FtZUlkS2V5AgAAAAtBUFBfR0FNRV9JRAAAAAAWRXJyb3JPbmx5V2F2ZXNBY2NlcHRlZAIAAAAZZXJyb3Jfb25seV93YXZlc19hY2NlcHRlZAEAAAAJTmV3R2FtZUlkAAAAAAQAAAAHZ2FtZU51bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAA1EYXRhR2FtZUlkS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAA251bQUAAAAHJG1hdGNoMAUAAAADbnVtAAAAAAAAAAAACQAAZAAAAAIFAAAAB2dhbWVOdW0AAAAAAAAAAAEAAAADAAAAAWkBAAAAD0dlbmVyYXRlUmFuZEludAAAAAIAAAAGZ2FtZUlkAAAAB3JzYVNpZ24EAAAAC3JzYVNpZ1ZhbGlkCQAB9AAAAAMJAAJ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AAACBQAAABZhdWN0aW9uTGFzdEJpZE93bmVyS2V5AgAAAAAJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAEGxhc3RBdWN0aW9uSWRLZXkFAAAAAmlkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwBgcHdNzN1Q==", "chainId": 84, "height": 554852, "spentComplexity": 0 } View: original | compacted Prev: none Next: GLRNZk6CSTBcsQ7cEzaxCwM3dYHDWPAXKiWPMdZrC9DE Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'AqHMLr2PzT2K7S86S9F5zdWeMrL3zwY1iiXzigRitbxZ' | |
5 | + | ||
6 | + | let b = 21 | |
7 | + | ||
8 | + | let c = "APP_GAME_ID" | |
9 | + | ||
10 | + | let d = "error_only_waves_accepted" | |
11 | + | ||
12 | + | func e () = { | |
13 | + | let f = { | |
14 | + | let g = getInteger(this, c) | |
15 | + | if ($isInstanceOf(g, "Int")) | |
16 | + | then { | |
17 | + | let h = g | |
18 | + | h | |
19 | + | } | |
20 | + | else 0 | |
21 | + | } | |
22 | + | (f + 1) | |
23 | + | } | |
24 | + | ||
25 | + | ||
26 | + | @Callable(i) | |
27 | + | func GenerateRandInt (j,k) = { | |
28 | + | let l = sigVerify(fromBase58String(j), fromBase58String(k), a) | |
29 | + | if (l) | |
30 | + | then { | |
31 | + | let m = (toInt(sha256(toBytes(k))) % b) | |
32 | + | WriteSet([DataEntry("orig", toInt(sha256(toBytes(k)))), DataEntry("rand", m)]) | |
33 | + | } | |
34 | + | else throw("Invalid RSA signature") | |
35 | + | } | |
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | @Callable(i) | |
40 | + | func bet (n) = { | |
41 | + | let o = e() | |
42 | + | let j = toBase58String(i.transactionId) | |
43 | + | let p = extract(i.payment) | |
44 | + | WriteSet([DataEntry("orig", ""), DataEntry("rand", "")]) | |
45 | + | } | |
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | @Callable(i) | |
50 | + | func bet111 (n) = { | |
51 | + | let q = "last_auction_id" | |
52 | + | let r = { | |
53 | + | let g = getInteger(this, q) | |
54 | + | if ($isInstanceOf(g, "Int")) | |
55 | + | then { | |
56 | + | let s = g | |
57 | + | s | |
58 | + | } | |
59 | + | else 0 | |
60 | + | } | |
61 | + | let t = (r + 1) | |
62 | + | let u = toString(t) | |
63 | + | let v = toBase58String(i.caller.bytes) | |
64 | + | let p = value(i.payment) | |
65 | + | if (isDefined(p.assetId)) | |
66 | + | then throw(d) | |
67 | + | else { | |
68 | + | let w = toBase58String(value(p.assetId)) | |
69 | + | let x = (("auction_" + u) + "_duration") | |
70 | + | let y = (("auction_" + u) + "_min_bid") | |
71 | + | let z = (("auction_" + u) + "_last_bid") | |
72 | + | let A = (("auction_" + u) + "_last_bid_owner") | |
73 | + | let B = (("auction_" + u) + "_owner") | |
74 | + | let C = (("auction_" + u) + "_amount") | |
75 | + | let D = (("auction_" + u) + "_asset_id") | |
76 | + | let E = (("auction_" + u) + "_is_active") | |
77 | + | let F = ((("balance_" + v) + "_") + w) | |
78 | + | let G = { | |
79 | + | let g = getInteger(this, F) | |
80 | + | if ($isInstanceOf(g, "Int")) | |
81 | + | then { | |
82 | + | let s = g | |
83 | + | s | |
84 | + | } | |
85 | + | else 0 | |
86 | + | } | |
87 | + | let H = (G + p.amount) | |
88 | + | WriteSet([DataEntry(z, 0), DataEntry(B, v), DataEntry(C, p.amount), DataEntry(D, w), DataEntry(F, H), DataEntry(E, true), DataEntry(A, ""), DataEntry(q, t)]) | |
89 | + | } | |
90 | + | } | |
91 | + | ||
92 | + | ||
93 | + | @Verifier(I) | |
94 | + | func J () = if (sigVerify(I.bodyBytes, I.proofs[0], I.senderPublicKey)) | |
95 | + | then { | |
96 | + | let g = I | |
97 | + | if ($isInstanceOf(g, "SetScriptTransaction")) | |
98 | + | then { | |
99 | + | let K = g | |
100 | + | true | |
101 | + | } | |
102 | + | else false | |
103 | + | } | |
104 | + | else false | |
105 | + |
github/deemru/w8io/169f3d6 25.37 ms ◑