tx · AarErMq8xaaRxKxyr8eFgkGLBB4xN7DXPLqCP2FGZern 3N1VfY3QCn7kcm6UEv8fceDHvUbwroRF4hB: -0.01000000 Waves 2019.11.24 23:58 [779851] smart account 3N1VfY3QCn7kcm6UEv8fceDHvUbwroRF4hB > SELF 0.00000000 Waves
{ "type": 13, "id": "AarErMq8xaaRxKxyr8eFgkGLBB4xN7DXPLqCP2FGZern", "fee": 1000000, "feeAssetId": null, "timestamp": 1574629144708, "version": 1, "sender": "3N1VfY3QCn7kcm6UEv8fceDHvUbwroRF4hB", "senderPublicKey": "AMqmqGuYr6ZKRbxyCb6N4Vr7M77Lqs9AsQdM7nkfxjEh", "proofs": [ "538h439H6aYHm2fKG7YMqrktadYWe9xU1jHyatNd7ytMLiqrYkouK5xVgNNRTAifQWCiF1thZvrDTEm2iiuThgZs" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMIAQgAAAATAAAAAAROT05FAgAAAARub25lAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAA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mFsYW5jZVN1cHBsaWVyAAAAAQAAAAdhY2NvdW50CQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABCQEAAAAVZ2V0S2V5QmFsYW5jZVN1cHBsaWVyAAAAAQUAAAAHYWNjb3VudAAAAAEAAAABaQEAAAAHYWRkSXRlbQAAAAMAAAAFdGl0bGUAAAAFcHJpY2UAAAAEZGF0YQQAAAAPc3VwcGxpZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABGl0ZW0JAQAAAApnZXRLZXlJdGVtAAAAAgUAAAAPc3VwcGxpZXJBZGRyZXNzBQAAAAV0aXRsZQMJAABnAAAAAgAAAAAAAAAAAAUAAAAFcHJpY2UJAAACAAAAAQIAAAAucHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBsZXNzIHRoYW4gaXRlbSBwcmljZQMJAQAAAAIhPQAAAAIJAQAAABRnZXRWYWx1ZUl0ZW1TdXBwbGllcgAAAAEFAAAABGl0ZW0FAAAABE5PTkUJAAACAAAAAQIAAAAYYW4gaXRlbSBpcyBhbHJlYWR5IGV4aXN0CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAASZ2V0S2V5SXRlbVN1cHBsaWVyAAAAAQUAAAAEaXRlbQUAAAAPc3VwcGxpZXJBZGRyZXNzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAPZ2V0S2V5SXRlbVByaWNlAAAAAQUAAAAEaXRlbQUAAAAFcHJpY2UJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA5nZXRLZXlJdGVtRGF0YQAAAAEFAAAABGl0ZW0FAAAABGRhdGEFAAAAA25pbAAAAAA3Ld2F", "chainId": 84, "height": 779851, "spentComplexity": 0 } View: original | compacted Prev: none Next: C7tBPMj7htk3vwQCE2KPLu4pKSX8UaYnF7Tt5ApNPWy3 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "none" | |
5 | + | ||
6 | + | let b = 3 | |
7 | + | ||
8 | + | let c = 2 | |
9 | + | ||
10 | + | let d = "voting" | |
11 | + | ||
12 | + | let e = "reveal" | |
13 | + | ||
14 | + | let f = "featured" | |
15 | + | ||
16 | + | let g = "delisted" | |
17 | + | ||
18 | + | func h (i) = { | |
19 | + | let j = { | |
20 | + | let k = getInteger(this, i) | |
21 | + | if ($isInstanceOf(k, "Int")) | |
22 | + | then { | |
23 | + | let l = k | |
24 | + | l | |
25 | + | } | |
26 | + | else 0 | |
27 | + | } | |
28 | + | j | |
29 | + | } | |
30 | + | ||
31 | + | ||
32 | + | func m (i) = { | |
33 | + | let n = { | |
34 | + | let k = getString(this, i) | |
35 | + | if ($isInstanceOf(k, "String")) | |
36 | + | then { | |
37 | + | let l = k | |
38 | + | l | |
39 | + | } | |
40 | + | else a | |
41 | + | } | |
42 | + | n | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | func o (p) = (p + "_price") | |
47 | + | ||
48 | + | ||
49 | + | func q (p) = h(o(p)) | |
50 | + | ||
51 | + | ||
52 | + | func r (s,p) = (((p + "_") + s) + "_cnt") | |
53 | + | ||
54 | + | ||
55 | + | func t (s,p) = h(r(s, p)) | |
56 | + | ||
57 | + | ||
58 | + | func u (v,w) = ("item_" + toBase58String(sha256(toBytes((v + w))))) | |
59 | + | ||
60 | + | ||
61 | + | func x (p) = (p + "_data") | |
62 | + | ||
63 | + | ||
64 | + | func y (p) = (p + "_owner") | |
65 | + | ||
66 | + | ||
67 | + | func z (p) = m(y(p)) | |
68 | + | ||
69 | + | ||
70 | + | func A (B) = (B + "_balance") | |
71 | + | ||
72 | + | ||
73 | + | func C (B) = h(A(B)) | |
74 | + | ||
75 | + | ||
76 | + | @Callable(D) | |
77 | + | func addItem (w,E,F) = { | |
78 | + | let G = toBase58String(D.caller.bytes) | |
79 | + | let p = u(G, w) | |
80 | + | if ((0 >= E)) | |
81 | + | then throw("purchase amount cannot be less than item price") | |
82 | + | else if ((z(p) != a)) | |
83 | + | then throw("an item is already exist") | |
84 | + | else WriteSet([DataEntry(y(p), G), DataEntry(o(p), E), DataEntry(x(p), F)]) | |
85 | + | } | |
86 | + | ||
87 | + |
github/deemru/w8io/fabc49c 15.97 ms ◑