tx · EXwNpFyQTMEuMj5jXgaWK39M2TgcavB8UCLZmGcD4mxU 3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ: -0.01400000 Waves 2022.05.23 17:15 [2064434] smart account 3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ > SELF 0.00000000 Waves
{ "type": 13, "id": "EXwNpFyQTMEuMj5jXgaWK39M2TgcavB8UCLZmGcD4mxU", "fee": 1400000, "feeAssetId": null, "timestamp": 1653315357938, "version": 2, "chainId": 84, "sender": "3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ", "senderPublicKey": "ApEZSyUFWsckB3mZSWm3spfm6UPyDhMdrpxNhydohYs1", "proofs": [ "531YCJC9oks1cWd8nswUW9tTbDV7KVL8yhSw3vyFMVj7z1DiXyAgr8JijpShYFwBECJPvkbxaHZTYxyhsvJsdBPC" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAATAAAAAAJc2VwYXJhdG9yAgAAAAFfAAAAAAZnb3ZBcHAJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNeXhmd3ZidWVVQnluWUhmUXN1dE5YWk5xTm96R2lNbnNHAAAAAAhjaGFyc0FwcAkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM05BM0xSU2lnazZrbkxaMTZ1VHpjZExOb3cyRVFadFhUYUoAAAAACGxhbmRzQXBwCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXhpSkxyWTZRYTViU1l4eFNGSFNHNWJWVjJuNTl4MU1HbgAAAAAKYmF0dGxlc0FwcAkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM011SDlOZ3BvR2FTUXVmRVFMUFJpa1hOUzlQWGhraGNMenAAAAAAFWtleUVjb3N5c3RlbUFkZHJlc3NlcwIAAAATZWNvc3lzdGVtX2FkZHJlc3NlcwAAAAAKa2V5VG9rZW5JZAIAAAAIdG9rZW5faWQAAAAAFGtleVRva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AAAZjaGFySWQFAAAADG5hdFB5cm9Cb251cwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkBAAAABHdpdGgAAAACBQAAABNrZXlOYXR1cmFsQXF1YUJvbnVzBQAAAAZjaGFySWQFAAAADG5hdEFxdWFCb251cwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkBAAAABHdpdGgAAAACBQAAABRrZXlOYXR1cmFsVGVycmFCb251cwUAAAAGY2hhcklkBQAAAA1uYXRUZXJyYUJvbnVzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAEd2l0aAAAAAIFAAAAE2tleU5hdHVyYWxBZXJvQm9udXMFAAAABmNoYXJJZAUAAAAMbmF0QWVyb0JvbnVzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAEd2l0aAAAAAIFAAAAFWtleU5hdHVyYWxCYXR0bGVCb251cwUAAAAGY2hhcklkBQAAAA5uYXRCYXR0bGVCb251cwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkBAAAABHdpdGgAAAACBQAAABlrZXlOYXR1cmFsR2VuZXJhdGluZ0JvbnVzBQAAAAZjaGFySWQFAAAAEm5hdEdlbmVyYXRpbmdCb251cwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAANa2V5Q2hhcnNDb3VudAkAAGQAAAACBQAAAAZjaGFySWQAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V53U0+zg==", "height": 2064434, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EH6F1nYWZQHZZXjnwRsM9abBC79iw7zqgFtdv48bLezg Next: F8T3oZf5rg8yhCFrpxmCddnhUKogcYZ5Njw2ywvTszpw Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "_" | |
5 | + | ||
6 | + | let govApp = addressFromStringValue("3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG") | |
7 | + | ||
8 | + | let charsApp = addressFromStringValue("3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ") | |
9 | + | ||
10 | + | let landsApp = addressFromStringValue("3MxiJLrY6Qa5bSYxxSFHSG5bVV2n59x1MGn") | |
11 | + | ||
12 | + | let battlesApp = addressFromStringValue("3MuH9NgpoGaSQufEQLPRikXNS9PXhkhcLzp") | |
13 | + | ||
14 | + | let keyEcosystemAddresses = "ecosystem_addresses" | |
15 | + | ||
16 | + | let keyTokenId = "token_id" | |
17 | + | ||
18 | + | let keyTokenEmissionRate = "token_emission_rate" | |
19 | + | ||
20 | + | let keyTokenGenerated = "token_generated" | |
21 | + | ||
22 | + | let keyTokenGeneratedLastUpdate = "token_generated_last_update" | |
23 | + | ||
24 | + | let keyCharsBodyAmount = "chars_body_amount" | |
25 | + | ||
26 | + | let keyCharsEyesAmount = "chars_eyes_amount" | |
27 | + | ||
28 | + | let keyCharsMouthAmount = "chars_mouth_amount" | |
29 | + | ||
30 | + | let keyCharsStatsTiersRanges = "chars_stats_tiers_ranges" | |
31 | + | ||
32 | + | let keyCharsNaturalElemBonusRanges = "chars_natural_elem_bonus_ranges" | |
33 | + | ||
34 | + | let keyCharsNaturalBattleBonusRanges = "chars_natural_battle_bonus_ranges" | |
35 | + | ||
36 | + | let keyCharsNaturalGeneratingBonusRanges = "chars_natural_generating_bonus_ranges" | |
37 | + | ||
38 | + | let keyTotalLands = "total_lands" | |
39 | + | ||
40 | + | let keyBattleRestPeriod = "battle_rest_period" | |
41 | + | ||
42 | + | let keyBattleWinChanceHardcap = "battle_win_chance_hardcap" | |
43 | + | ||
44 | + | let keyBattleWinChanceIncrPerBlock = "battle_win_chance_incr_per_block" | |
45 | + | ||
46 | + | let keyBattleLootRarityRanges = "battle_loot_rarity_ranges" | |
47 | + | ||
48 | + | let keyItemsCategories = "items_categories" | |
49 | + | ||
50 | + | let keyItemsTypesPerCat = "items_types_per_cat" | |
51 | + | ||
52 | + | let keyItemsEffectsAmount = "items_effects_amount" | |
53 | + | ||
54 | + | let keyitemsEffectsMaxRanges = "items_effects_max_range" | |
5 | 55 | ||
6 | 56 | let keyCharsCount = "chars_count" | |
7 | 57 | ||
21 | 71 | ||
22 | 72 | let keyNaturalGeneratingBonus = "natural_generating_bonus" | |
23 | 73 | ||
24 | - | let | |
74 | + | let keyCharCurrentLand = "char_current_land" | |
25 | 75 | ||
26 | - | let | |
76 | + | let keyLandPyroPower = "land_pyro_power" | |
27 | 77 | ||
28 | - | let | |
78 | + | let keyLandAquaPower = "land_aqua_power" | |
29 | 79 | ||
30 | - | let | |
80 | + | let keyLandTerraPower = "land_terra_power" | |
31 | 81 | ||
32 | - | let | |
82 | + | let keyLandAeroPower = "land_aero_power" | |
33 | 83 | ||
34 | - | let | |
84 | + | let keyCharTotalIncome = "char_total_income" | |
35 | 85 | ||
36 | - | let | |
86 | + | let keyAddressTotalIncome = "address_total_income" | |
37 | 87 | ||
38 | - | let | |
88 | + | let keyCharPyroPower = "char_pyro_power" | |
39 | 89 | ||
40 | - | let keyCharsNaturalGeneratingBonusRanges = "chars_natural_generating_bonus_ranges" | |
90 | + | let keyCharAquaPower = "char_aqua_power" | |
91 | + | ||
92 | + | let keyCharTerraPower = "char_terra_power" | |
93 | + | ||
94 | + | let keyCharAeroPower = "char_aero_power" | |
95 | + | ||
96 | + | let keyCharInitialPyroShares = "char_initial_pyro_shares" | |
97 | + | ||
98 | + | let keyCharInitialAquaShares = "char_initial_aqua_shares" | |
99 | + | ||
100 | + | let keyCharInitialTerraShares = "char_initial_terra_shares" | |
101 | + | ||
102 | + | let keyCharInitialAeroShares = "char_initial_aero_shares" | |
103 | + | ||
104 | + | let keyCharInitialLandPyroGrantedTokens = "char_initial_land_pyro_granted_tokens" | |
105 | + | ||
106 | + | let keyCharInitialLandAquaGrantedTokens = "char_initial_land_aqua_granted_tokens" | |
107 | + | ||
108 | + | let keyCharInitialLandTerraGrantedTokens = "char_initial_land_terra_granted_tokens" | |
109 | + | ||
110 | + | let keyCharInitialLandAeroGrantedTokens = "char_initial_land_aero_granted_tokens" | |
111 | + | ||
112 | + | let keyLandLastTokenDistributionUpdate = "land_mast_token_distribution_update" | |
113 | + | ||
114 | + | let keyLandPyroTotalGrantedTokens = "land_pyro_total_granted_tokens" | |
115 | + | ||
116 | + | let keyLandAquaTotalGrantedTokens = "land_aqua_total_granted_tokens" | |
117 | + | ||
118 | + | let keyLandTerraTotalGrantedTokens = "land_terra_total_granted_tokens" | |
119 | + | ||
120 | + | let keyLandAeroTotalGrantedTokens = "land_aero_total_granted_tokens" | |
121 | + | ||
122 | + | let keyLastBattleHeight = "last_battle_height" | |
123 | + | ||
124 | + | let keyItemsCount = "items_count" | |
125 | + | ||
126 | + | let keyItemOwner = "item_owner" | |
127 | + | ||
128 | + | let keyItemCategory = "item_category" | |
129 | + | ||
130 | + | let keyItemType = "item_type" | |
131 | + | ||
132 | + | let keyItemEffects = "item_effects" | |
133 | + | ||
134 | + | let keyItemIsEquippedBy = "item_is_equipped_by" | |
135 | + | ||
136 | + | let keyCharWeapon = "char_weapon" | |
137 | + | ||
138 | + | let keyCharArmor = "char_armor" | |
139 | + | ||
140 | + | let keyCharJewel = "char_jewel" | |
141 | + | ||
142 | + | let keyItemEffectsValuesPerTypes = "item_effects_values_per_types" | |
41 | 143 | ||
42 | 144 | func invokeChecks (callerAddr) = if ((isDataStorageUntouched(govApp) != false)) | |
43 | 145 | then throw("Governing app not ready") | |
49 | 151 | } | |
50 | 152 | ||
51 | 153 | ||
52 | - | func with (a,b) = { | |
53 | - | let c = match b { | |
54 | - | case isInt: Int => | |
55 | - | toString(isInt) | |
56 | - | case isStr: String => | |
57 | - | isStr | |
58 | - | case _ => | |
59 | - | throw("Matching issue in with function") | |
60 | - | } | |
61 | - | ((c + separator) + a) | |
62 | - | } | |
154 | + | func ecosystemCheck (caller) = if ((contains(getStringValue(this, keyEcosystemAddresses), toBase58String(caller.bytes)) != true)) | |
155 | + | then throw("Access denied ") | |
156 | + | else true | |
157 | + | ||
158 | + | ||
159 | + | func with (a,b) = makeString([toString(b), a], separator) | |
160 | + | ||
161 | + | ||
162 | + | func withStr (a,b) = makeString([b, a], separator) | |
63 | 163 | ||
64 | 164 | ||
65 | 165 | func randInt (min,max,txId,nonce) = { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "_" | |
5 | + | ||
6 | + | let govApp = addressFromStringValue("3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG") | |
7 | + | ||
8 | + | let charsApp = addressFromStringValue("3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ") | |
9 | + | ||
10 | + | let landsApp = addressFromStringValue("3MxiJLrY6Qa5bSYxxSFHSG5bVV2n59x1MGn") | |
11 | + | ||
12 | + | let battlesApp = addressFromStringValue("3MuH9NgpoGaSQufEQLPRikXNS9PXhkhcLzp") | |
13 | + | ||
14 | + | let keyEcosystemAddresses = "ecosystem_addresses" | |
15 | + | ||
16 | + | let keyTokenId = "token_id" | |
17 | + | ||
18 | + | let keyTokenEmissionRate = "token_emission_rate" | |
19 | + | ||
20 | + | let keyTokenGenerated = "token_generated" | |
21 | + | ||
22 | + | let keyTokenGeneratedLastUpdate = "token_generated_last_update" | |
23 | + | ||
24 | + | let keyCharsBodyAmount = "chars_body_amount" | |
25 | + | ||
26 | + | let keyCharsEyesAmount = "chars_eyes_amount" | |
27 | + | ||
28 | + | let keyCharsMouthAmount = "chars_mouth_amount" | |
29 | + | ||
30 | + | let keyCharsStatsTiersRanges = "chars_stats_tiers_ranges" | |
31 | + | ||
32 | + | let keyCharsNaturalElemBonusRanges = "chars_natural_elem_bonus_ranges" | |
33 | + | ||
34 | + | let keyCharsNaturalBattleBonusRanges = "chars_natural_battle_bonus_ranges" | |
35 | + | ||
36 | + | let keyCharsNaturalGeneratingBonusRanges = "chars_natural_generating_bonus_ranges" | |
37 | + | ||
38 | + | let keyTotalLands = "total_lands" | |
39 | + | ||
40 | + | let keyBattleRestPeriod = "battle_rest_period" | |
41 | + | ||
42 | + | let keyBattleWinChanceHardcap = "battle_win_chance_hardcap" | |
43 | + | ||
44 | + | let keyBattleWinChanceIncrPerBlock = "battle_win_chance_incr_per_block" | |
45 | + | ||
46 | + | let keyBattleLootRarityRanges = "battle_loot_rarity_ranges" | |
47 | + | ||
48 | + | let keyItemsCategories = "items_categories" | |
49 | + | ||
50 | + | let keyItemsTypesPerCat = "items_types_per_cat" | |
51 | + | ||
52 | + | let keyItemsEffectsAmount = "items_effects_amount" | |
53 | + | ||
54 | + | let keyitemsEffectsMaxRanges = "items_effects_max_range" | |
5 | 55 | ||
6 | 56 | let keyCharsCount = "chars_count" | |
7 | 57 | ||
8 | 58 | let keyOwner = "owner" | |
9 | 59 | ||
10 | 60 | let keyAppearance = "appearance" | |
11 | 61 | ||
12 | 62 | let keyNaturalPyroBonus = "natural_pyro_bonus" | |
13 | 63 | ||
14 | 64 | let keyNaturalAquaBonus = "natural_aqua_bonus" | |
15 | 65 | ||
16 | 66 | let keyNaturalTerraBonus = "natural_terra_bonus" | |
17 | 67 | ||
18 | 68 | let keyNaturalAeroBonus = "natural_aero_bonus" | |
19 | 69 | ||
20 | 70 | let keyNaturalBattleBonus = "natural_battle_bonus" | |
21 | 71 | ||
22 | 72 | let keyNaturalGeneratingBonus = "natural_generating_bonus" | |
23 | 73 | ||
24 | - | let | |
74 | + | let keyCharCurrentLand = "char_current_land" | |
25 | 75 | ||
26 | - | let | |
76 | + | let keyLandPyroPower = "land_pyro_power" | |
27 | 77 | ||
28 | - | let | |
78 | + | let keyLandAquaPower = "land_aqua_power" | |
29 | 79 | ||
30 | - | let | |
80 | + | let keyLandTerraPower = "land_terra_power" | |
31 | 81 | ||
32 | - | let | |
82 | + | let keyLandAeroPower = "land_aero_power" | |
33 | 83 | ||
34 | - | let | |
84 | + | let keyCharTotalIncome = "char_total_income" | |
35 | 85 | ||
36 | - | let | |
86 | + | let keyAddressTotalIncome = "address_total_income" | |
37 | 87 | ||
38 | - | let | |
88 | + | let keyCharPyroPower = "char_pyro_power" | |
39 | 89 | ||
40 | - | let keyCharsNaturalGeneratingBonusRanges = "chars_natural_generating_bonus_ranges" | |
90 | + | let keyCharAquaPower = "char_aqua_power" | |
91 | + | ||
92 | + | let keyCharTerraPower = "char_terra_power" | |
93 | + | ||
94 | + | let keyCharAeroPower = "char_aero_power" | |
95 | + | ||
96 | + | let keyCharInitialPyroShares = "char_initial_pyro_shares" | |
97 | + | ||
98 | + | let keyCharInitialAquaShares = "char_initial_aqua_shares" | |
99 | + | ||
100 | + | let keyCharInitialTerraShares = "char_initial_terra_shares" | |
101 | + | ||
102 | + | let keyCharInitialAeroShares = "char_initial_aero_shares" | |
103 | + | ||
104 | + | let keyCharInitialLandPyroGrantedTokens = "char_initial_land_pyro_granted_tokens" | |
105 | + | ||
106 | + | let keyCharInitialLandAquaGrantedTokens = "char_initial_land_aqua_granted_tokens" | |
107 | + | ||
108 | + | let keyCharInitialLandTerraGrantedTokens = "char_initial_land_terra_granted_tokens" | |
109 | + | ||
110 | + | let keyCharInitialLandAeroGrantedTokens = "char_initial_land_aero_granted_tokens" | |
111 | + | ||
112 | + | let keyLandLastTokenDistributionUpdate = "land_mast_token_distribution_update" | |
113 | + | ||
114 | + | let keyLandPyroTotalGrantedTokens = "land_pyro_total_granted_tokens" | |
115 | + | ||
116 | + | let keyLandAquaTotalGrantedTokens = "land_aqua_total_granted_tokens" | |
117 | + | ||
118 | + | let keyLandTerraTotalGrantedTokens = "land_terra_total_granted_tokens" | |
119 | + | ||
120 | + | let keyLandAeroTotalGrantedTokens = "land_aero_total_granted_tokens" | |
121 | + | ||
122 | + | let keyLastBattleHeight = "last_battle_height" | |
123 | + | ||
124 | + | let keyItemsCount = "items_count" | |
125 | + | ||
126 | + | let keyItemOwner = "item_owner" | |
127 | + | ||
128 | + | let keyItemCategory = "item_category" | |
129 | + | ||
130 | + | let keyItemType = "item_type" | |
131 | + | ||
132 | + | let keyItemEffects = "item_effects" | |
133 | + | ||
134 | + | let keyItemIsEquippedBy = "item_is_equipped_by" | |
135 | + | ||
136 | + | let keyCharWeapon = "char_weapon" | |
137 | + | ||
138 | + | let keyCharArmor = "char_armor" | |
139 | + | ||
140 | + | let keyCharJewel = "char_jewel" | |
141 | + | ||
142 | + | let keyItemEffectsValuesPerTypes = "item_effects_values_per_types" | |
41 | 143 | ||
42 | 144 | func invokeChecks (callerAddr) = if ((isDataStorageUntouched(govApp) != false)) | |
43 | 145 | then throw("Governing app not ready") | |
44 | 146 | else { | |
45 | 147 | let ecosystemAddresses = getStringValue(govApp, keyEcosystemAddresses) | |
46 | 148 | if ((contains(ecosystemAddresses, toString(callerAddr)) != false)) | |
47 | 149 | then throw("Access denied") | |
48 | 150 | else true | |
49 | 151 | } | |
50 | 152 | ||
51 | 153 | ||
52 | - | func with (a,b) = { | |
53 | - | let c = match b { | |
54 | - | case isInt: Int => | |
55 | - | toString(isInt) | |
56 | - | case isStr: String => | |
57 | - | isStr | |
58 | - | case _ => | |
59 | - | throw("Matching issue in with function") | |
60 | - | } | |
61 | - | ((c + separator) + a) | |
62 | - | } | |
154 | + | func ecosystemCheck (caller) = if ((contains(getStringValue(this, keyEcosystemAddresses), toBase58String(caller.bytes)) != true)) | |
155 | + | then throw("Access denied ") | |
156 | + | else true | |
157 | + | ||
158 | + | ||
159 | + | func with (a,b) = makeString([toString(b), a], separator) | |
160 | + | ||
161 | + | ||
162 | + | func withStr (a,b) = makeString([b, a], separator) | |
63 | 163 | ||
64 | 164 | ||
65 | 165 | func randInt (min,max,txId,nonce) = { | |
66 | 166 | let hash = value(sha256_16Kb(((value(value(blockInfoByHeight(height)).vrf) + txId) + toBytes(nonce)))) | |
67 | 167 | value(((value(toInt(hash)) % ((max - min) + 1)) + min)) | |
68 | 168 | } | |
69 | 169 | ||
70 | 170 | ||
71 | 171 | func genRandomNaturalBonus (statsTierRanges,bonusRanges,startingNonce,txId) = { | |
72 | 172 | let sT1 = parseIntValue(statsTierRanges[0]) | |
73 | 173 | let sT2 = parseIntValue(statsTierRanges[1]) | |
74 | 174 | let sT3 = parseIntValue(statsTierRanges[2]) | |
75 | 175 | let sT4 = parseIntValue(statsTierRanges[3]) | |
76 | 176 | let sT5 = parseIntValue(statsTierRanges[4]) | |
77 | 177 | let sT6 = parseIntValue(statsTierRanges[5]) | |
78 | 178 | let bT1 = parseIntValue(bonusRanges[0]) | |
79 | 179 | let bT2 = parseIntValue(bonusRanges[1]) | |
80 | 180 | let bT3 = parseIntValue(bonusRanges[2]) | |
81 | 181 | let bT4 = parseIntValue(bonusRanges[3]) | |
82 | 182 | let bT5 = parseIntValue(bonusRanges[4]) | |
83 | 183 | let bT6 = parseIntValue(bonusRanges[5]) | |
84 | 184 | let tierResult = randInt(0, 10000, txId, startingNonce) | |
85 | 185 | if ((sT1 >= tierResult)) | |
86 | 186 | then randInt(0, bT1, txId, (startingNonce + 1)) | |
87 | 187 | else if ((sT2 >= tierResult)) | |
88 | 188 | then randInt((bT1 + 1), bT2, txId, (startingNonce + 2)) | |
89 | 189 | else if ((sT3 >= tierResult)) | |
90 | 190 | then randInt((bT2 + 1), bT3, txId, (startingNonce + 3)) | |
91 | 191 | else if ((sT4 >= tierResult)) | |
92 | 192 | then randInt((bT3 + 1), bT4, txId, (startingNonce + 4)) | |
93 | 193 | else if ((sT5 >= tierResult)) | |
94 | 194 | then randInt((bT4 + 1), bT5, txId, (startingNonce + 5)) | |
95 | 195 | else randInt((bT5 + 1), bT6, txId, (startingNonce + 6)) | |
96 | 196 | } | |
97 | 197 | ||
98 | 198 | ||
99 | 199 | @Callable(i) | |
100 | 200 | func createChar () = if ((invokeChecks(i.caller) != true)) | |
101 | 201 | then throw() | |
102 | 202 | else { | |
103 | 203 | let txId = i.transactionId | |
104 | 204 | let callerAddr = toBase58String(i.caller.bytes) | |
105 | 205 | let charId = valueOrElse(getInteger(this, keyCharsCount), 1) | |
106 | 206 | let bodiesAmount = getIntegerValue(govApp, keyCharsBodyAmount) | |
107 | 207 | let eyesAmount = getIntegerValue(govApp, keyCharsEyesAmount) | |
108 | 208 | let mouthsAmount = getIntegerValue(govApp, keyCharsMouthAmount) | |
109 | 209 | let statsTiersRanges = split(getStringValue(govApp, keyCharsStatsTiersRanges), separator) | |
110 | 210 | let natElemBonusRanges = split(getStringValue(govApp, keyCharsNaturalElemBonusRanges), separator) | |
111 | 211 | let natBattleBonusRanges = split(getStringValue(govApp, keyCharsNaturalBattleBonusRanges), separator) | |
112 | 212 | let natGeneratingBonusRanges = split(getStringValue(govApp, keyCharsNaturalGeneratingBonusRanges), separator) | |
113 | 213 | let appearance = makeString([toString(randInt(1, bodiesAmount, txId, 0)), toString(randInt(1, eyesAmount, txId, 1)), toString(randInt(1, mouthsAmount, txId, 2))], separator) | |
114 | 214 | let natPyroBonus = genRandomNaturalBonus(statsTiersRanges, natElemBonusRanges, 3, txId) | |
115 | 215 | let natAquaBonus = genRandomNaturalBonus(statsTiersRanges, natElemBonusRanges, 10, txId) | |
116 | 216 | let natTerraBonus = genRandomNaturalBonus(statsTiersRanges, natElemBonusRanges, 17, txId) | |
117 | 217 | let natAeroBonus = genRandomNaturalBonus(statsTiersRanges, natElemBonusRanges, 24, txId) | |
118 | 218 | let natGeneratingBonus = genRandomNaturalBonus(statsTiersRanges, natGeneratingBonusRanges, 31, txId) | |
119 | 219 | let natBattleBonus = genRandomNaturalBonus(statsTiersRanges, natBattleBonusRanges, 38, txId) | |
120 | 220 | [StringEntry(with(keyOwner, charId), callerAddr), StringEntry(with(keyAppearance, charId), appearance), IntegerEntry(with(keyNaturalPyroBonus, charId), natPyroBonus), IntegerEntry(with(keyNaturalAquaBonus, charId), natAquaBonus), IntegerEntry(with(keyNaturalTerraBonus, charId), natTerraBonus), IntegerEntry(with(keyNaturalAeroBonus, charId), natAeroBonus), IntegerEntry(with(keyNaturalBattleBonus, charId), natBattleBonus), IntegerEntry(with(keyNaturalGeneratingBonus, charId), natGeneratingBonus), IntegerEntry(keyCharsCount, (charId + 1))] | |
121 | 221 | } | |
122 | 222 | ||
123 | 223 | ||
124 | 224 | @Verifier(tx) | |
125 | 225 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
126 | 226 |
github/deemru/w8io/169f3d6 39.02 ms ◑