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