tx · AMYLb8qdAPBVVfHhaDqcxzEBc6KtdornfmFTyVDzdWxr 3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu: -0.04000000 Waves 2022.03.29 18:18 [1985392] smart account 3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu > SELF 0.00000000 Waves
{ "type": 13, "id": "AMYLb8qdAPBVVfHhaDqcxzEBc6KtdornfmFTyVDzdWxr", "fee": 4000000, "feeAssetId": null, "timestamp": 1648567150237, "version": 2, "chainId": 84, "sender": "3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu", "senderPublicKey": "D4v2S9mjah7eEEmuQVBNd4WipC3scs8V4PjuDBweWatE", "proofs": [ "2afMv7Kkk7N19MPRt9rrdxyoiLWcA1FSVozCMAkfF2EpiXBoh8wmvjw5aVbsZyYP3ocevK7WbtRQBVGkc2QtLpCZ" ], "script": "base64:AAIFAAAAAAAAACMIAhIECgIICBIECgIICBIFCgMICAgSBgoECAgICBIECgIIAQAAABEAAAAABENPTFMAAAAAAAAABAAAAAAABFJPV1MAAAAAAAAABAAAAAAACW5mdERvbWFpbgIAAAAYaHR0cHM6Ly9uZnQuZ3JpZGdhbmcuaW8vAAAAABVhZGRPd25lckFuZEFtb3VudEZ1bmMCAAAAEWFkZE93bmVyQW5kQW1vdW50AAAAAAVERUJVRwYAAAAAEW1pbkZvclNhbGVXYXZsZXRzAAAAAAAF9eEAAAAAABBtaW5QdXJjaGFzZVByaWNlAAAAAAAAD0JAAAAAAARkYXBwAgAAACMzTjR2cVVYV3c4dGYyM0xEV0RiU0VwSlpINmRlbnQzRVRGdQAAAAALZGFwcEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAARkYXBwAAAAABFob2xkaW5nc1B1YmxpY0tleQIAAAAsR1VIdzFqa3N0TldUczlTWDFLTTNwTXRxOUhYanVwdnhpVGQxdXJOaE5veVkAAAAACGhvbGRpbmdzAgAAACMzTjlSN3U0NDlaMWI3NlFwSnA5dTNnel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AAAAAgUAAAAGYW1vdW50BQAAAANuaWwJAARMAAAAAgkBAAAAD0F0dGFjaGVkUGF5bWVudAAAAAIFAAAABHVuaXQAAAAAAAAAAAAFAAAAA25pbAMJAAAAAAAAAgUAAAADcmVzBQAAAANyZXMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAPaG9sZGluZ3NBZGRyZXNzAAAAAAAAAAABCQACWQAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BgkAAAAAAAACCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABCAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BQAAAA9ob2xkaW5nc0FkZHJlc3MGCQAAAAAAAAIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkFAAAAC2RhcHBBZGRyZXNzqIK7XA==", "height": 1985392, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 46N3aJoL2utUivzVQNgRAd7BGcf2rXDoubXPGJRYr1U4 Next: 56xuKEbeLjsPGAXgLgRiza8ZGDCd3FUcDKjo9XnMp6tf Diff:
Old | New | Differences | |
---|---|---|---|
102 | 102 | @Callable(J) | |
103 | 103 | func autoBuy (n,o) = { | |
104 | 104 | let P = toBase58String(J.caller.bytes) | |
105 | - | if ((P != k)) | |
105 | + | if (if ((P != k)) | |
106 | + | then (P != h) | |
107 | + | else false) | |
106 | 108 | then throw("This can only be triggering internally") | |
107 | 109 | else { | |
108 | 110 | let A = toBase58String(J.transactionId) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1024 | |
5 | 5 | ||
6 | 6 | let b = 1024 | |
7 | 7 | ||
8 | 8 | let c = "https://nft.gridgang.io/" | |
9 | 9 | ||
10 | 10 | let d = "addOwnerAndAmount" | |
11 | 11 | ||
12 | 12 | let e = true | |
13 | 13 | ||
14 | 14 | let f = 100000000 | |
15 | 15 | ||
16 | 16 | let g = 1000000 | |
17 | 17 | ||
18 | 18 | let h = "3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu" | |
19 | 19 | ||
20 | 20 | let i = Address(fromBase58String(h)) | |
21 | 21 | ||
22 | 22 | let j = "GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY" | |
23 | 23 | ||
24 | 24 | let k = "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r" | |
25 | 25 | ||
26 | 26 | let l = Address(fromBase58String(k)) | |
27 | 27 | ||
28 | 28 | func m (n,o) = { | |
29 | 29 | let p = ((n + ",") + o) | |
30 | 30 | p | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func q (n,o,r) = { | |
35 | 35 | let p = m(n, o) | |
36 | 36 | let s = ((p + ",") + r) | |
37 | 37 | s | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func t (p) = { | |
42 | 42 | let u = split(p, ",") | |
43 | 43 | let v = $Tuple3(u[0], u[1], u[2]) | |
44 | 44 | v | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func w (p) = { | |
49 | 49 | let x = t(p) | |
50 | 50 | let n = x._1 | |
51 | 51 | let o = x._2 | |
52 | 52 | let r = x._3 | |
53 | 53 | let s = q(n, o, r) | |
54 | 54 | s | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func y (n,o,r,z,A) = { | |
59 | 59 | let B = n | |
60 | 60 | let C = o | |
61 | 61 | let D = r | |
62 | 62 | let E = m(B, C) | |
63 | 63 | let F = ((c + A) + ".png") | |
64 | 64 | let G = Issue(((E + ",") + D), F, 1, 0, false) | |
65 | 65 | let H = calculateAssetId(G) | |
66 | 66 | let I = q(B, C, r) | |
67 | 67 | $Tuple4(G, H, F, I) | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | @Callable(J) | |
72 | 72 | func purchase (n,o) = { | |
73 | 73 | let s = q(n, o, "1") | |
74 | 74 | let K = valueOrElse(J.payments[0].amount, 0) | |
75 | 75 | let L = { | |
76 | 76 | let M = getString(this, (s + "_assetId")) | |
77 | 77 | if ($isInstanceOf(M, "Unit")) | |
78 | 78 | then "unset" | |
79 | 79 | else if ($isInstanceOf(M, "String")) | |
80 | 80 | then { | |
81 | 81 | let N = M | |
82 | 82 | throw("This square has already been purchased") | |
83 | 83 | } | |
84 | 84 | else throw("Match error") | |
85 | 85 | } | |
86 | 86 | if ((g > K)) | |
87 | 87 | then throw((("You need to send at least " + toString(g)) + "WAVLETS to purchase a square")) | |
88 | 88 | else { | |
89 | 89 | let z = toBase58String(J.caller.bytes) | |
90 | 90 | let A = toBase58String(J.transactionId) | |
91 | 91 | let O = y(n, o, "1", z, A) | |
92 | 92 | let G = O._1 | |
93 | 93 | let H = O._2 | |
94 | 94 | let F = O._3 | |
95 | 95 | let I = O._4 | |
96 | 96 | [G, StringEntry((I + "_assetId"), toBase58String(H)), StringEntry((I + "_asset"), F), StringEntry((I + "_owner"), z), StringEntry(A, I), ScriptTransfer(J.caller, 1, H)] | |
97 | 97 | } | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | ||
102 | 102 | @Callable(J) | |
103 | 103 | func autoBuy (n,o) = { | |
104 | 104 | let P = toBase58String(J.caller.bytes) | |
105 | - | if ((P != k)) | |
105 | + | if (if ((P != k)) | |
106 | + | then (P != h) | |
107 | + | else false) | |
106 | 108 | then throw("This can only be triggering internally") | |
107 | 109 | else { | |
108 | 110 | let A = toBase58String(J.transactionId) | |
109 | 111 | let Q = y(n, o, "1", k, A) | |
110 | 112 | let G = Q._1 | |
111 | 113 | let H = Q._2 | |
112 | 114 | let F = Q._3 | |
113 | 115 | let I = Q._4 | |
114 | 116 | let R = toBase58String(H) | |
115 | 117 | let S = invoke(l, d, [k, H, 3], [AttachedPayment(unit, 0)]) | |
116 | 118 | if ((S == S)) | |
117 | 119 | then [G, StringEntry((I + "_assetId"), R), StringEntry((I + "_asset"), F), StringEntry((I + "_owner"), k), StringEntry(A, I), ScriptTransfer(l, 1, H)] | |
118 | 120 | else throw("Strict value is not equal to itself.") | |
119 | 121 | } | |
120 | 122 | } | |
121 | 123 | ||
122 | 124 | ||
123 | 125 | ||
124 | 126 | @Callable(J) | |
125 | 127 | func promotionPurchase (n,o,T) = { | |
126 | 128 | let P = toBase58String(J.caller.bytes) | |
127 | 129 | if ((P != k)) | |
128 | 130 | then throw("This can only be triggering internally") | |
129 | 131 | else { | |
130 | 132 | let A = toBase58String(J.transactionId) | |
131 | 133 | let U = y(n, o, "1", T, A) | |
132 | 134 | let G = U._1 | |
133 | 135 | let H = U._2 | |
134 | 136 | let F = U._3 | |
135 | 137 | let I = U._4 | |
136 | 138 | let R = toBase58String(H) | |
137 | 139 | [G, StringEntry((I + "_assetId"), R), StringEntry((I + "_asset"), F), StringEntry((I + "_owner"), T), StringEntry(A, I), ScriptTransfer(Address(fromBase58String(T)), 1, H)] | |
138 | 140 | } | |
139 | 141 | } | |
140 | 142 | ||
141 | 143 | ||
142 | 144 | ||
143 | 145 | @Callable(J) | |
144 | 146 | func evolve (n,o,r,z) = { | |
145 | 147 | let P = toBase58String(J.caller.bytes) | |
146 | 148 | if ((P != k)) | |
147 | 149 | then throw("This can only be triggering internally") | |
148 | 150 | else { | |
149 | 151 | let A = toBase58String(J.transactionId) | |
150 | 152 | let V = y(n, o, r, z, A) | |
151 | 153 | let G = V._1 | |
152 | 154 | let H = V._2 | |
153 | 155 | let F = V._3 | |
154 | 156 | let I = V._4 | |
155 | 157 | [G, StringEntry((I + "_assetId"), toBase58String(H)), StringEntry((I + "_asset"), F), StringEntry((I + "_owner"), z), StringEntry(A, I), ScriptTransfer(Address(fromBase58String(z)), 1, H)] | |
156 | 158 | } | |
157 | 159 | } | |
158 | 160 | ||
159 | 161 | ||
160 | 162 | ||
161 | 163 | @Callable(J) | |
162 | 164 | func putForSale (H,W) = { | |
163 | 165 | let P = toBase58String(J.caller.bytes) | |
164 | 166 | let X = { | |
165 | 167 | let M = assetInfo(fromBase58String(H)) | |
166 | 168 | if ($isInstanceOf(M, "Asset")) | |
167 | 169 | then { | |
168 | 170 | let Y = M | |
169 | 171 | Y | |
170 | 172 | } | |
171 | 173 | else throw("Asset not found") | |
172 | 174 | } | |
173 | 175 | let Z = w(X.name) | |
174 | 176 | let z = { | |
175 | 177 | let M = getString(this, (Z + "_owner")) | |
176 | 178 | if ($isInstanceOf(M, "String")) | |
177 | 179 | then { | |
178 | 180 | let aa = M | |
179 | 181 | aa | |
180 | 182 | } | |
181 | 183 | else throw("Owner not found in data") | |
182 | 184 | } | |
183 | 185 | if ((f > W)) | |
184 | 186 | then throw("Amount needs to be more than 1 wave") | |
185 | 187 | else if (if ((P != z)) | |
186 | 188 | then (P != k) | |
187 | 189 | else false) | |
188 | 190 | then throw("You are not able to put this asset up for sale") | |
189 | 191 | else { | |
190 | 192 | let S = invoke(l, d, [P, H, W], [AttachedPayment(unit, 0)]) | |
191 | 193 | if ((S == S)) | |
192 | 194 | then [ScriptTransfer(l, 1, fromBase58String(H))] | |
193 | 195 | else throw("Strict value is not equal to itself.") | |
194 | 196 | } | |
195 | 197 | } | |
196 | 198 | ||
197 | 199 | ||
198 | 200 | @Verifier(ab) | |
199 | 201 | func ac () = if (if (sigVerify(ab.bodyBytes, ab.proofs[0], ab.senderPublicKey)) | |
200 | 202 | then true | |
201 | 203 | else (addressFromPublicKey(ab.senderPublicKey) == l)) | |
202 | 204 | then true | |
203 | 205 | else (addressFromPublicKey(ab.senderPublicKey) == i) | |
204 | 206 |
github/deemru/w8io/169f3d6 43.98 ms ◑