tx · 46N3aJoL2utUivzVQNgRAd7BGcf2rXDoubXPGJRYr1U4 3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu: -0.04000000 Waves 2022.03.29 18:09 [1985380] smart account 3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu > SELF 0.00000000 Waves
{ "type": 13, "id": "46N3aJoL2utUivzVQNgRAd7BGcf2rXDoubXPGJRYr1U4", "fee": 4000000, "feeAssetId": null, "timestamp": 1648566658072, "version": 2, "chainId": 84, "sender": "3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu", "senderPublicKey": "D4v2S9mjah7eEEmuQVBNd4WipC3scs8V4PjuDBweWatE", "proofs": [ "4P2KuS9jKk63DEDKnjQEff6oZtz65uZ9yn3EG18BVYtSfv5VJnknV75MPjLPv5LyuMuSuukhqhGneKgNug27xU7F" ], "script": "base64:AAIFAAAAAAAAACMIAhIECgIICBIECgIICBIFCgMICAgSBgoECAgICBIECgIIAQAAABEAAAAABENPTFMAAAAAAAAABAAAAAAABFJPV1MAAAAAAAAABAAAAAAACW5mdERvbWFpbgIAAAAYaHR0cHM6Ly9uZnQuZ3JpZGdhbmcuaW8vAAAAABVhZGRPd25lckFuZEFtb3VudEZ1bmMCAAAAEWFkZE93bmVyQW5kQW1vdW50AAAAAAVERUJVRwYAAAAAEW1pbkZvclNhbGVXYXZsZXRzAAAAAAAF9eEAAAAAABBtaW5QdXJjaGFzZVByaWNlAAAAAAAAD0JAAAAAAARkYXBwAgAAACMzTjR2cVVYV3c4dGYyM0xEV0RiU0VwSlpINmRlbnQzRVRGdQAAAAALZGFwcEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAARkYXBwAAAAABFob2xkaW5nc1B1YmxpY0tleQIAAAAsR1VIdzFqa3N0TldUczlTWDFLTTNwTXRxOUhYanVwdnhpVGQxdXJOaE5veVkAAAAACGhvbGRpbmdzAgAAACMzTjlSN3U0NDlaMWI3NlFwSnA5dTNnelBqTVlRWW5w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aGVkUGF5bWVudAAAAAIFAAAABHVuaXQAAAAAAAAAAAAFAAAAA25pbAMJAAAAAAAAAgUAAAADcmVzBQAAAANyZXMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAPaG9sZGluZ3NBZGRyZXNzAAAAAAAAAAABCQACWQAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BgkAAAAAAAACCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABCAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BQAAAA9ob2xkaW5nc0FkZHJlc3MGCQAAAAAAAAIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkFAAAAC2RhcHBBZGRyZXNztBIVFA==", "height": 1985380, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2nzBJFAReKVrXCQtCQ4CswmwPDFHYphJVjTw6xrVj6ge Next: AMYLb8qdAPBVVfHhaDqcxzEBc6KtdornfmFTyVDzdWxr Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let minForSaleWavlets = 100000000 | |
15 | 15 | ||
16 | 16 | let minPurchasePrice = 1000000 | |
17 | + | ||
18 | + | let dapp = "3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu" | |
19 | + | ||
20 | + | let dappAddress = Address(fromBase58String(dapp)) | |
17 | 21 | ||
18 | 22 | let holdingsPublicKey = "GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY" | |
19 | 23 | ||
42 | 46 | ||
43 | 47 | ||
44 | 48 | func getDataKeyPrefixFromAssetName (name) = { | |
45 | - | let $ | |
46 | - | let x = $ | |
47 | - | let y = $ | |
48 | - | let gen = $ | |
49 | + | let $t010011041 = getXYGenFromName(name) | |
50 | + | let x = $t010011041._1 | |
51 | + | let y = $t010011041._2 | |
52 | + | let gen = $t010011041._3 | |
49 | 53 | let prefix = getDataKeyPrefix(x, y, gen) | |
50 | 54 | prefix | |
51 | 55 | } | |
81 | 85 | else { | |
82 | 86 | let ownerId = toBase58String(i.caller.bytes) | |
83 | 87 | let transactionId = toBase58String(i.transactionId) | |
84 | - | let $ | |
85 | - | let asset = $ | |
86 | - | let assetId = $ | |
87 | - | let assetUrl = $ | |
88 | - | let dataKeyPrefix = $ | |
88 | + | let $t022152310 = claimSquare(x, y, "1", ownerId, transactionId) | |
89 | + | let asset = $t022152310._1 | |
90 | + | let assetId = $t022152310._2 | |
91 | + | let assetUrl = $t022152310._3 | |
92 | + | let dataKeyPrefix = $t022152310._4 | |
89 | 93 | [asset, StringEntry((dataKeyPrefix + "_assetId"), toBase58String(assetId)), StringEntry((dataKeyPrefix + "_asset"), assetUrl), StringEntry((dataKeyPrefix + "_owner"), ownerId), StringEntry(transactionId, dataKeyPrefix), ScriptTransfer(i.caller, 1, assetId)] | |
90 | 94 | } | |
91 | 95 | } | |
99 | 103 | then throw("This can only be triggering internally") | |
100 | 104 | else { | |
101 | 105 | let transactionId = toBase58String(i.transactionId) | |
102 | - | let $ | |
103 | - | let asset = $ | |
104 | - | let assetId = $ | |
105 | - | let assetUrl = $ | |
106 | - | let dataKeyPrefix = $ | |
106 | + | let $t028662962 = claimSquare(x, y, "1", holdings, transactionId) | |
107 | + | let asset = $t028662962._1 | |
108 | + | let assetId = $t028662962._2 | |
109 | + | let assetUrl = $t028662962._3 | |
110 | + | let dataKeyPrefix = $t028662962._4 | |
107 | 111 | let assetIdStr = toBase58String(assetId) | |
108 | 112 | let res = invoke(holdingsAddress, addOwnerAndAmountFunc, [holdings, assetId, 3], [AttachedPayment(unit, 0)]) | |
109 | 113 | if ((res == res)) | |
121 | 125 | then throw("This can only be triggering internally") | |
122 | 126 | else { | |
123 | 127 | let transactionId = toBase58String(i.transactionId) | |
124 | - | let $ | |
125 | - | let asset = $ | |
126 | - | let assetId = $ | |
127 | - | let assetUrl = $ | |
128 | - | let dataKeyPrefix = $ | |
128 | + | let $t037153820 = claimSquare(x, y, "1", desinationAddress, transactionId) | |
129 | + | let asset = $t037153820._1 | |
130 | + | let assetId = $t037153820._2 | |
131 | + | let assetUrl = $t037153820._3 | |
132 | + | let dataKeyPrefix = $t037153820._4 | |
129 | 133 | let assetIdStr = toBase58String(assetId) | |
130 | 134 | [asset, StringEntry((dataKeyPrefix + "_assetId"), assetIdStr), StringEntry((dataKeyPrefix + "_asset"), assetUrl), StringEntry((dataKeyPrefix + "_owner"), desinationAddress), StringEntry(transactionId, dataKeyPrefix), ScriptTransfer(Address(fromBase58String(desinationAddress)), 1, assetId)] | |
131 | 135 | } | |
140 | 144 | then throw("This can only be triggering internally") | |
141 | 145 | else { | |
142 | 146 | let transactionId = toBase58String(i.transactionId) | |
143 | - | let $ | |
144 | - | let asset = $ | |
145 | - | let assetId = $ | |
146 | - | let assetUrl = $ | |
147 | - | let dataKeyPrefix = $ | |
147 | + | let $t044834578 = claimSquare(x, y, gen, ownerId, transactionId) | |
148 | + | let asset = $t044834578._1 | |
149 | + | let assetId = $t044834578._2 | |
150 | + | let assetUrl = $t044834578._3 | |
151 | + | let dataKeyPrefix = $t044834578._4 | |
148 | 152 | [asset, StringEntry((dataKeyPrefix + "_assetId"), toBase58String(assetId)), StringEntry((dataKeyPrefix + "_asset"), assetUrl), StringEntry((dataKeyPrefix + "_owner"), ownerId), StringEntry(transactionId, dataKeyPrefix), ScriptTransfer(Address(fromBase58String(ownerId)), 1, assetId)] | |
149 | 153 | } | |
150 | 154 | } | |
183 | 187 | ||
184 | 188 | ||
185 | 189 | @Verifier(tx) | |
186 | - | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
190 | + | func verify () = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
187 | 191 | then true | |
188 | - | else (addressFromPublicKey(tx.senderPublicKey) == holdingsAddress) | |
192 | + | else (addressFromPublicKey(tx.senderPublicKey) == holdingsAddress)) | |
193 | + | then true | |
194 | + | else (addressFromPublicKey(tx.senderPublicKey) == dappAddress) | |
189 | 195 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let COLS = 1024 | |
5 | 5 | ||
6 | 6 | let ROWS = 1024 | |
7 | 7 | ||
8 | 8 | let nftDomain = "https://nft.gridgang.io/" | |
9 | 9 | ||
10 | 10 | let addOwnerAndAmountFunc = "addOwnerAndAmount" | |
11 | 11 | ||
12 | 12 | let DEBUG = true | |
13 | 13 | ||
14 | 14 | let minForSaleWavlets = 100000000 | |
15 | 15 | ||
16 | 16 | let minPurchasePrice = 1000000 | |
17 | + | ||
18 | + | let dapp = "3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu" | |
19 | + | ||
20 | + | let dappAddress = Address(fromBase58String(dapp)) | |
17 | 21 | ||
18 | 22 | let holdingsPublicKey = "GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY" | |
19 | 23 | ||
20 | 24 | let holdings = "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r" | |
21 | 25 | ||
22 | 26 | let holdingsAddress = Address(fromBase58String(holdings)) | |
23 | 27 | ||
24 | 28 | func getAssetName (x,y) = { | |
25 | 29 | let name = ((x + ",") + y) | |
26 | 30 | name | |
27 | 31 | } | |
28 | 32 | ||
29 | 33 | ||
30 | 34 | func getDataKeyPrefix (x,y,gen) = { | |
31 | 35 | let name = getAssetName(x, y) | |
32 | 36 | let prefix = ((name + ",") + gen) | |
33 | 37 | prefix | |
34 | 38 | } | |
35 | 39 | ||
36 | 40 | ||
37 | 41 | func getXYGenFromName (name) = { | |
38 | 42 | let parts = split(name, ",") | |
39 | 43 | let tuple = $Tuple3(parts[0], parts[1], parts[2]) | |
40 | 44 | tuple | |
41 | 45 | } | |
42 | 46 | ||
43 | 47 | ||
44 | 48 | func getDataKeyPrefixFromAssetName (name) = { | |
45 | - | let $ | |
46 | - | let x = $ | |
47 | - | let y = $ | |
48 | - | let gen = $ | |
49 | + | let $t010011041 = getXYGenFromName(name) | |
50 | + | let x = $t010011041._1 | |
51 | + | let y = $t010011041._2 | |
52 | + | let gen = $t010011041._3 | |
49 | 53 | let prefix = getDataKeyPrefix(x, y, gen) | |
50 | 54 | prefix | |
51 | 55 | } | |
52 | 56 | ||
53 | 57 | ||
54 | 58 | func claimSquare (x,y,gen,ownerId,transactionId) = { | |
55 | 59 | let resolvedXStr = x | |
56 | 60 | let resolvedYStr = y | |
57 | 61 | let resolvedGenStr = gen | |
58 | 62 | let assetName = getAssetName(resolvedXStr, resolvedYStr) | |
59 | 63 | let assetUrl = ((nftDomain + transactionId) + ".png") | |
60 | 64 | let asset = Issue(((assetName + ",") + resolvedGenStr), assetUrl, 1, 0, false) | |
61 | 65 | let assetId = calculateAssetId(asset) | |
62 | 66 | let dataKeyPrefix = getDataKeyPrefix(resolvedXStr, resolvedYStr, gen) | |
63 | 67 | $Tuple4(asset, assetId, assetUrl, dataKeyPrefix) | |
64 | 68 | } | |
65 | 69 | ||
66 | 70 | ||
67 | 71 | @Callable(i) | |
68 | 72 | func purchase (x,y) = { | |
69 | 73 | let prefix = getDataKeyPrefix(x, y, "1") | |
70 | 74 | let paymentAmount = valueOrElse(i.payments[0].amount, 0) | |
71 | 75 | let existingAssetId = match getString(this, (prefix + "_assetId")) { | |
72 | 76 | case _: Unit => | |
73 | 77 | "unset" | |
74 | 78 | case err: String => | |
75 | 79 | throw("This square has already been purchased") | |
76 | 80 | case _ => | |
77 | 81 | throw("Match error") | |
78 | 82 | } | |
79 | 83 | if ((minPurchasePrice > paymentAmount)) | |
80 | 84 | then throw((("You need to send at least " + toString(minPurchasePrice)) + "WAVLETS to purchase a square")) | |
81 | 85 | else { | |
82 | 86 | let ownerId = toBase58String(i.caller.bytes) | |
83 | 87 | let transactionId = toBase58String(i.transactionId) | |
84 | - | let $ | |
85 | - | let asset = $ | |
86 | - | let assetId = $ | |
87 | - | let assetUrl = $ | |
88 | - | let dataKeyPrefix = $ | |
88 | + | let $t022152310 = claimSquare(x, y, "1", ownerId, transactionId) | |
89 | + | let asset = $t022152310._1 | |
90 | + | let assetId = $t022152310._2 | |
91 | + | let assetUrl = $t022152310._3 | |
92 | + | let dataKeyPrefix = $t022152310._4 | |
89 | 93 | [asset, StringEntry((dataKeyPrefix + "_assetId"), toBase58String(assetId)), StringEntry((dataKeyPrefix + "_asset"), assetUrl), StringEntry((dataKeyPrefix + "_owner"), ownerId), StringEntry(transactionId, dataKeyPrefix), ScriptTransfer(i.caller, 1, assetId)] | |
90 | 94 | } | |
91 | 95 | } | |
92 | 96 | ||
93 | 97 | ||
94 | 98 | ||
95 | 99 | @Callable(i) | |
96 | 100 | func autoBuy (x,y) = { | |
97 | 101 | let callerId = toBase58String(i.caller.bytes) | |
98 | 102 | if ((callerId != holdings)) | |
99 | 103 | then throw("This can only be triggering internally") | |
100 | 104 | else { | |
101 | 105 | let transactionId = toBase58String(i.transactionId) | |
102 | - | let $ | |
103 | - | let asset = $ | |
104 | - | let assetId = $ | |
105 | - | let assetUrl = $ | |
106 | - | let dataKeyPrefix = $ | |
106 | + | let $t028662962 = claimSquare(x, y, "1", holdings, transactionId) | |
107 | + | let asset = $t028662962._1 | |
108 | + | let assetId = $t028662962._2 | |
109 | + | let assetUrl = $t028662962._3 | |
110 | + | let dataKeyPrefix = $t028662962._4 | |
107 | 111 | let assetIdStr = toBase58String(assetId) | |
108 | 112 | let res = invoke(holdingsAddress, addOwnerAndAmountFunc, [holdings, assetId, 3], [AttachedPayment(unit, 0)]) | |
109 | 113 | if ((res == res)) | |
110 | 114 | then [asset, StringEntry((dataKeyPrefix + "_assetId"), assetIdStr), StringEntry((dataKeyPrefix + "_asset"), assetUrl), StringEntry((dataKeyPrefix + "_owner"), holdings), StringEntry(transactionId, dataKeyPrefix), ScriptTransfer(holdingsAddress, 1, assetId)] | |
111 | 115 | else throw("Strict value is not equal to itself.") | |
112 | 116 | } | |
113 | 117 | } | |
114 | 118 | ||
115 | 119 | ||
116 | 120 | ||
117 | 121 | @Callable(i) | |
118 | 122 | func promotionPurchase (x,y,desinationAddress) = { | |
119 | 123 | let callerId = toBase58String(i.caller.bytes) | |
120 | 124 | if ((callerId != holdings)) | |
121 | 125 | then throw("This can only be triggering internally") | |
122 | 126 | else { | |
123 | 127 | let transactionId = toBase58String(i.transactionId) | |
124 | - | let $ | |
125 | - | let asset = $ | |
126 | - | let assetId = $ | |
127 | - | let assetUrl = $ | |
128 | - | let dataKeyPrefix = $ | |
128 | + | let $t037153820 = claimSquare(x, y, "1", desinationAddress, transactionId) | |
129 | + | let asset = $t037153820._1 | |
130 | + | let assetId = $t037153820._2 | |
131 | + | let assetUrl = $t037153820._3 | |
132 | + | let dataKeyPrefix = $t037153820._4 | |
129 | 133 | let assetIdStr = toBase58String(assetId) | |
130 | 134 | [asset, StringEntry((dataKeyPrefix + "_assetId"), assetIdStr), StringEntry((dataKeyPrefix + "_asset"), assetUrl), StringEntry((dataKeyPrefix + "_owner"), desinationAddress), StringEntry(transactionId, dataKeyPrefix), ScriptTransfer(Address(fromBase58String(desinationAddress)), 1, assetId)] | |
131 | 135 | } | |
132 | 136 | } | |
133 | 137 | ||
134 | 138 | ||
135 | 139 | ||
136 | 140 | @Callable(i) | |
137 | 141 | func evolve (x,y,gen,ownerId) = { | |
138 | 142 | let callerId = toBase58String(i.caller.bytes) | |
139 | 143 | if ((callerId != holdings)) | |
140 | 144 | then throw("This can only be triggering internally") | |
141 | 145 | else { | |
142 | 146 | let transactionId = toBase58String(i.transactionId) | |
143 | - | let $ | |
144 | - | let asset = $ | |
145 | - | let assetId = $ | |
146 | - | let assetUrl = $ | |
147 | - | let dataKeyPrefix = $ | |
147 | + | let $t044834578 = claimSquare(x, y, gen, ownerId, transactionId) | |
148 | + | let asset = $t044834578._1 | |
149 | + | let assetId = $t044834578._2 | |
150 | + | let assetUrl = $t044834578._3 | |
151 | + | let dataKeyPrefix = $t044834578._4 | |
148 | 152 | [asset, StringEntry((dataKeyPrefix + "_assetId"), toBase58String(assetId)), StringEntry((dataKeyPrefix + "_asset"), assetUrl), StringEntry((dataKeyPrefix + "_owner"), ownerId), StringEntry(transactionId, dataKeyPrefix), ScriptTransfer(Address(fromBase58String(ownerId)), 1, assetId)] | |
149 | 153 | } | |
150 | 154 | } | |
151 | 155 | ||
152 | 156 | ||
153 | 157 | ||
154 | 158 | @Callable(i) | |
155 | 159 | func putForSale (assetId,amount) = { | |
156 | 160 | let callerId = toBase58String(i.caller.bytes) | |
157 | 161 | let assetData = match assetInfo(fromBase58String(assetId)) { | |
158 | 162 | case ass: Asset => | |
159 | 163 | ass | |
160 | 164 | case _ => | |
161 | 165 | throw("Asset not found") | |
162 | 166 | } | |
163 | 167 | let dataPrefix = getDataKeyPrefixFromAssetName(assetData.name) | |
164 | 168 | let ownerId = match getString(this, (dataPrefix + "_owner")) { | |
165 | 169 | case s: String => | |
166 | 170 | s | |
167 | 171 | case _ => | |
168 | 172 | throw("Owner not found in data") | |
169 | 173 | } | |
170 | 174 | if ((minForSaleWavlets > amount)) | |
171 | 175 | then throw("Amount needs to be more than 1 wave") | |
172 | 176 | else if (if ((callerId != ownerId)) | |
173 | 177 | then (callerId != holdings) | |
174 | 178 | else false) | |
175 | 179 | then throw("You are not able to put this asset up for sale") | |
176 | 180 | else { | |
177 | 181 | let res = invoke(holdingsAddress, addOwnerAndAmountFunc, [callerId, assetId, amount], [AttachedPayment(unit, 0)]) | |
178 | 182 | if ((res == res)) | |
179 | 183 | then [ScriptTransfer(holdingsAddress, 1, fromBase58String(assetId))] | |
180 | 184 | else throw("Strict value is not equal to itself.") | |
181 | 185 | } | |
182 | 186 | } | |
183 | 187 | ||
184 | 188 | ||
185 | 189 | @Verifier(tx) | |
186 | - | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
190 | + | func verify () = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
187 | 191 | then true | |
188 | - | else (addressFromPublicKey(tx.senderPublicKey) == holdingsAddress) | |
192 | + | else (addressFromPublicKey(tx.senderPublicKey) == holdingsAddress)) | |
193 | + | then true | |
194 | + | else (addressFromPublicKey(tx.senderPublicKey) == dappAddress) | |
189 | 195 |
github/deemru/w8io/169f3d6 52.87 ms ◑