tx · DUrkjHgNWa6UYaGhDEQP5wqLqirXqB85yVpv4EPG8GWt 3N8M5hmS83tTxWiFc738YLtnFHtQmmpquSJ: -0.09000000 Waves 2022.02.09 15:13 [1916076] smart account 3N8M5hmS83tTxWiFc738YLtnFHtQmmpquSJ > SELF 0.00000000 Waves
{ "type": 13, "id": "DUrkjHgNWa6UYaGhDEQP5wqLqirXqB85yVpv4EPG8GWt", "fee": 9000000, "feeAssetId": null, "timestamp": 1644408847650, "version": 2, "chainId": 84, "sender": "3N8M5hmS83tTxWiFc738YLtnFHtQmmpquSJ", "senderPublicKey": "6G5qWw1mAguK2uYzgz1Xk6W1TmhQwrnVqDAhb8r6fGsM", "proofs": [ "zLfGUfaoDcDQzAbGErm5AQhGHsMpmK6pj6sZGhkUooeukVNQ38QjZArk9QVbRLNAEVGucbTf13j2UPt2KgENKsy" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAALAAAAAAt1c2RuQXNzZXRJZAEAAAAgENHLOpYG/Rtp7e9E9sMPM++iNSbiC23RRFi4KglwgZAAAAAACHByaWNlTkZUAAAAAAAF9eEAAAAAAAxTaGFya1N0YXJ0ZWQCAAAADVNIQVJLX1NUQVJURUQAAAAADVNoYXJrRmluaXNoZWQCAAAADlNIQVJLX0ZJTklTSEVEAQAAAAhpc1N0b3BlZAAAAAAEAAAADGFkbWluQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVPi9jq6+5IZPfWLZhf8Y2fIoCokcxov7MwQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAxhZG1pbkFkZHJlc3MCAAAACmdhbWVzdG9wZWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQ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wkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5rO0Oqw==", "height": 1916076, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9XNtXsgm53RfTJttXamTEarCQ4gSVwvib2a81JXPJNW9 Next: E9kEvSbw1aA1hpcxXnXWMz1TXntqBTTAJ8vL7AVVQDoq Diff:
Old | New | Differences | |
---|---|---|---|
90 | 90 | if ((getPayment.assetId != usdnAssetId)) | |
91 | 91 | then throw(("You can attach only USD-N tokens with the following asset id: " + toBase58String(usdnAssetId))) | |
92 | 92 | else if ((priceNFT > getPayment.amount)) | |
93 | - | then throw | |
93 | + | then throw("To buy a NFT you currently need the following amount of 100 USD-N.") | |
94 | 94 | else { | |
95 | 95 | let totalSharksAmount = tryGetInteger("sharks_amount") | |
96 | 96 | [StringEntry(getHeightStatusKey(toString(i.originCaller), i.transactionId), SharkStarted), IntegerEntry(getFinishHeightKey(toString(i.originCaller), i.transactionId), (height + 5)), IntegerEntry("sharks_amount", (totalSharksAmount + 1))] | |
107 | 107 | let HSKeyStatus = getStringValue(this, getHSKey) | |
108 | 108 | let FHKeyNumber = getIntegerValue(this, getFHKey) | |
109 | 109 | if ((HSKeyStatus == SharkFinished)) | |
110 | - | then { | |
111 | - | let sharkId = getStringValue(this, getSharkIdKey(toString(i.caller), txId)) | |
112 | - | throw(("The Shark was claimed already, here is nftid: " + sharkId)) | |
113 | - | } | |
110 | + | then throw("The Shark was claimed already, here is nftid: ") | |
114 | 111 | else if ((FHKeyNumber > height)) | |
115 | 112 | then throw((((("Your Shark is not ready, wait " + toString((FHKeyNumber - height))) + " blocks, it will take around ") + toString((FHKeyNumber - height))) + " minutes")) | |
116 | 113 | else { | |
117 | - | let sharkId = getStringValue(this, getSharkIdKey(toString(i.caller), txId)) | |
118 | 114 | let sharkGen = getRandomName(txId, FHKeyNumber) | |
119 | 115 | let description = (("{\"genotype\": \"" + sharkGen) + "\", \"crossbreeding\": true}") | |
120 | 116 | let asset = Issue(sharkGen, description, 1, 0, false, unit, FHKeyNumber) | |
121 | 117 | let assetId = calculateAssetId(asset) | |
122 | 118 | let sharkCount = (tryGetInteger("sharks_amount") + 1) | |
123 | - | [StringEntry(getHSKey, SharkFinished | |
119 | + | [StringEntry(getHSKey, SharkFinished), asset, ScriptTransfer(i.caller, 1, assetId)] | |
124 | 120 | } | |
125 | 121 | } | |
126 | 122 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let usdnAssetId = base58'28f4pkm3PbgXaxkyNyZcUcA1XNKPfZaw95JfRxDvEV9y' | |
5 | 5 | ||
6 | 6 | let priceNFT = 100000000 | |
7 | 7 | ||
8 | 8 | let SharkStarted = "SHARK_STARTED" | |
9 | 9 | ||
10 | 10 | let SharkFinished = "SHARK_FINISHED" | |
11 | 11 | ||
12 | 12 | func isStoped () = { | |
13 | 13 | let adminAddress = Address(base58'3NCbJSAqFdLNGCfw8tQmaTuKPdesTtEc1oY') | |
14 | 14 | match getInteger(adminAddress, "gamestoped") { | |
15 | 15 | case b: Int => | |
16 | 16 | b | |
17 | 17 | case _ => | |
18 | 18 | 0 | |
19 | 19 | } | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func tryGetInteger (key) = { | |
24 | 24 | let val = match getInteger(this, key) { | |
25 | 25 | case b: Int => | |
26 | 26 | b | |
27 | 27 | case _ => | |
28 | 28 | 0 | |
29 | 29 | } | |
30 | 30 | val | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func getSharkIdKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_idk") | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = { | |
38 | 38 | let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1))) | |
39 | 39 | let randomHash = sha256((txId + value(randomSeedBlock.vrf))) | |
40 | 40 | (toInt(randomHash, (offset * 8)) % variants) | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getFinishHeightKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_fhk") | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func getHeightStatusKey (address,txId) = (((address + "_") + toBase58String(txId)) + "_status") | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func getRandomName (txId,FinishHeight) = { | |
51 | 51 | let nameRandom = getRandomNumber(600, txId, FinishHeight, 0) | |
52 | 52 | let colorRandom = getRandomNumber(6, txId, FinishHeight, 0) | |
53 | 53 | let typeRandom = toString(getRandomNumber(6, txId, FinishHeight, 0)) | |
54 | 54 | let color = if ((colorRandom == 0)) | |
55 | 55 | then "Y" | |
56 | 56 | else if ((colorRandom == 1)) | |
57 | 57 | then "R" | |
58 | 58 | else if ((colorRandom == 2)) | |
59 | 59 | then "B" | |
60 | 60 | else if ((colorRandom == 3)) | |
61 | 61 | then "G" | |
62 | 62 | else if ((colorRandom == 4)) | |
63 | 63 | then "W" | |
64 | 64 | else "B" | |
65 | 65 | if ((99 > nameRandom)) | |
66 | 66 | then ((("SHARK-BILLY-" + typeRandom) + "-") + color) | |
67 | 67 | else if (if ((nameRandom >= 100)) | |
68 | 68 | then (nameRandom >= 199) | |
69 | 69 | else false) | |
70 | 70 | then ((("SHARK-JIMMY-" + typeRandom) + "-") + color) | |
71 | 71 | else if (if ((nameRandom >= 200)) | |
72 | 72 | then (nameRandom >= 299) | |
73 | 73 | else false) | |
74 | 74 | then ((("SHARK-ABOBO-" + typeRandom) + "-") + color) | |
75 | 75 | else if (if ((nameRandom >= 300)) | |
76 | 76 | then (nameRandom >= 399) | |
77 | 77 | else false) | |
78 | 78 | then ((("SHARK-WILLY-" + typeRandom) + "-") + color) | |
79 | 79 | else if (if ((nameRandom >= 400)) | |
80 | 80 | then (nameRandom >= 499) | |
81 | 81 | else false) | |
82 | 82 | then ((("SHARK-EDDIE-" + typeRandom) + "-") + color) | |
83 | 83 | else ((("SHARK-DUKIE-" + typeRandom) + "-") + color) | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | @Callable(i) | |
88 | 88 | func buyNft () = { | |
89 | 89 | let getPayment = value(i.payments[0]) | |
90 | 90 | if ((getPayment.assetId != usdnAssetId)) | |
91 | 91 | then throw(("You can attach only USD-N tokens with the following asset id: " + toBase58String(usdnAssetId))) | |
92 | 92 | else if ((priceNFT > getPayment.amount)) | |
93 | - | then throw | |
93 | + | then throw("To buy a NFT you currently need the following amount of 100 USD-N.") | |
94 | 94 | else { | |
95 | 95 | let totalSharksAmount = tryGetInteger("sharks_amount") | |
96 | 96 | [StringEntry(getHeightStatusKey(toString(i.originCaller), i.transactionId), SharkStarted), IntegerEntry(getFinishHeightKey(toString(i.originCaller), i.transactionId), (height + 5)), IntegerEntry("sharks_amount", (totalSharksAmount + 1))] | |
97 | 97 | } | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | ||
102 | 102 | @Callable(i) | |
103 | 103 | func claimNft (txIdStr) = { | |
104 | 104 | let txId = fromBase58String(txIdStr) | |
105 | 105 | let getHSKey = getHeightStatusKey(toString(i.caller), txId) | |
106 | 106 | let getFHKey = getFinishHeightKey(toString(i.caller), txId) | |
107 | 107 | let HSKeyStatus = getStringValue(this, getHSKey) | |
108 | 108 | let FHKeyNumber = getIntegerValue(this, getFHKey) | |
109 | 109 | if ((HSKeyStatus == SharkFinished)) | |
110 | - | then { | |
111 | - | let sharkId = getStringValue(this, getSharkIdKey(toString(i.caller), txId)) | |
112 | - | throw(("The Shark was claimed already, here is nftid: " + sharkId)) | |
113 | - | } | |
110 | + | then throw("The Shark was claimed already, here is nftid: ") | |
114 | 111 | else if ((FHKeyNumber > height)) | |
115 | 112 | then throw((((("Your Shark is not ready, wait " + toString((FHKeyNumber - height))) + " blocks, it will take around ") + toString((FHKeyNumber - height))) + " minutes")) | |
116 | 113 | else { | |
117 | - | let sharkId = getStringValue(this, getSharkIdKey(toString(i.caller), txId)) | |
118 | 114 | let sharkGen = getRandomName(txId, FHKeyNumber) | |
119 | 115 | let description = (("{\"genotype\": \"" + sharkGen) + "\", \"crossbreeding\": true}") | |
120 | 116 | let asset = Issue(sharkGen, description, 1, 0, false, unit, FHKeyNumber) | |
121 | 117 | let assetId = calculateAssetId(asset) | |
122 | 118 | let sharkCount = (tryGetInteger("sharks_amount") + 1) | |
123 | - | [StringEntry(getHSKey, SharkFinished | |
119 | + | [StringEntry(getHSKey, SharkFinished), asset, ScriptTransfer(i.caller, 1, assetId)] | |
124 | 120 | } | |
125 | 121 | } | |
126 | 122 | ||
127 | 123 | ||
128 | 124 | @Verifier(tx) | |
129 | 125 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
130 | 126 |
github/deemru/w8io/169f3d6 40.77 ms ◑