tx · 8MZGp22nUjvx6n714hBk1cWVWQGa4VUcrC4EzUSo1Mf5

3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ:  -0.01400000 Waves

2022.05.17 11:29 [2055427] smart account 3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ > SELF 0.00000000 Waves

{ "type": 13, "id": "8MZGp22nUjvx6n714hBk1cWVWQGa4VUcrC4EzUSo1Mf5", "fee": 1400000, "feeAssetId": null, "timestamp": 1652776254595, "version": 2, "chainId": 84, "sender": "3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ", "senderPublicKey": "ApEZSyUFWsckB3mZSWm3spfm6UPyDhMdrpxNhydohYs1", "proofs": [ "5VKQ89dwUz4WVEMJ5hhwt33H5NhnC9nbo45xMefZ7NSkuJQ8yTCsbfUUp4aQJqVqMjGKXZhjLNLJEn3QBCXdFJMh" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAGAAAAAAJc2VwYXJhdG9yAgAAAAFfAAAAAA1rZXlDaGFyc0NvdW50AgAAAAtjaGFyc19jb3VudAAAAAAHa2V5Q2hhcgIAAAAEY2hhcgAAAAAIa2V5T3duZXICAAAABW93bmVyAAAAAA1rZXlBcHBlYXJhbmNlAgAAAAphcHBlYXJhbmNlAAAAAAxrZXlQeXJvQm9udXMCAAAACnB5cm9fYm9udXMAAAAADGtleUFxdWFCb251cwIAAAAKYXF1YV9ib251cwAAAAANa2V5VGVycmFCb251cwIAAAALdGVycmFfYm9udXMAAAAADGtleUFlcm9Cb251cwIAAAAKYWVyb19ib251cwAAAAANa2V5TG9vdHNCb251cwIAAAALbG9vdHNfYm9udXMAAAAAEmtleUdlbmVyYXRpbmdCb251cwIAAAAQZ2VuZXJhdGluZ19ib251cwAAAAAHZ292QWRkcgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAAAAAAABVrZXlFY29zeXN0ZW1BZGRyZXNzZXMCAAAAE2Vjb3N5c3RlbV9hZGRyZXNzZXMAAAA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ggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleaYncXc=", "height": 2055427, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H5J3SdK7ZxBFoNhQrnWXSDkDQnjdJjv2DSLxTzgDCck Next: EGEY7MorPigufbjdzziLJUuHEA74EtqTyHJsdveZuWXA Diff:
OldNewDifferences
4444 func invokChecks (callerAddr) = if ((isDataStorageUntouched(govAddr) != false))
4545 then throw("Governing app not ready")
4646 else {
47- let ecosystemAddresses = getStringValue(govAddr, keyEcosystemAddresses)
47+ let ecosystemAddresses = valueOrErrorMessage(getString(govAddr, keyEcosystemAddresses), "ARRRRGHHH")
4848 if ((contains(ecosystemAddresses, toString(callerAddr)) != false))
4949 then throw("Access denied")
5050 else unit
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "_"
55
66 let keyCharsCount = "chars_count"
77
88 let keyChar = "char"
99
1010 let keyOwner = "owner"
1111
1212 let keyAppearance = "appearance"
1313
1414 let keyPyroBonus = "pyro_bonus"
1515
1616 let keyAquaBonus = "aqua_bonus"
1717
1818 let keyTerraBonus = "terra_bonus"
1919
2020 let keyAeroBonus = "aero_bonus"
2121
2222 let keyLootsBonus = "loots_bonus"
2323
2424 let keyGeneratingBonus = "generating_bonus"
2525
2626 let govAddr = addressFromStringValue("")
2727
2828 let keyEcosystemAddresses = "ecosystem_addresses"
2929
3030 let keyCharsBodiesAmount = "chars_bodies_amount"
3131
3232 let keyCharsEyesAmount = "chars_eyes_amount"
3333
3434 let keyCharsMouthsAmount = "chars_mouths_amount"
3535
3636 let keyCharsStatsTiersRanges = "chars_stats_tiers_ranges"
3737
3838 let keyCharsNaturalElemBonusRanges = "chars_natural_elem_bonus_ranges"
3939
4040 let keyCharsNaturalLootsBonusRanges = "chars_natural_loots_bonus_ranges"
4141
4242 let keyCharsNaturalGeneratingBonusRanges = "chars_natural_generating_bonus_ranges"
4343
4444 func invokChecks (callerAddr) = if ((isDataStorageUntouched(govAddr) != false))
4545 then throw("Governing app not ready")
4646 else {
47- let ecosystemAddresses = getStringValue(govAddr, keyEcosystemAddresses)
47+ let ecosystemAddresses = valueOrErrorMessage(getString(govAddr, keyEcosystemAddresses), "ARRRRGHHH")
4848 if ((contains(ecosystemAddresses, toString(callerAddr)) != false))
4949 then throw("Access denied")
5050 else unit
5151 }
5252
5353
5454 func randInt (min,max,txId,nonce) = {
5555 let hash = value(sha256_16Kb((value(value(blockInfoByHeight(height)).vrf) + txId)))
5656 value(((value(toInt(hash, nonce)) % ((max - min) + 1)) + min))
5757 }
5858
5959
6060 func cWith (a,b) = ((((keyChar + separator) + toString(b)) + separator) + a)
6161
6262
6363 func getRandomBonus (statsTierRanges,bonusRanges,startingNonce,txId) = {
6464 let sT1 = parseIntValue(statsTierRanges[0])
6565 let sT2 = parseIntValue(statsTierRanges[1])
6666 let sT3 = parseIntValue(statsTierRanges[2])
6767 let sT4 = parseIntValue(statsTierRanges[3])
6868 let sT5 = parseIntValue(statsTierRanges[4])
6969 let sT6 = parseIntValue(statsTierRanges[5])
7070 let bT1 = parseIntValue(bonusRanges[0])
7171 let bT2 = parseIntValue(bonusRanges[1])
7272 let bT3 = parseIntValue(bonusRanges[2])
7373 let bT4 = parseIntValue(bonusRanges[3])
7474 let bT5 = parseIntValue(bonusRanges[4])
7575 let bT6 = parseIntValue(bonusRanges[5])
7676 let tierResult = randInt(0, 10000, txId, startingNonce)
7777 if (if ((tierResult >= 0))
7878 then (sT1 >= tierResult)
7979 else false)
8080 then randInt(0, bT1, txId, (startingNonce + 1))
8181 else if (if ((tierResult > sT1))
8282 then (sT2 >= tierResult)
8383 else false)
8484 then randInt((bT1 + 1), bT2, txId, (startingNonce + 2))
8585 else if (if ((tierResult > sT2))
8686 then (sT3 >= tierResult)
8787 else false)
8888 then randInt((bT2 + 1), bT3, txId, (startingNonce + 3))
8989 else if (if ((tierResult > sT3))
9090 then (sT4 >= tierResult)
9191 else false)
9292 then randInt((bT3 + 1), bT4, txId, (startingNonce + 4))
9393 else if (if ((tierResult > sT4))
9494 then (sT5 >= tierResult)
9595 else false)
9696 then randInt((bT4 + 1), bT5, txId, (startingNonce + 5))
9797 else if (if ((tierResult > sT5))
9898 then (sT6 >= tierResult)
9999 else false)
100100 then randInt((bT5 + 1), bT6, txId, (startingNonce + 6))
101101 else throw("Unexpected error")
102102 }
103103
104104
105105 @Callable(i)
106106 func createChar () = valueOrElse(invokChecks(i.caller), {
107107 let txId = i.transactionId
108108 let callerAddr = toBase58String(i.caller.bytes)
109109 let charId = valueOrElse(getInteger(this, keyCharsCount), 1)
110110 let bodiesAmount = getIntegerValue(govAddr, keyCharsBodiesAmount)
111111 let eyesAmount = getIntegerValue(govAddr, keyCharsEyesAmount)
112112 let mouthsAmount = getIntegerValue(govAddr, keyCharsMouthsAmount)
113113 let statsTiersRanges = split(getStringValue(govAddr, keyCharsStatsTiersRanges), separator)
114114 let elemBonusRanges = split(getStringValue(govAddr, keyCharsNaturalElemBonusRanges), separator)
115115 let lootsBonusRanges = split(getStringValue(govAddr, keyCharsNaturalLootsBonusRanges), separator)
116116 let generatingBonusRanges = split(getStringValue(govAddr, keyCharsNaturalGeneratingBonusRanges), separator)
117117 let appearance = makeString([toString(randInt(1, bodiesAmount, txId, 0)), toString(randInt(1, eyesAmount, txId, 1)), toString(randInt(1, mouthsAmount, txId, 2))], separator)
118118 let pyroBonus = getRandomBonus(statsTiersRanges, elemBonusRanges, 3, txId)
119119 let aquaBonus = getRandomBonus(statsTiersRanges, elemBonusRanges, 10, txId)
120120 let terraBonus = getRandomBonus(statsTiersRanges, elemBonusRanges, 17, txId)
121121 let aeroBonus = getRandomBonus(statsTiersRanges, elemBonusRanges, 24, txId)
122122 let generatingBonus = getRandomBonus(statsTiersRanges, generatingBonusRanges, 31, txId)
123123 let lootsBonus = getRandomBonus(statsTiersRanges, lootsBonusRanges, 38, txId)
124124 [StringEntry(cWith(keyOwner, charId), callerAddr), StringEntry(cWith(keyAppearance, charId), appearance), IntegerEntry(cWith(keyPyroBonus, charId), pyroBonus), IntegerEntry(cWith(keyAquaBonus, charId), aquaBonus), IntegerEntry(cWith(keyTerraBonus, charId), terraBonus), IntegerEntry(cWith(keyAeroBonus, charId), aeroBonus), IntegerEntry(cWith(keyLootsBonus, charId), lootsBonus), IntegerEntry(cWith(keyGeneratingBonus, charId), generatingBonus)]
125125 })
126126
127127
128128 @Verifier(tx)
129129 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
130130

github/deemru/w8io/169f3d6 
46.77 ms