tx · 28cs12vTfKknkkeW9UUDGoUxrRRnbNqXHM4gq2p6ekVg 3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu: -0.04000000 Waves 2022.01.13 07:44 [1876713] smart account 3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu > SELF 0.00000000 Waves
{ "type": 13, "id": "28cs12vTfKknkkeW9UUDGoUxrRRnbNqXHM4gq2p6ekVg", "fee": 4000000, "feeAssetId": null, "timestamp": 1642049098821, "version": 2, "chainId": 84, "sender": "3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu", "senderPublicKey": "D4v2S9mjah7eEEmuQVBNd4WipC3scs8V4PjuDBweWatE", "proofs": [ "dLHNuWUzRrdJjzShMF8rmykGEzeXLz7C9EQ72gw3KS1dRXsaZ8r7eNgmryC1T1GmVbGXmjoBN5GsVFkCr19QaA3" ], "script": "base64:AAIFAAAAAAAABBIIAhIECgIICBIECgIICBIECgIICBoICgFBEgN4eTIaCAoBQhIDeHkzGgsKAUMSBnh5MUtleRoLCgFEEgZ4eTJLZXkaCwoBRRIGeHkzS2V5GgsKAUYSBnh5VmFsMRoMCgFHEgckbWF0Y2gwGgsKAUgSBnh5VmFsMhoLCgFJEgZ4eVZhbDMaEAoBShILZ2V0WHlSZXR1cm4aBwoBSxICeHkaEAoBTBILJHQwMTUyMDE1MzUaCgoBTRIFZ2V0WHkaCAoBThIDeHlnGg4KAU8SCWNoZWNrTGlzdBoQCgFQEgskdDAxNjUxMTY3MhoLCgFREgZnZW5TdHIaEwoBUhIOY2hlY2tGb3JFdm9sdmUaEAoBUxILJHQwMjMxOTIzNDAaBwoBVBICcDEaBwoBVRICcDIaBwoBVhICcDMaBwoBVxICcDQaBwoBWBICcDUaBwoBWRICcDYaBwoBWhICcDcaCQoBYRIEQ09MUxoICgJhYRICcDgaCAoCYWISAnA5GhEKAmFjEgtjbGFpbVNxdWFyZRoTCgJhZBINdHJhbnNhY3Rpb25JZBoRCgJhZRILJHQwMzM5MzM0OTAaDw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AAAAAAAAEFAAAAAmFvBQAAAANuaWwAAAACYXEBAAAACnB1dEZvclNhbGUAAAACAAAAAmFvAAAAAmF2BAAAAAF4CQACWAAAAAEICAUAAAACYXEAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAJhdQkAA/wAAAAEBQAAAAFmAgAAABFhZGRPd25lckFuZEFtb3VudAkABEwAAAACBQAAAAF4CQAETAAAAAIFAAAAAmFvCQAETAAAAAIFAAAAAmF2BQAAAANuaWwFAAAAA25pbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFc2FsZV8FAAAAAmFvAgAAAA5fb3JpZ2luYWxPd25lcgUAAAABeAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFc2FsZV8FAAAAAmFvAgAAAAdfYW1vdW50BQAAAAJhdgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAFmAAAAAAAAAAABCQACWQAAAAEFAAAAAmFvBQAAAANuaWwAAAAAq8n02Q==", "height": 1876713, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3BNfMhG17CekeeV6a2mc8sYJMhCViUwoHui9D7Cch6aW Next: 8Rpp8xvCLDrgbJX8uyWjw1Giy7swbKEKGsC8eQHV5ukL Diff:
Old | New | Differences | |
---|---|---|---|
201 | 201 | let am = as._3 | |
202 | 202 | let ap = as._4 | |
203 | 203 | let at = toBase58String(ao) | |
204 | + | let au = invoke(f, "addOwnerAndAmount", [x, ao, "2"], nil) | |
204 | 205 | [an, StringEntry((ap + "_assetId"), at), StringEntry((ap + "_asset"), am), StringEntry((ap + "_owner"), x), StringEntry((("sale_" + at) + "_originalOwner"), x), IntegerEntry((("sale_" + at) + "_amount"), 2), StringEntry(ad, ap), ScriptTransfer(f, 1, ao)] | |
205 | 206 | } | |
206 | 207 | ||
207 | 208 | ||
208 | 209 | ||
209 | 210 | @Callable(aq) | |
210 | - | func putForSale (ao, | |
211 | + | func putForSale (ao,av) = { | |
211 | 212 | let x = toBase58String(aq.caller.bytes) | |
212 | - | let av = base58'DLkHHwWRQq7ezBgT5Tw4oCtJz6nn6yT61EMoGDP6zrfd' | |
213 | - | let aw = addressFromPublicKey(av) | |
214 | - | [StringEntry((("sale_" + ao) + "_originalOwner"), x), StringEntry((("sale_" + ao) + "_amount"), au), ScriptTransfer(aw, 1, fromBase58String(ao))] | |
213 | + | let au = invoke(f, "addOwnerAndAmount", [x, ao, av], nil) | |
214 | + | [StringEntry((("sale_" + ao) + "_originalOwner"), x), StringEntry((("sale_" + ao) + "_amount"), av), ScriptTransfer(f, 1, fromBase58String(ao))] | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 |
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 = true | |
11 | 11 | ||
12 | 12 | let e = base58'GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY' | |
13 | 13 | ||
14 | 14 | let f = addressFromPublicKey(e) | |
15 | 15 | ||
16 | 16 | func g (h) = { | |
17 | 17 | let i = h | |
18 | 18 | let j = i._1 | |
19 | 19 | let k = i._2 | |
20 | 20 | let l = i._3 | |
21 | 21 | let m = pow(2, 0, (l - 1), 0, 0, HALFUP) | |
22 | 22 | let n = $Tuple2((j - m), (k - m)) | |
23 | 23 | let o = $Tuple2(j, (k - m)) | |
24 | 24 | let p = $Tuple2((j + m), (k + m)) | |
25 | 25 | let q = $Tuple2((j - m), k) | |
26 | 26 | let r = $Tuple2((j + m), k) | |
27 | 27 | let s = $Tuple2((j - m), (k + m)) | |
28 | 28 | let t = $Tuple2(j, (k + m)) | |
29 | 29 | let u = $Tuple2((j + m), (k + m)) | |
30 | 30 | [$Tuple3(n, o, q), $Tuple3(o, p, r), $Tuple3(q, s, t), $Tuple3(r, t, u)] | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func v (w,l,x) = { | |
35 | 35 | let y = w | |
36 | 36 | let z = y._1 | |
37 | 37 | let A = y._2 | |
38 | 38 | let B = y._3 | |
39 | 39 | let C = (((((toString(z._1) + ",") + toString(z._2)) + ",") + l) + "_owner") | |
40 | 40 | let D = (((((toString(A._1) + ",") + toString(A._2)) + ",") + l) + "_owner") | |
41 | 41 | let E = (((((toString(B._1) + ",") + toString(B._2)) + ",") + l) + "_owner") | |
42 | 42 | let F = { | |
43 | 43 | let G = getString(this, C) | |
44 | 44 | if ($isInstanceOf(G, "Unit")) | |
45 | 45 | then "unset" | |
46 | 46 | else if ($isInstanceOf(G, "String")) | |
47 | 47 | then { | |
48 | 48 | let j = G | |
49 | 49 | j | |
50 | 50 | } | |
51 | 51 | else throw("Match error") | |
52 | 52 | } | |
53 | 53 | let H = { | |
54 | 54 | let G = getString(this, D) | |
55 | 55 | if ($isInstanceOf(G, "Unit")) | |
56 | 56 | then "unset" | |
57 | 57 | else if ($isInstanceOf(G, "String")) | |
58 | 58 | then { | |
59 | 59 | let j = G | |
60 | 60 | j | |
61 | 61 | } | |
62 | 62 | else throw("Match error") | |
63 | 63 | } | |
64 | 64 | let I = { | |
65 | 65 | let G = getString(this, E) | |
66 | 66 | if ($isInstanceOf(G, "Unit")) | |
67 | 67 | then "unset" | |
68 | 68 | else if ($isInstanceOf(G, "String")) | |
69 | 69 | then { | |
70 | 70 | let j = G | |
71 | 71 | j | |
72 | 72 | } | |
73 | 73 | else throw("Match error") | |
74 | 74 | } | |
75 | 75 | if (if ((F == x)) | |
76 | 76 | then (H == x) | |
77 | 77 | else false) | |
78 | 78 | then (I == x) | |
79 | 79 | else false | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func J (K,l) = { | |
84 | 84 | let L = K | |
85 | 85 | let j = L._1 | |
86 | 86 | let k = L._2 | |
87 | 87 | $Tuple3(j, k, (l + 1)) | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func M (N,x) = { | |
92 | 92 | let O = g(N) | |
93 | 93 | let P = N | |
94 | 94 | let j = P._1 | |
95 | 95 | let k = P._2 | |
96 | 96 | let l = P._3 | |
97 | 97 | let Q = toString(l) | |
98 | 98 | if (v(O[0], Q, x)) | |
99 | 99 | then J(O[0]._1, l) | |
100 | 100 | else if (v(O[1], Q, x)) | |
101 | 101 | then J(O[1]._1, l) | |
102 | 102 | else if (v(O[2], Q, x)) | |
103 | 103 | then J(O[2]._1, l) | |
104 | 104 | else if (v(O[3], Q, x)) | |
105 | 105 | then J(O[3]._1, l) | |
106 | 106 | else N | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func R (N,x) = { | |
111 | 111 | let S = N | |
112 | 112 | let j = S._1 | |
113 | 113 | let k = S._2 | |
114 | 114 | let l = S._3 | |
115 | 115 | let T = M(N, x) | |
116 | 116 | if ((T._3 == l)) | |
117 | 117 | then T | |
118 | 118 | else { | |
119 | 119 | let U = M(T, x) | |
120 | 120 | if ((U._3 == T._3)) | |
121 | 121 | then U | |
122 | 122 | else { | |
123 | 123 | let V = M(U, x) | |
124 | 124 | if ((V._3 == U._3)) | |
125 | 125 | then V | |
126 | 126 | else { | |
127 | 127 | let W = M(V, x) | |
128 | 128 | if ((W._3 == V._3)) | |
129 | 129 | then W | |
130 | 130 | else { | |
131 | 131 | let X = M(W, x) | |
132 | 132 | if ((X._3 == W._3)) | |
133 | 133 | then X | |
134 | 134 | else { | |
135 | 135 | let Y = M(X, x) | |
136 | 136 | if ((Y._3 == X._3)) | |
137 | 137 | then Y | |
138 | 138 | else { | |
139 | 139 | let Z = M(Y, x) | |
140 | 140 | if ((Z._3 == Y._3)) | |
141 | 141 | then Z | |
142 | 142 | else { | |
143 | 143 | let aa = M(Z, x) | |
144 | 144 | if ((aa._3 == Z._3)) | |
145 | 145 | then aa | |
146 | 146 | else { | |
147 | 147 | let ab = M(aa, x) | |
148 | 148 | if ((ab._3 == aa._3)) | |
149 | 149 | then ab | |
150 | 150 | else M(M(ab, x), x) | |
151 | 151 | } | |
152 | 152 | } | |
153 | 153 | } | |
154 | 154 | } | |
155 | 155 | } | |
156 | 156 | } | |
157 | 157 | } | |
158 | 158 | } | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func ac (j,k,x,ad) = { | |
163 | 163 | let ae = M($Tuple3(parseIntValue(j), parseIntValue(k), 1), x) | |
164 | 164 | let af = ae._1 | |
165 | 165 | let ag = ae._2 | |
166 | 166 | let ah = ae._3 | |
167 | 167 | let ai = toString(af) | |
168 | 168 | let aj = toString(ag) | |
169 | 169 | let ak = toString(ah) | |
170 | 170 | let al = ((ai + ",") + aj) | |
171 | 171 | let am = ((c + ad) + ".png") | |
172 | 172 | let an = Issue(((al + " Gen ") + ak), am, 1, 0, false) | |
173 | 173 | let ao = calculateAssetId(an) | |
174 | 174 | let l = ak | |
175 | 175 | let ap = ((al + ",") + l) | |
176 | 176 | $Tuple4(an, ao, am, ap) | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | @Callable(aq) | |
181 | 181 | func purchase (j,k) = { | |
182 | 182 | let x = toBase58String(aq.caller.bytes) | |
183 | 183 | let ad = toBase58String(aq.transactionId) | |
184 | 184 | let ar = ac(j, k, x, ad) | |
185 | 185 | let an = ar._1 | |
186 | 186 | let ao = ar._2 | |
187 | 187 | let am = ar._3 | |
188 | 188 | let ap = ar._4 | |
189 | 189 | [an, StringEntry((ap + "_assetId"), toBase58String(ao)), StringEntry((ap + "_asset"), am), StringEntry((ap + "_owner"), x), StringEntry(ad, ap), ScriptTransfer(aq.caller, 1, ao)] | |
190 | 190 | } | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | ||
194 | 194 | @Callable(aq) | |
195 | 195 | func autoBuy (j,k) = { | |
196 | 196 | let x = toBase58String(f.bytes) | |
197 | 197 | let ad = toBase58String(aq.transactionId) | |
198 | 198 | let as = ac(j, k, x, ad) | |
199 | 199 | let an = as._1 | |
200 | 200 | let ao = as._2 | |
201 | 201 | let am = as._3 | |
202 | 202 | let ap = as._4 | |
203 | 203 | let at = toBase58String(ao) | |
204 | + | let au = invoke(f, "addOwnerAndAmount", [x, ao, "2"], nil) | |
204 | 205 | [an, StringEntry((ap + "_assetId"), at), StringEntry((ap + "_asset"), am), StringEntry((ap + "_owner"), x), StringEntry((("sale_" + at) + "_originalOwner"), x), IntegerEntry((("sale_" + at) + "_amount"), 2), StringEntry(ad, ap), ScriptTransfer(f, 1, ao)] | |
205 | 206 | } | |
206 | 207 | ||
207 | 208 | ||
208 | 209 | ||
209 | 210 | @Callable(aq) | |
210 | - | func putForSale (ao, | |
211 | + | func putForSale (ao,av) = { | |
211 | 212 | let x = toBase58String(aq.caller.bytes) | |
212 | - | let av = base58'DLkHHwWRQq7ezBgT5Tw4oCtJz6nn6yT61EMoGDP6zrfd' | |
213 | - | let aw = addressFromPublicKey(av) | |
214 | - | [StringEntry((("sale_" + ao) + "_originalOwner"), x), StringEntry((("sale_" + ao) + "_amount"), au), ScriptTransfer(aw, 1, fromBase58String(ao))] | |
213 | + | let au = invoke(f, "addOwnerAndAmount", [x, ao, av], nil) | |
214 | + | [StringEntry((("sale_" + ao) + "_originalOwner"), x), StringEntry((("sale_" + ao) + "_amount"), av), ScriptTransfer(f, 1, fromBase58String(ao))] | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 |
github/deemru/w8io/169f3d6 37.12 ms ◑