tx · 5b8jLEctJR1rknnbm34JeYmGnKJo26QytdtkkrzxTNfJ 3MriZGLhQEu1jMDKDAbnsbh6TZuZueBAHSY: -0.05000000 Waves 2021.03.16 01:43 [1439443] smart account 3MriZGLhQEu1jMDKDAbnsbh6TZuZueBAHSY > SELF 0.00000000 Waves
{ "type": 13, "id": "5b8jLEctJR1rknnbm34JeYmGnKJo26QytdtkkrzxTNfJ", "fee": 5000000, "feeAssetId": null, "timestamp": 1615848117065, "version": 2, "chainId": 84, "sender": "3MriZGLhQEu1jMDKDAbnsbh6TZuZueBAHSY", "senderPublicKey": "3idTJAmqkivFDf1EUKZ85Tt43Rp22pZb3RDiVXTWrgBq", "proofs": [ "2ZBCWksJi9iE9UbQoZJ8U61NqDMLzmhXn2muXYKv6ReuuRZDSmEU8SDbqPqarU9XjYjVQhGni5UEG8vzoH7GuRV2" ], "script": "base64:AAIEAAAAAAAAAAsIAhIDCgEIEgASAAAAAAoAAAAAEXRhc2tTdGF0dXNEZWZhdWx0AgAAAAppbmNvbXBsZXRlAAAAABJ0YXNrU3RhdHVzQ29tcGxldGUCAAAACGNvbXBsZXRlAAAAAAxhZGRyQ29udHJhY3QJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQeulVTb30gIatILq7oKevTQfmT23BHXzEAAAAADGFzc2V0V2F2ZXNJZAUAAAAEdW5pdAAAAAASYXNzZXROZnRJbml0QW1vdW50AAAAAAAAAAABAAAAABBhc3NldE5mdERlY2ltYWxzAAAAAAAAAAAAAAAAABJhc3NldE5mdFJlaXNzdWFibGUHAAAAABdhc3NldEFtb3VudE1pblRocmVzaG9sZAAAAAAAAAAD6AAAAAASZGVjaW1hbHNBc3NldFdhdmVzAAAAAAAAAAAIAAAAAA9sYWJlbFRhc2tJZExhc3QCAAAACnRhc2tJZExhc3QAAAADAAAAAWkBAAAAB3NldFRhc2sAAAABAAAACHRhc2tOYW1lBAAAAAp0YXNrTGFzdElkAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQaAA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AAAAAAAFAAAAEmRlY2ltYWxzQXNzZXRXYXZlcwUAAAAERE9XTgkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAADGFzc2V0SW5wdXRJZAUAAAAQYXNzZXRJbnB1dEFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAFmludEFzc2V0T3V0cHV0SWRBbW91bnQFAAAADGFzc2V0V2F2ZXNJZAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAA9sYWJlbFRhc2tBbW91bnQJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAPbGFiZWxUYXNrU3RhdHVzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAADWxhYmVsVGFza05hbWUFAAAAA25pbAMJAAAAAAAAAgUAAAASdGFza1N0YXR1c0NvbXBsZXRlBQAAAAp0YXNrU3RhdHVzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAD2xhYmVsVGFza0Ftb3VudAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAA9sYWJlbFRhc2tTdGF0dXMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAANbGFiZWxUYXNrTmFtZQUAAAADbmlsCQAAAgAAAAECAAAAGVRhc2sgaGF2ZSBhIGJyb2tlbiBzdGF0dXMJAAACAAAAAQIAAAAeQXR0YWNoZWQgYXNzZXQgaXMgbm90IGV4cGVjdGVkAAAAAEuUGdc=", "height": 1439443, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3YiTsHvqPnXTmkxcmqGAVdjwQf2G3TJ2oWfcAcaWUaJq Next: HbEhwsUffK8u5rpiqUdyj23U3kGXSTNmqRLHL3Y89GGb Diff:
Old | New | Differences | |
---|---|---|---|
44 | 44 | then throw("amount must be greater than the minimum threshold: 0.0001 WAVES") | |
45 | 45 | else if ((k.caller == c)) | |
46 | 46 | then throw("method may not be called from the contract") | |
47 | - | else [StringEntry(s, l), StringEntry(t, a), q, ScriptTransfer(k.caller, e, fromBase58String(r)), StringEntry(t, a), ScriptTransfer(c, p, d), IntegerEntry(u, p), IntegerEntry(j, m)] | |
47 | + | else [StringEntry(s, l), StringEntry(t, a), q, ScriptTransfer(c, e, fromBase58String(r)), ScriptTransfer(k.caller, e, fromBase58String(r)), StringEntry(t, a), ScriptTransfer(c, p, d), IntegerEntry(u, p), IntegerEntry(j, m)] | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "incomplete" | |
5 | 5 | ||
6 | 6 | let b = "complete" | |
7 | 7 | ||
8 | 8 | let c = Address(base58'3MriZGLhQEu1jMDKDAbnsbh6TZuZueBAHSY') | |
9 | 9 | ||
10 | 10 | let d = unit | |
11 | 11 | ||
12 | 12 | let e = 1 | |
13 | 13 | ||
14 | 14 | let f = 0 | |
15 | 15 | ||
16 | 16 | let g = false | |
17 | 17 | ||
18 | 18 | let h = 1000 | |
19 | 19 | ||
20 | 20 | let i = 8 | |
21 | 21 | ||
22 | 22 | let j = "taskIdLast" | |
23 | 23 | ||
24 | 24 | @Callable(k) | |
25 | 25 | func setTask (l) = { | |
26 | 26 | let m = if (isDefined(getInteger(this, j))) | |
27 | 27 | then (getIntegerValue(this, j) + 1) | |
28 | 28 | else 1 | |
29 | 29 | let n = ("task #" + toString(m)) | |
30 | 30 | let o = ("NFT-token of task manager from" + toString(this)) | |
31 | 31 | let p = k.payments[0].amount | |
32 | 32 | let q = Issue(n, o, e, f, g) | |
33 | 33 | let r = toBase58String(calculateAssetId(q)) | |
34 | 34 | let s = ("taskName_" + r) | |
35 | 35 | let t = ("taskStatus_" + r) | |
36 | 36 | let u = ("taskAmount_" + r) | |
37 | 37 | if ((size(k.payments) > 1)) | |
38 | 38 | then throw("One attached assets expected") | |
39 | 39 | else if ((k.payments[0].assetId != d)) | |
40 | 40 | then throw("must be attached asset: WAVES") | |
41 | 41 | else if (isDefined(getString(this, s))) | |
42 | 42 | then throw("Task with a specified name is already exists") | |
43 | 43 | else if ((h > k.payments[0].amount)) | |
44 | 44 | then throw("amount must be greater than the minimum threshold: 0.0001 WAVES") | |
45 | 45 | else if ((k.caller == c)) | |
46 | 46 | then throw("method may not be called from the contract") | |
47 | - | else [StringEntry(s, l), StringEntry(t, a), q, ScriptTransfer(k.caller, e, fromBase58String(r)), StringEntry(t, a), ScriptTransfer(c, p, d), IntegerEntry(u, p), IntegerEntry(j, m)] | |
47 | + | else [StringEntry(s, l), StringEntry(t, a), q, ScriptTransfer(c, e, fromBase58String(r)), ScriptTransfer(k.caller, e, fromBase58String(r)), StringEntry(t, a), ScriptTransfer(c, p, d), IntegerEntry(u, p), IntegerEntry(j, m)] | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | ||
52 | 52 | @Callable(k) | |
53 | 53 | func completeTask () = { | |
54 | 54 | let v = $Tuple2(k.payments[0].amount, value(k.payments[0].assetId)) | |
55 | 55 | let w = v._1 | |
56 | 56 | let x = v._2 | |
57 | 57 | let t = ("taskStatus_" + toBase58String(x)) | |
58 | 58 | let u = ("taskAmount_" + toBase58String(x)) | |
59 | 59 | let y = toBase58String(value(k.payments[0].assetId)) | |
60 | 60 | let z = valueOrErrorMessage(assetInfo(value(k.payments[0].assetId)), (("Asset " + y) + " doesn't exist")) | |
61 | 61 | let A = getIntegerValue(this, u) | |
62 | 62 | if ((size(k.payments) > 1)) | |
63 | 63 | then throw("One attached assets expected") | |
64 | 64 | else if ((k.caller == c)) | |
65 | 65 | then throw("method may not be called from the contract") | |
66 | 66 | else if (if (if (if ((value(k.payments[0].amount) == e)) | |
67 | 67 | then (value(z.decimals) == f) | |
68 | 68 | else false) | |
69 | 69 | then (value(z.reissuable) == g) | |
70 | 70 | else false) | |
71 | 71 | then isDefined(getString(this, t)) | |
72 | 72 | else false) | |
73 | 73 | then [StringEntry(t, b), Burn(x, w), ScriptTransfer(k.caller, A, d)] | |
74 | 74 | else throw("Attached asset is not expected") | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | ||
79 | 79 | @Callable(k) | |
80 | 80 | func removeTask () = { | |
81 | 81 | let B = $Tuple2(k.payments[0].amount, value(k.payments[0].assetId)) | |
82 | 82 | let w = B._1 | |
83 | 83 | let x = B._2 | |
84 | 84 | let u = ("taskAmount_" + toBase58String(x)) | |
85 | 85 | let t = ("taskStatus_" + toBase58String(x)) | |
86 | 86 | let s = ("taskName_" + toBase58String(x)) | |
87 | 87 | let y = toBase58String(value(k.payments[0].assetId)) | |
88 | 88 | let z = valueOrErrorMessage(assetInfo(value(k.payments[0].assetId)), (("Asset " + y) + " doesn't exist")) | |
89 | 89 | if ((size(k.payments) > 1)) | |
90 | 90 | then throw("One attached assets expected") | |
91 | 91 | else if ((k.caller == c)) | |
92 | 92 | then throw("method may not be called from the contract") | |
93 | 93 | else if (if (if ((value(z.decimals) == f)) | |
94 | 94 | then (value(z.reissuable) == g) | |
95 | 95 | else false) | |
96 | 96 | then isDefined(getString(this, t)) | |
97 | 97 | else false) | |
98 | 98 | then { | |
99 | 99 | let C = getString(this, t) | |
100 | 100 | if (if ((C == a)) | |
101 | 101 | then (value(k.payments[0].amount) == e) | |
102 | 102 | else false) | |
103 | 103 | then { | |
104 | 104 | let A = pow(getIntegerValue(this, u), 0, 1, 0, i, DOWN) | |
105 | 105 | [Burn(x, w), ScriptTransfer(k.caller, A, d), DeleteEntry(u), DeleteEntry(t), DeleteEntry(s)] | |
106 | 106 | } | |
107 | 107 | else if ((b == C)) | |
108 | 108 | then [DeleteEntry(u), DeleteEntry(t), DeleteEntry(s)] | |
109 | 109 | else throw("Task have a broken status") | |
110 | 110 | } | |
111 | 111 | else throw("Attached asset is not expected") | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 |
github/deemru/w8io/026f985 30.13 ms ◑