tx · GdkZMMoDfS7xogYUG8FU5XtZRZgBxxxA6WU72YFZ384w 3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ: -0.01000000 Waves 2022.05.06 15:17 [2039829] smart account 3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ > SELF 0.00000000 Waves
{ "type": 13, "id": "GdkZMMoDfS7xogYUG8FU5XtZRZgBxxxA6WU72YFZ384w", "fee": 1000000, "feeAssetId": null, "timestamp": 1651839441618, "version": 2, "chainId": 84, "sender": "3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ", "senderPublicKey": "BhRnrwd6wVHSkSaWXCjQRjaoXcpCdUW2hkJD6V7uVDxN", "proofs": [ "dA15626W2uwCyN2EdZZnVhokQkEL3Qd4DPgzhuY9tnDKTt7MZapkoEzKDjzL3J6BYWo3H1EGMHvVg1VhNhyxGVw" ], "script": "base64:AAIFAAAAAAAAAB0IAhIDCgEIEgASBAoCCAESAwoBARIFCgMICAESAAAAAAkAAAAACnNoaW55d2dnaWQBAAAAIIlpzwL/trq51HGW13m4mXYmsHTQd3n0c26G8PRznwYmAAAAAAxhZG1pbkFkZHJlc3MJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNcE50aVBTUlNxNk5uYVFZazM4QmZXU3paY2dBWVR5clE5AAAAAA1hc3NldHNBZGRyZXNzAQAAABoBV4y1SJ9+nhXVGJeOG3f7CX9nYtrhbWMlSQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAAAQAAAA10cnlHZXRCb29sZWFuAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgA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QEAAAALaW50ZXJuYWxQYXkAAAACBQAAAApjYWxsZXJBZGRyBQAAAAZhbW91bnQAAAABaQEAAAANdHJhbnNmZXJDb2lucwAAAAMAAAALZnJvbUFkZHJlc3MAAAAJdG9BZGRyZXNzAAAABmFtb3VudAMDCQEAAAACIT0AAAACCAUAAAABaQAAAAZjYWxsZXIFAAAADGFkbWluQWRkcmVzcwkBAAAAAiE9AAAAAggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAANYXNzZXRzQWRkcmVzcwcJAAACAAAAAQIAAAAweW91IGFyZSBub3QgYXV0aG9yaXplZCB0byBwZXJmb3JtIHRoaXMgb3BlcmF0aW9uCQEAAAAQaW50ZXJuYWxUcmFuc2ZlcgAAAAMFAAAAC2Zyb21BZGRyZXNzBQAAAAl0b0FkZHJlc3MFAAAABmFtb3VudAAAAAFpAQAAAAZSZWRlZW0AAAAABAAAAAphZGRyZXNzU3RyCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgQAAAAOcmVzZXJ2ZWRBbW91bnQJAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQkAASwAAAACBQAAAAphZGRyZXNzU3RyAgAAAAlfUmVzZXJ2ZWQDCQAAAAAAAAIFAAAADnJlc2VydmVkQW1vdW50AAAAAAAAAAAACQAAAgAAAAECAAAAEU5vdGhpbmcgdG8gcmVkZWVtCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgUAAAAKYWRkcmVzc1N0cgIAAAAJX1Jlc2VydmVkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAOcmVzZXJ2ZWRBbW91bnQFAAAACnNoaW55d2dnaWQFAAAAA25pbAAAAACoLJOu", "height": 2039829, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: GYPVqiwDogKNhH12xTiir7o8qCy7he912Kn3SnxBNktR Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf' | |
5 | + | ||
6 | + | let b = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
7 | + | ||
8 | + | let c = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv' | |
9 | + | ||
10 | + | func d (e) = { | |
11 | + | let f = getInteger(this, e) | |
12 | + | if ($isInstanceOf(f, "Int")) | |
13 | + | then { | |
14 | + | let g = f | |
15 | + | g | |
16 | + | } | |
17 | + | else 0 | |
18 | + | } | |
19 | + | ||
20 | + | ||
21 | + | func h (e) = { | |
22 | + | let f = getBoolean(this, e) | |
23 | + | if ($isInstanceOf(f, "Boolean")) | |
24 | + | then { | |
25 | + | let g = f | |
26 | + | g | |
27 | + | } | |
28 | + | else false | |
29 | + | } | |
30 | + | ||
31 | + | ||
32 | + | func i (j,k) = { | |
33 | + | let l = d((j + "_Deposit")) | |
34 | + | [IntegerEntry((j + "_Deposit"), (l + k))] | |
35 | + | } | |
36 | + | ||
37 | + | ||
38 | + | func m (j,l) = { | |
39 | + | let n = d((j + "_Deposit")) | |
40 | + | if ((0 > (n - l))) | |
41 | + | then throw("Not enough deposit to build.") | |
42 | + | else if (((n - l) == 0)) | |
43 | + | then [DeleteEntry((j + "_Deposit"))] | |
44 | + | else [IntegerEntry((j + "_Deposit"), (n - l))] | |
45 | + | } | |
46 | + | ||
47 | + | ||
48 | + | func o (j,l) = { | |
49 | + | let p = d((j + "_Reserved")) | |
50 | + | [IntegerEntry((j + "_Reserved"), (p + l))] | |
51 | + | } | |
52 | + | ||
53 | + | ||
54 | + | func q (r,s,l) = (m(r, l) ++ i(s, l)) | |
55 | + | ||
56 | + | ||
57 | + | @Callable(t) | |
58 | + | func setAssetAddress (u) = if (if ((t.caller != this)) | |
59 | + | then (t.caller != b) | |
60 | + | else false) | |
61 | + | then throw("you are not authorized to perform this operation") | |
62 | + | else [StringEntry("AssetAddress", u)] | |
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | @Callable(t) | |
67 | + | func Deposit () = { | |
68 | + | let j = toString(t.originCaller) | |
69 | + | let v = t.payments[0] | |
70 | + | if ((v == v)) | |
71 | + | then { | |
72 | + | let k = value(t.payments[0].amount) | |
73 | + | if ((k == k)) | |
74 | + | then { | |
75 | + | let w = v.assetId | |
76 | + | if ((w == w)) | |
77 | + | then if ((w != a)) | |
78 | + | then throw("Only $HEG payments allowed") | |
79 | + | else { | |
80 | + | let l = d((j + "_Deposit")) | |
81 | + | i(j, (l + k)) | |
82 | + | } | |
83 | + | else throw("Strict value is not equal to itself.") | |
84 | + | } | |
85 | + | else throw("Strict value is not equal to itself.") | |
86 | + | } | |
87 | + | else throw("Strict value is not equal to itself.") | |
88 | + | } | |
89 | + | ||
90 | + | ||
91 | + | ||
92 | + | @Callable(t) | |
93 | + | func Pay (j,l) = if (if (if ((t.caller != this)) | |
94 | + | then (t.caller != b) | |
95 | + | else false) | |
96 | + | then (t.caller.bytes != c) | |
97 | + | else false) | |
98 | + | then throw("you are not authorized to perform this operation") | |
99 | + | else m(j, l) | |
100 | + | ||
101 | + | ||
102 | + | ||
103 | + | @Callable(t) | |
104 | + | func CallerPay (l) = { | |
105 | + | let x = toString(t.caller) | |
106 | + | m(x, l) | |
107 | + | } | |
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | @Callable(t) | |
112 | + | func transferCoins (r,s,l) = if (if ((t.caller != b)) | |
113 | + | then (t.caller.bytes != c) | |
114 | + | else false) | |
115 | + | then throw("you are not authorized to perform this operation") | |
116 | + | else q(r, s, l) | |
117 | + | ||
118 | + | ||
119 | + | ||
120 | + | @Callable(t) | |
121 | + | func Redeem () = { | |
122 | + | let j = toString(t.caller) | |
123 | + | let p = d((j + "_Reserved")) | |
124 | + | if ((p == 0)) | |
125 | + | then throw("Nothing to redeem") | |
126 | + | else [DeleteEntry((j + "_Reserved")), ScriptTransfer(t.caller, p, a)] | |
127 | + | } | |
128 | + | ||
129 | + |
github/deemru/w8io/026f985 15.09 ms ◑