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