tx · BWFf8oST9Bw67RZ37ChE2cLZd4Js5qNR4cQ2idL4zhQD 3MuocfPorcMAUnSc35WpLgUKFQJKm6RC55Z: -0.00900000 Waves 2022.07.06 21:25 [2128182] smart account 3MuocfPorcMAUnSc35WpLgUKFQJKm6RC55Z > SELF 0.00000000 Waves
{ "type": 13, "id": "BWFf8oST9Bw67RZ37ChE2cLZd4Js5qNR4cQ2idL4zhQD", "fee": 900000, "feeAssetId": null, "timestamp": 1657131950226, "version": 2, "chainId": 84, "sender": "3MuocfPorcMAUnSc35WpLgUKFQJKm6RC55Z", "senderPublicKey": "B9LahpBYmTXMH24nttq3q9Dss7BEyDSaC8UFgCCwRgsi", "proofs": [ "4YWVsfuPXunjwrvFdNQhxmDAgctHGfv76Gk9zt13PiZ9wQ3BiXiGprhtvN8vVpKf4Qu5dPoUX1vq1yehFvfLT1ph" ], "script": "base64:AAIFAAAAAAAAABQIAhIAEgMKAQgSBAoCCAgSAwoBCAAAABYAAAAAFG1vbnN0ZXJJc3N1ZXJBZGRyZXNzAQAAABoBVIddicTOcxXMJUtYHNA7AK2E9TG+vEIPYwAAAAAQbWF4Q2hpbGRzQ2FuSGF2ZQAAAAAAAAAAAAAAAAAQZGVsYXlGb3JCcmVlZGluZwAAAAAAAAAAAQAAAAAPQnJlZWRpbmdTdGFydGVkAgAAABBCUkVFRElOR19TVEFSVEVEAAAAABBCcmVlZGluZ0ZpbmlzaGVkAgAAABFCUkVFRElOR19GSU5JU0hFRAAAAAAEbnVsbAIAAAAEbnVsbAAAAAARdG90YWxCcmVlZGVkQ291bnQCAAAAEl90b3RhbEJyZWVkZWRDb3VudAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAg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AAB2Fzc2V0SWQFAAAAB2Fzc2V0SWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAlgAAAABBQAAAAdhc3NldElkCQACWAAAAAEFAAAAB2Fzc2V0SWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkCQACWAAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAKZGVsZXRlRGF0YQAAAAEAAAADa2V5AwkBAAAAAiE9AAAAAggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwgFAAAABHRoaXMAAAAFYnl0ZXMJAAACAAAAAQIAAAAZT25seSBPd25lciBIYXMgUGVybWlzc2lvbgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANrZXkFAAAAA25pbAAAAAC2myfF", "height": 2128182, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ai8emGQdLjv5i7HcbBdC4N7oumXUzkbtLHuCaycaYJNy Next: AokDQuauoTPV5gLRdmyZRByvoP6ewVtp1z2aVgZwXfqJ Diff:
Old | New | Differences | |
---|---|---|---|
152 | 152 | then { | |
153 | 153 | let parent1Id = getStringByKey(getMonsterParentKey(txId, 1)) | |
154 | 154 | let parent2Id = getStringByKey(getMonsterParentKey(txId, 2)) | |
155 | - | [StringEntry(processStatusKey, BreedingFinished), DeleteEntry((getProcessStatusKey(toString(i.caller), | |
155 | + | [StringEntry(processStatusKey, BreedingFinished), DeleteEntry((getProcessStatusKey(toString(i.caller), toBytes(txIdStr)) + BreedingStarted)), StringEntry((processStatusKey + BreedingFinished), txIdStr), StringEntry(monsterIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), monsterIdKey), StringEntry(toBase58String(assetId), toBase58String(assetId)), IntegerEntry(totalBreededCount, (getTotalBreededCount() + 1)), ScriptTransfer(i.caller, 1, assetId), ScriptTransfer(i.caller, 1, fromBase58String(parent1Id)), ScriptTransfer(i.caller, 1, fromBase58String(parent2Id))] | |
156 | 156 | } | |
157 | 157 | else throw("Strict value is not equal to itself.") | |
158 | 158 | } | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | + | ||
182 | + | @Callable(i) | |
183 | + | func deleteData (key) = if ((i.caller.bytes != this.bytes)) | |
184 | + | then throw("Only Owner Has Permission") | |
185 | + | else [DeleteEntry(key)] | |
186 | + | ||
187 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let monsterIssuerAddress = base58'3N2Fq3xoRamZ62SFkonL1kcSs9womjpF7KQ' | |
5 | 5 | ||
6 | 6 | let maxChildsCanHave = 0 | |
7 | 7 | ||
8 | 8 | let delayForBreeding = 1 | |
9 | 9 | ||
10 | 10 | let BreedingStarted = "BREEDING_STARTED" | |
11 | 11 | ||
12 | 12 | let BreedingFinished = "BREEDING_FINISHED" | |
13 | 13 | ||
14 | 14 | let null = "null" | |
15 | 15 | ||
16 | 16 | let totalBreededCount = "_totalBreededCount" | |
17 | 17 | ||
18 | 18 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func getTotalBreededCount () = valueOrElse(getInteger(this, totalBreededCount), 0) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func checkAssetInIssueDapp (assetId) = { | |
28 | 28 | let result1 = valueOrElse(getString(Address(monsterIssuerAddress), assetId), null) | |
29 | 29 | let result2 = valueOrElse(getString(this, assetId), null) | |
30 | 30 | if ((result1 != null)) | |
31 | 31 | then true | |
32 | 32 | else (result2 != null) | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func constructHaveMonsterChildrenKey (assetId) = { | |
37 | 37 | let constructedStr = (("asset_" + assetId) + "_children") | |
38 | 38 | constructedStr | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func canBeBreeded (asset1Id,asset2Id) = { | |
43 | 43 | let asset1Gen = split(value(assetInfo(asset1Id)).name, "") | |
44 | 44 | let asset2Gen = split(value(assetInfo(asset2Id)).name, "") | |
45 | 45 | true | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getMonsterParentKey (txId,parentNum) = ((("inittx_" + toBase58String(txId)) + "_parent") + toString(parentNum)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getProcessStatusKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_status_") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getProcessFinishHeightKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_fh") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getMonsterIdKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_di") | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = { | |
62 | 62 | let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1))) | |
63 | 63 | let randomHash = sha256_16Kb((txId + value(randomSeedBlock.vrf))) | |
64 | 64 | (toInt(randomHash, offset) % variants) | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func generateMonster (txId,breedingFinishHeight) = { | |
69 | 69 | let colorRandom = getRandomNumber(4, txId, breedingFinishHeight, 11) | |
70 | 70 | let color = if ((colorRandom == 0)) | |
71 | 71 | then "Y" | |
72 | 72 | else if ((colorRandom == 1)) | |
73 | 73 | then "G" | |
74 | 74 | else if ((colorRandom == 2)) | |
75 | 75 | then "B" | |
76 | 76 | else "R" | |
77 | 77 | let parent1Id = fromBase58String(getStringByKey(getMonsterParentKey(txId, 1))) | |
78 | 78 | let parent2Id = fromBase58String(getStringByKey(getMonsterParentKey(txId, 2))) | |
79 | 79 | let parent1Gen = split(value(assetInfo(parent1Id)).name, "") | |
80 | 80 | let parent2Gen = split(value(assetInfo(parent2Id)).name, "") | |
81 | 81 | let gen = ((((("MONSTER-" + color) + "-") + parent1Gen[2]) + "-") + parent2Gen[2]) | |
82 | 82 | gen | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getMonsterStatsKey (genString) = (("stats_" + genString) + "_amount") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getProcessTxStatus (processStatusKey) = valueOrElse(getString(this, processStatusKey), "") | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getProcessFinishHeight (finishHeightKey) = valueOrElse(getInteger(this, finishHeightKey), 0) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | @Callable(i) | |
96 | 96 | func startMonsterBreeding () = { | |
97 | 97 | let firstPayment = value(i.payments[0]) | |
98 | 98 | let secondPayment = value(i.payments[1]) | |
99 | 99 | let firstAssetId = toBase58String(value(firstPayment.assetId)) | |
100 | 100 | let secondAssetId = toBase58String(value(secondPayment.assetId)) | |
101 | 101 | if (if ((firstPayment.amount != 1)) | |
102 | 102 | then true | |
103 | 103 | else (secondPayment.amount != 1)) | |
104 | 104 | then throw("NFT is not attached") | |
105 | 105 | else if (!(if (checkAssetInIssueDapp(firstAssetId)) | |
106 | 106 | then checkAssetInIssueDapp(secondAssetId) | |
107 | 107 | else false)) | |
108 | 108 | then throw("You need to attach 2 valid NFT-monsters.") | |
109 | 109 | else if (if ((getNumberByKey(constructHaveMonsterChildrenKey(firstAssetId)) > maxChildsCanHave)) | |
110 | 110 | then true | |
111 | 111 | else (getNumberByKey(constructHaveMonsterChildrenKey(secondAssetId)) > maxChildsCanHave)) | |
112 | 112 | then throw("One monster can be used for breeding only once in its lifetime.") | |
113 | 113 | else { | |
114 | 114 | let breededStatus = canBeBreeded(fromBase58String(firstAssetId), fromBase58String(secondAssetId)) | |
115 | 115 | if (!(breededStatus)) | |
116 | 116 | then throw("These monsters cannot be breeded") | |
117 | 117 | else [IntegerEntry(constructHaveMonsterChildrenKey(firstAssetId), 1), IntegerEntry(constructHaveMonsterChildrenKey(secondAssetId), 1), StringEntry(getMonsterParentKey(i.transactionId, 1), firstAssetId), StringEntry(getMonsterParentKey(i.transactionId, 2), secondAssetId), StringEntry(getProcessStatusKey(toString(i.caller), i.transactionId), BreedingStarted), StringEntry((getProcessStatusKey(toString(i.caller), i.transactionId) + BreedingStarted), toBase58String(i.transactionId)), IntegerEntry(getProcessFinishHeightKey(toString(i.caller), i.transactionId), (height + delayForBreeding))] | |
118 | 118 | } | |
119 | 119 | } | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(i) | |
124 | 124 | func finishMonsterBreeding (txIdStr) = { | |
125 | 125 | let txId = fromBase58String(txIdStr) | |
126 | 126 | let processStatusKey = getProcessStatusKey(toString(i.caller), txId) | |
127 | 127 | let finishHeightKey = getProcessFinishHeightKey(toString(i.caller), txId) | |
128 | 128 | let monsterIdKey = getMonsterIdKey(toString(i.caller), txId) | |
129 | 129 | let processTxStatus = getProcessTxStatus(processStatusKey) | |
130 | 130 | let processFinishHeight = getProcessFinishHeight(finishHeightKey) | |
131 | 131 | if ((processTxStatus == BreedingFinished)) | |
132 | 132 | then { | |
133 | 133 | let monsterId = getStringValue(this, getMonsterIdKey(toString(i.caller), txId)) | |
134 | 134 | throw(("The monster was breeded and claimed already, here is the folowing: " + monsterId)) | |
135 | 135 | } | |
136 | 136 | else if ((processTxStatus == "")) | |
137 | 137 | then throw("You havent monsters to claim") | |
138 | 138 | else if ((processFinishHeight > height)) | |
139 | 139 | then throw((((("Breeding is not finished yet " + toString((processFinishHeight - height))) + " blocks remaining, it will take around ") + toString((processFinishHeight - height))) + " minutes")) | |
140 | 140 | else { | |
141 | 141 | let monsterGen = generateMonster(txId, processFinishHeight) | |
142 | 142 | let description = (("{\"genotype\": \"" + monsterGen) + "\", \"crossbreeding\": true}") | |
143 | 143 | let nftImageLink = (("https://ipfs.io/ipfs/bafybeidwsupz24ozr244breub5obhl5dxh22xr3wu7xumm4mlf7tgmocvi/" + monsterGen) + ".png") | |
144 | 144 | let collectionName = "artefacts" | |
145 | 145 | let assetId = match invoke(Address(monsterIssuerAddress), "createNFT", [monsterGen, description, nftImageLink, collectionName], nil) { | |
146 | 146 | case x: String => | |
147 | 147 | fromBase58String(x) | |
148 | 148 | case _ => | |
149 | 149 | throw("something went wrong during the creation of NFT") | |
150 | 150 | } | |
151 | 151 | if ((assetId == assetId)) | |
152 | 152 | then { | |
153 | 153 | let parent1Id = getStringByKey(getMonsterParentKey(txId, 1)) | |
154 | 154 | let parent2Id = getStringByKey(getMonsterParentKey(txId, 2)) | |
155 | - | [StringEntry(processStatusKey, BreedingFinished), DeleteEntry((getProcessStatusKey(toString(i.caller), | |
155 | + | [StringEntry(processStatusKey, BreedingFinished), DeleteEntry((getProcessStatusKey(toString(i.caller), toBytes(txIdStr)) + BreedingStarted)), StringEntry((processStatusKey + BreedingFinished), txIdStr), StringEntry(monsterIdKey, toBase58String(assetId)), StringEntry(toBase58String(assetId), monsterIdKey), StringEntry(toBase58String(assetId), toBase58String(assetId)), IntegerEntry(totalBreededCount, (getTotalBreededCount() + 1)), ScriptTransfer(i.caller, 1, assetId), ScriptTransfer(i.caller, 1, fromBase58String(parent1Id)), ScriptTransfer(i.caller, 1, fromBase58String(parent2Id))] | |
156 | 156 | } | |
157 | 157 | else throw("Strict value is not equal to itself.") | |
158 | 158 | } | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | ||
163 | 163 | @Callable(i) | |
164 | 164 | func issueNFTs (name,description) = if ((i.caller.bytes != this.bytes)) | |
165 | 165 | then throw("Only Owner Has Permission") | |
166 | 166 | else { | |
167 | 167 | let nftImageLink = "https://ipfs.io/ipfs/bafybeidwsupz24ozr244breub5obhl5dxh22xr3wu7xumm4mlf7tgmocvi/display.png" | |
168 | 168 | let collectionName = "artefacts" | |
169 | 169 | let assetId = match invoke(Address(monsterIssuerAddress), "createNFT", [name, description, nftImageLink, collectionName], nil) { | |
170 | 170 | case x: String => | |
171 | 171 | fromBase58String(x) | |
172 | 172 | case _ => | |
173 | 173 | throw("something went wrong during the creation of NFT") | |
174 | 174 | } | |
175 | 175 | if ((assetId == assetId)) | |
176 | 176 | then [StringEntry(toBase58String(assetId), toBase58String(assetId)), StringEntry(toBase58String(i.transactionId), toBase58String(assetId))] | |
177 | 177 | else throw("Strict value is not equal to itself.") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | + | ||
182 | + | @Callable(i) | |
183 | + | func deleteData (key) = if ((i.caller.bytes != this.bytes)) | |
184 | + | then throw("Only Owner Has Permission") | |
185 | + | else [DeleteEntry(key)] | |
186 | + | ||
187 | + |
github/deemru/w8io/026f985 43.54 ms ◑