tx · C8Nin9boEhQp29QKsS2rmdFna2ggR9w4D6z42mXjM1gi 3NAtXa4xfYy3teTxeJXWY4ZTD9KGpkyACHC: -0.11000000 Waves 2022.04.26 21:56 [2025841] smart account 3NAtXa4xfYy3teTxeJXWY4ZTD9KGpkyACHC > SELF 0.00000000 Waves
{ "type": 13, "id": "C8Nin9boEhQp29QKsS2rmdFna2ggR9w4D6z42mXjM1gi", "fee": 11000000, "feeAssetId": null, "timestamp": 1650999402733, "version": 2, "chainId": 84, "sender": "3NAtXa4xfYy3teTxeJXWY4ZTD9KGpkyACHC", "senderPublicKey": "CKnmMfPcdFm7C2Sy6TJPDKmAfFg31Dev2KLMojF9gWwp", "proofs": [ "M1Fy4TPR42ir2qgDJ9UminYG2K4FG3xzyUk86YdPHSU9zUrXBAPaX8eAXXZSNf4vCgKwdnb7HGxMVKXq877o6DK" ], "script": "base64:AAIFAAAAAAAAABkIAhIDCgEBEgUKAwgICBIAEgASABIDCgEBAAAAEgAAAAAYbWF4VG9rZW5BbW91bnRGb3JQcmVzYWxlAAAAAAAAmJaAAAAAAAd0b2tlbklkAQAAACA1ijvaNyhGD+h/txUPAELWlOI9ZDTDfzaN+IgihjG0cwAAAAAJY2xhaW1BZGRyAQAAABoBVJbC74rYcvif26LO41st+yuak7E6uU2KbgAAAAADd3ZzAAAAAAAF9eEAAAAAAA50b2tlblVuaXRQcmljZQAAAAAAAAAABQAAAAALZGVub21pbmF0b3IAAAAAAACYloAAAAAAD2RlY2ltYWxzSW5Ub2tlbgAAAAAAAAAAZAEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAAFAAAAA3ZhbAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAA3Z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AAACAgAAAA1wcmVzYWxlU3RhdHVzBwUAAAADbmlsAAAAAWkBAAAADXJlT3BlblByZXNhbGUAAAAAAwkBAAAAAiE9AAAAAggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwgFAAAABHRoaXMAAAAFYnl0ZXMJAAACAAAAAQIAAAAiT25seSBPd25lciBDYW4gUmUtT3BlbiB0aGUgUHJlc2FsZQkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgIAAAANcHJlc2FsZVN0YXR1cwYFAAAAA25pbAAAAAFpAQAAAAVjbGFpbQAAAAEAAAAGYW1vdW50AwkBAAAAAiE9AAAAAggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwgFAAAABHRoaXMAAAAFYnl0ZXMJAAACAAAAAQIAAAAUT25seSBPd25lciBDYW4gQ2xhaW0JAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAAAljbGFpbUFkZHIJAABoAAAAAgUAAAAGYW1vdW50BQAAAAN3dnMFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V56TFl0g==", "height": 2025841, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CDYXmg9TCXzPHJD2PVHbkA9miDTQm8eezhHv9yEbzBXN Next: none Diff:
Old | New | Differences | |
---|---|---|---|
213 | 213 | @Callable(y) | |
214 | 214 | func claim (D) = if ((y.caller.bytes != this.bytes)) | |
215 | 215 | then throw("Only Owner Can Claim") | |
216 | - | else [ScriptTransfer(Address(c), D, unit)] | |
216 | + | else [ScriptTransfer(Address(c), (D * d), unit)] | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | @Verifier(P) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 10000000 | |
5 | 5 | ||
6 | 6 | let b = base58'4bzs2y3QjBq4GEMrNcydRLMX1ReRrJ223fxNXyqyNUXL' | |
7 | 7 | ||
8 | 8 | let c = base58'3N3fEf4mmVyYcbeuHYmZvXuJjoXjH5WRuEV' | |
9 | 9 | ||
10 | 10 | let d = 100000000 | |
11 | 11 | ||
12 | 12 | let e = 5 | |
13 | 13 | ||
14 | 14 | let f = 10000000 | |
15 | 15 | ||
16 | 16 | let g = 100 | |
17 | 17 | ||
18 | 18 | func h (i) = { | |
19 | 19 | let j = { | |
20 | 20 | let k = getInteger(this, i) | |
21 | 21 | if ($isInstanceOf(k, "Int")) | |
22 | 22 | then { | |
23 | 23 | let l = k | |
24 | 24 | l | |
25 | 25 | } | |
26 | 26 | else 0 | |
27 | 27 | } | |
28 | 28 | j | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func m (i) = { | |
33 | 33 | let j = { | |
34 | 34 | let k = getString(this, i) | |
35 | 35 | if ($isInstanceOf(k, "String")) | |
36 | 36 | then { | |
37 | 37 | let l = k | |
38 | 38 | l | |
39 | 39 | } | |
40 | 40 | else "" | |
41 | 41 | } | |
42 | 42 | j | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func n (i) = { | |
47 | 47 | let k = getBoolean(this, i) | |
48 | 48 | if ($isInstanceOf(k, "Boolean")) | |
49 | 49 | then { | |
50 | 50 | let l = k | |
51 | 51 | l | |
52 | 52 | } | |
53 | 53 | else false | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func o (p) = { | |
58 | 58 | let j = h((p + "_tokenPresale")) | |
59 | 59 | j | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func q () = { | |
64 | 64 | let j = { | |
65 | 65 | let k = getInteger(this, "remainingPresaleTokenAmount") | |
66 | 66 | if ($isInstanceOf(k, "Int")) | |
67 | 67 | then { | |
68 | 68 | let l = k | |
69 | 69 | l | |
70 | 70 | } | |
71 | 71 | else a | |
72 | 72 | } | |
73 | 73 | j | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func r () = { | |
78 | 78 | let k = getBoolean(this, "presaleStatus") | |
79 | 79 | if ($isInstanceOf(k, "Boolean")) | |
80 | 80 | then { | |
81 | 81 | let l = k | |
82 | 82 | l | |
83 | 83 | } | |
84 | 84 | else true | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func s () = { | |
89 | 89 | let j = { | |
90 | 90 | let k = getInteger(this, "totalNftCount") | |
91 | 91 | if ($isInstanceOf(k, "Int")) | |
92 | 92 | then { | |
93 | 93 | let l = k | |
94 | 94 | l | |
95 | 95 | } | |
96 | 96 | else 0 | |
97 | 97 | } | |
98 | 98 | j | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func t () = { | |
103 | 103 | let j = { | |
104 | 104 | let k = getInteger(this, "remainingNftCount") | |
105 | 105 | if ($isInstanceOf(k, "Int")) | |
106 | 106 | then { | |
107 | 107 | let l = k | |
108 | 108 | l | |
109 | 109 | } | |
110 | 110 | else 0 | |
111 | 111 | } | |
112 | 112 | j | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func u () = { | |
117 | 117 | let j = { | |
118 | 118 | let k = getString(this, "remainingNfts") | |
119 | 119 | if ($isInstanceOf(k, "String")) | |
120 | 120 | then { | |
121 | 121 | let l = k | |
122 | 122 | l | |
123 | 123 | } | |
124 | 124 | else "" | |
125 | 125 | } | |
126 | 126 | j | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func v (w) = { | |
131 | 131 | let k = getBoolean(this, (w + "_soldOut")) | |
132 | 132 | if ($isInstanceOf(k, "Boolean")) | |
133 | 133 | then { | |
134 | 134 | let l = k | |
135 | 135 | l | |
136 | 136 | } | |
137 | 137 | else false | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func x (y) = { | |
142 | 142 | let z = ((((y.transactionId + y.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
143 | 143 | sha256(z) | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Callable(y) | |
148 | 148 | func buyTokensFromPresale (A) = { | |
149 | 149 | let B = toBase58String(y.caller.bytes) | |
150 | 150 | let C = value(y.payments[0]) | |
151 | 151 | let D = C.amount | |
152 | 152 | if (!(r())) | |
153 | 153 | then throw("Presale Stopped by the Owner") | |
154 | 154 | else if ((A > q())) | |
155 | 155 | then throw("Exceeded Remaining Token Amount Dedicated for Presale") | |
156 | 156 | else if (((fraction(A, e, f) * d) > D)) | |
157 | 157 | then throw("Not enough payments in waves") | |
158 | 158 | else [IntegerEntry((B + "_tokenPresale"), (A + o(B))), IntegerEntry("remainingPresaleTokenAmount", (q() - A)), StringEntry((B + "_presaleAddresses"), B), ScriptTransfer(value(addressFromString(B)), (A * g), b)] | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | ||
163 | 163 | @Callable(y) | |
164 | 164 | func mintNftByOwner (E,F,G) = { | |
165 | 165 | let B = toBase58String(y.caller.bytes) | |
166 | 166 | if ((y.caller != this)) | |
167 | 167 | then throw("Only Dapp Owner Can Mint") | |
168 | 168 | else { | |
169 | 169 | let H = Issue(E, G, 1, 0, false) | |
170 | 170 | let w = calculateAssetId(H) | |
171 | 171 | let I = toBase58String(w) | |
172 | 172 | [H, StringEntry((I + "_assetId"), I), StringEntry((I + "_ownerAddr"), B), StringEntry(((I + "_collectionId_") + F), I), StringEntry("remainingNfts", ((u() + I) + "_")), IntegerEntry("totalNftCount", (s() + 1)), IntegerEntry("remainingNftCount", (t() + 1)), BooleanEntry((I + "_soldOut"), false)] | |
173 | 173 | } | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
178 | 178 | @Callable(y) | |
179 | 179 | func buyNftsFromPresale () = { | |
180 | 180 | let B = toBase58String(y.caller.bytes) | |
181 | 181 | if (!(r())) | |
182 | 182 | then throw("Presale Stopped by the Owner") | |
183 | 183 | else if ((t() == 0)) | |
184 | 184 | then throw("Nfts are not available for buying - all are sold") | |
185 | 185 | else { | |
186 | 186 | let J = split(u(), "_") | |
187 | 187 | let K = t() | |
188 | 188 | let z = toInt(x(y)) | |
189 | 189 | let L = (z % K) | |
190 | 190 | let M = J[L] | |
191 | 191 | let N = removeByIndex(J, L) | |
192 | 192 | let O = makeString(N, "_") | |
193 | 193 | [ScriptTransfer(value(addressFromString(B)), 1, fromBase58String(M)), StringEntry((M + "_ownerAddr"), B), IntegerEntry("remainingNftCount", (t() - 1)), StringEntry("remainingNfts", O), BooleanEntry((M + "_soldOut"), true)] | |
194 | 194 | } | |
195 | 195 | } | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(y) | |
200 | 200 | func stopPresale () = if ((y.caller.bytes != this.bytes)) | |
201 | 201 | then throw("Only Owner Can Stop the Presale") | |
202 | 202 | else [BooleanEntry("presaleStatus", false)] | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | ||
206 | 206 | @Callable(y) | |
207 | 207 | func reOpenPresale () = if ((y.caller.bytes != this.bytes)) | |
208 | 208 | then throw("Only Owner Can Re-Open the Presale") | |
209 | 209 | else [BooleanEntry("presaleStatus", true)] | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | ||
213 | 213 | @Callable(y) | |
214 | 214 | func claim (D) = if ((y.caller.bytes != this.bytes)) | |
215 | 215 | then throw("Only Owner Can Claim") | |
216 | - | else [ScriptTransfer(Address(c), D, unit)] | |
216 | + | else [ScriptTransfer(Address(c), (D * d), unit)] | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | @Verifier(P) | |
220 | 220 | func Q () = sigVerify(P.bodyBytes, P.proofs[0], P.senderPublicKey) | |
221 | 221 |
github/deemru/w8io/026f985 35.40 ms ◑