tx · 6qL3BAEnYpNyaDhjZP9PEFuKsm3i6CzSdf2jihht3r4b

3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG:  -0.02000000 Waves

2022.05.23 17:15 [2064434] smart account 3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG > SELF 0.00000000 Waves

{ "type": 13, "id": "6qL3BAEnYpNyaDhjZP9PEFuKsm3i6CzSdf2jihht3r4b", "fee": 2000000, "feeAssetId": null, "timestamp": 1653315318999, "version": 2, "chainId": 84, "sender": "3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG", "senderPublicKey": "A5uPpc5KS7DgroqteAzwUgULhnPuQKdsgxYXJMyji3j8", "proofs": [ "8trkogS4TqDUKFQv7kKr3Y6j1XJSA4wNHLeMdoX4fPuxdfLRLCZrDguFaFtwvHN2AXTTp1tT1oYyDwtWhLuR9en" ], "script": "base64:AAIFAAAAAAAAABEIAhIAEgQKAgQIEgASAwoBAQAAAF8AAAAACXNlcGFyYXRvcgIAAAABXwAAAAAGZ292QXBwCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXl4Znd2YnVlVUJ5bllIZlFzdXROWFpOcU5vekdpTW5zRwAAAAAIY2hhcnNBcHAJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNOQTNMUlNpZ2s2a25MWjE2dVR6Y2RMTm93MkVRWnRYVGFKAAAAAAhsYW5kc0FwcAkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM014aUpMclk2UWE1YlNZeHhTRkhTRzViVlYybjU5eDFNR24AAAAACmJhdHRsZXNBcHAJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNdUg5Tmdwb0dhU1F1ZkVRTFBSaWtYTlM5UFhoa2hjTHpwAAAAABVrZXlFY29zeXN0ZW1BZGRyZXNzZXMCAAAAE2Vjb3N5c3RlbV9hZGRyZXNzZXMAAAAACmtleVRva2VuSWQCAAAACHRva2VuX2lk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AZhbW91bnQGCQAFFAAAAAIJAARMAAAAAgUAAAAMdG9rZW5SZWlzc3VlCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAd0b2tlbklkBQAAAANuaWwFAAAABmFtb3VudAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5amIc+g==", "height": 2064434, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6qPTFVCgFHMjmDwkrG3qnJasyeaFRej41oXSnTKtuXnr Next: 9t5dbQNsAbMDsVudyzuRuUhZ5mz2mUX4kstPRCTmUQLt Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "_"
55
6-let DEV_MODE = true
6+let govApp = addressFromStringValue("3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG")
77
8-let tokenName = "Coucou"
8+let charsApp = addressFromStringValue("3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ")
99
10-let tokenDesc = "bla bla"
10+let landsApp = addressFromStringValue("3MxiJLrY6Qa5bSYxxSFHSG5bVV2n59x1MGn")
1111
12-let tokenInitialEmissionRate = 100000000
13-
14-let landsInitialAmount = 6
15-
16-let appearanceInitialBodyAmount = 5
17-
18-let appearanceInitialEyesAmount = 5
19-
20-let appearanceInitialMouthAmount = 5
21-
22-let rangesInitialStatsTiers = "4500_7500_9000_9750_9990_10000"
23-
24-let rangesInitialNaturalElem = "400_1000_1400_1600_1750_2000"
25-
26-let rangesInitialNaturalGenerating = "200_300_375_425_450_500"
27-
28-let rangesInitialNaturalBattle = "2000_3000_3750_4250_4500_5000"
29-
30-let battleRestPeriod = 0
31-
32-let battleWinChanceHardcap = 800000
33-
34-let battleWinChanceIncrPerBlock = 100
35-
36-let battleLootRarityRange = "8000_9500_9990_10000"
37-
38-let itemsCategories = 3
39-
40-let itemsTypesPerCat = "6_4_3"
41-
42-let itemsEffects = 32
43-
44-let itemsEffectsMaxRange = makeString(["2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "500", "500", "500", "500", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "25", "25"], separator)
12+let battlesApp = addressFromStringValue("3MuH9NgpoGaSQufEQLPRikXNS9PXhkhcLzp")
4513
4614 let keyEcosystemAddresses = "ecosystem_addresses"
4715
8149
8250 let keyItemsTypesPerCat = "items_types_per_cat"
8351
84-let keyItemsEffects = "items_effects"
52+let keyItemsEffectsAmount = "items_effects_amount"
8553
8654 let keyitemsEffectsMaxRanges = "items_effects_max_range"
55+
56+let keyCharsCount = "chars_count"
57+
58+let keyOwner = "owner"
59+
60+let keyAppearance = "appearance"
61+
62+let keyNaturalPyroBonus = "natural_pyro_bonus"
63+
64+let keyNaturalAquaBonus = "natural_aqua_bonus"
65+
66+let keyNaturalTerraBonus = "natural_terra_bonus"
67+
68+let keyNaturalAeroBonus = "natural_aero_bonus"
69+
70+let keyNaturalBattleBonus = "natural_battle_bonus"
71+
72+let keyNaturalGeneratingBonus = "natural_generating_bonus"
73+
74+let keyCharCurrentLand = "char_current_land"
75+
76+let keyLandPyroPower = "land_pyro_power"
77+
78+let keyLandAquaPower = "land_aqua_power"
79+
80+let keyLandTerraPower = "land_terra_power"
81+
82+let keyLandAeroPower = "land_aero_power"
83+
84+let keyCharTotalIncome = "char_total_income"
85+
86+let keyAddressTotalIncome = "address_total_income"
87+
88+let keyCharPyroPower = "char_pyro_power"
89+
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"
143+
144+func invokeChecks (callerAddr) = if ((isDataStorageUntouched(govApp) != false))
145+ then throw("Governing app not ready")
146+ else {
147+ let ecosystemAddresses = getStringValue(govApp, keyEcosystemAddresses)
148+ if ((contains(ecosystemAddresses, toString(callerAddr)) != false))
149+ then throw("Access denied")
150+ else true
151+ }
152+
87153
88154 func ecosystemCheck (caller) = if ((contains(getStringValue(this, keyEcosystemAddresses), toBase58String(caller.bytes)) != true))
89155 then throw("Access denied ")
90156 else true
91157
92158
159+func with (a,b) = makeString([toString(b), a], separator)
160+
161+
162+func withStr (a,b) = makeString([b, a], separator)
163+
164+
165+func randInt (min,max,txId,nonce) = {
166+ let hash = value(sha256_16Kb(((value(value(blockInfoByHeight(height)).vrf) + txId) + toBytes(nonce))))
167+ value(((value(toInt(hash)) % ((max - min) + 1)) + min))
168+ }
169+
170+
171+let DEV_MODE = true
172+
173+let tokenName = "Coucou"
174+
175+let tokenDesc = "bla bla"
176+
177+let tokenInitialEmissionRate = 100000000
178+
179+let landsInitialAmount = 6
180+
181+let appearanceInitialBodyAmount = 5
182+
183+let appearanceInitialEyesAmount = 5
184+
185+let appearanceInitialMouthAmount = 5
186+
187+let rangesInitialStatsTiers = "4500_7500_9000_9750_9990_10000"
188+
189+let rangesInitialNaturalElem = "400_1000_1400_1600_1750_2000"
190+
191+let rangesInitialNaturalGenerating = "200_300_375_425_450_500"
192+
193+let rangesInitialNaturalBattle = "10000_10000_10000_10000_10000_10000"
194+
195+let battleRestPeriod = 0
196+
197+let battleWinChanceHardcap = 800000
198+
199+let battleWinChanceIncrPerBlock = 100
200+
201+let battleLootRarityRange = "8000_9500_9990_10000"
202+
203+let itemsCategories = 3
204+
205+let itemsTypesPerCat = "0_6_4_3"
206+
207+let itemsEffectsAmount = 32
208+
209+let itemsEffectsMaxRange = makeString(["0", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "500", "500", "500", "500", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "25", "25"], separator)
210+
93211 @Callable(i)
94212 func init () = if ((i.caller != this))
95213 then throw("Acces denied")
96- else if (if ((isDataStorageUntouched(this) != true))
97- then (DEV_MODE != true)
214+ else if (if (!(isDataStorageUntouched(this)))
215+ then !(DEV_MODE)
98216 else false)
99217 then throw("Init done already")
100218 else {
101219 let tokenIssue = Issue(tokenName, tokenDesc, 1, 8, true)
102220 let tokenId = calculateAssetId(tokenIssue)
103-[tokenIssue, BinaryEntry(keyTokenId, tokenId), IntegerEntry(keyTokenEmissionRate, tokenInitialEmissionRate), IntegerEntry(keyTokenGenerated, 0), IntegerEntry(keyTokenGeneratedLastUpdate, height), StringEntry(keyEcosystemAddresses, toString(this)), IntegerEntry(keyTotalLands, landsInitialAmount), IntegerEntry(keyCharsBodyAmount, appearanceInitialBodyAmount), IntegerEntry(keyCharsEyesAmount, appearanceInitialEyesAmount), IntegerEntry(keyCharsMouthAmount, appearanceInitialMouthAmount), StringEntry(keyCharsStatsTiersRanges, rangesInitialStatsTiers), StringEntry(keyCharsNaturalElemBonusRanges, rangesInitialNaturalElem), StringEntry(keyCharsNaturalGeneratingBonusRanges, rangesInitialNaturalGenerating), StringEntry(keyCharsNaturalBattleBonusRanges, rangesInitialNaturalBattle), IntegerEntry(keyBattleRestPeriod, battleRestPeriod), IntegerEntry(keyBattleWinChanceHardcap, battleWinChanceHardcap), IntegerEntry(keyBattleWinChanceIncrPerBlock, battleWinChanceIncrPerBlock), StringEntry(keyBattleLootRarityRanges, battleLootRarityRange), IntegerEntry(keyItemsCategories, itemsCategories), StringEntry(keyItemsTypesPerCat, itemsTypesPerCat), IntegerEntry(keyItemsEffects, itemsEffects), StringEntry(keyitemsEffectsMaxRanges, itemsEffectsMaxRange)]
221+[tokenIssue, BinaryEntry(keyTokenId, tokenId), IntegerEntry(keyTokenEmissionRate, tokenInitialEmissionRate), IntegerEntry(keyTokenGenerated, 0), IntegerEntry(keyTokenGeneratedLastUpdate, height), StringEntry(keyEcosystemAddresses, toString(this)), IntegerEntry(keyTotalLands, landsInitialAmount), IntegerEntry(keyCharsBodyAmount, appearanceInitialBodyAmount), IntegerEntry(keyCharsEyesAmount, appearanceInitialEyesAmount), IntegerEntry(keyCharsMouthAmount, appearanceInitialMouthAmount), StringEntry(keyCharsStatsTiersRanges, rangesInitialStatsTiers), StringEntry(keyCharsNaturalElemBonusRanges, rangesInitialNaturalElem), StringEntry(keyCharsNaturalGeneratingBonusRanges, rangesInitialNaturalGenerating), StringEntry(keyCharsNaturalBattleBonusRanges, rangesInitialNaturalBattle), IntegerEntry(keyBattleRestPeriod, battleRestPeriod), IntegerEntry(keyBattleWinChanceHardcap, battleWinChanceHardcap), IntegerEntry(keyBattleWinChanceIncrPerBlock, battleWinChanceIncrPerBlock), StringEntry(keyBattleLootRarityRanges, battleLootRarityRange), IntegerEntry(keyItemsCategories, itemsCategories), StringEntry(keyItemsTypesPerCat, itemsTypesPerCat), IntegerEntry(keyItemsEffectsAmount, itemsEffectsAmount), StringEntry(keyitemsEffectsMaxRanges, itemsEffectsMaxRange)]
104222 }
105223
106224
140258
141259
142260 @Callable(i)
143-func getGeneratedSupplies () = if ((ecosystemCheck(i.caller) != true))
261+func getGeneratedSupplies () = if (!(ecosystemCheck(i.caller)))
144262 then throw()
145263 else {
146264 let currentGeneratedSupplies = getIntegerValue(this, keyTokenGenerated)
156274
157275
158276 @Callable(i)
159-func sendTokenstoApp (amount) = if ((ecosystemCheck(i.caller) != true))
277+func sendTokenstoApp (amount) = if (!(ecosystemCheck(i.caller)))
160278 then throw()
161279 else {
162280 let tokenId = getBinaryValue(this, keyTokenId)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "_"
55
6-let DEV_MODE = true
6+let govApp = addressFromStringValue("3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG")
77
8-let tokenName = "Coucou"
8+let charsApp = addressFromStringValue("3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ")
99
10-let tokenDesc = "bla bla"
10+let landsApp = addressFromStringValue("3MxiJLrY6Qa5bSYxxSFHSG5bVV2n59x1MGn")
1111
12-let tokenInitialEmissionRate = 100000000
13-
14-let landsInitialAmount = 6
15-
16-let appearanceInitialBodyAmount = 5
17-
18-let appearanceInitialEyesAmount = 5
19-
20-let appearanceInitialMouthAmount = 5
21-
22-let rangesInitialStatsTiers = "4500_7500_9000_9750_9990_10000"
23-
24-let rangesInitialNaturalElem = "400_1000_1400_1600_1750_2000"
25-
26-let rangesInitialNaturalGenerating = "200_300_375_425_450_500"
27-
28-let rangesInitialNaturalBattle = "2000_3000_3750_4250_4500_5000"
29-
30-let battleRestPeriod = 0
31-
32-let battleWinChanceHardcap = 800000
33-
34-let battleWinChanceIncrPerBlock = 100
35-
36-let battleLootRarityRange = "8000_9500_9990_10000"
37-
38-let itemsCategories = 3
39-
40-let itemsTypesPerCat = "6_4_3"
41-
42-let itemsEffects = 32
43-
44-let itemsEffectsMaxRange = makeString(["2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "500", "500", "500", "500", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "25", "25"], separator)
12+let battlesApp = addressFromStringValue("3MuH9NgpoGaSQufEQLPRikXNS9PXhkhcLzp")
4513
4614 let keyEcosystemAddresses = "ecosystem_addresses"
4715
4816 let keyTokenId = "token_id"
4917
5018 let keyTokenEmissionRate = "token_emission_rate"
5119
5220 let keyTokenGenerated = "token_generated"
5321
5422 let keyTokenGeneratedLastUpdate = "token_generated_last_update"
5523
5624 let keyCharsBodyAmount = "chars_body_amount"
5725
5826 let keyCharsEyesAmount = "chars_eyes_amount"
5927
6028 let keyCharsMouthAmount = "chars_mouth_amount"
6129
6230 let keyCharsStatsTiersRanges = "chars_stats_tiers_ranges"
6331
6432 let keyCharsNaturalElemBonusRanges = "chars_natural_elem_bonus_ranges"
6533
6634 let keyCharsNaturalBattleBonusRanges = "chars_natural_battle_bonus_ranges"
6735
6836 let keyCharsNaturalGeneratingBonusRanges = "chars_natural_generating_bonus_ranges"
6937
7038 let keyTotalLands = "total_lands"
7139
7240 let keyBattleRestPeriod = "battle_rest_period"
7341
7442 let keyBattleWinChanceHardcap = "battle_win_chance_hardcap"
7543
7644 let keyBattleWinChanceIncrPerBlock = "battle_win_chance_incr_per_block"
7745
7846 let keyBattleLootRarityRanges = "battle_loot_rarity_ranges"
7947
8048 let keyItemsCategories = "items_categories"
8149
8250 let keyItemsTypesPerCat = "items_types_per_cat"
8351
84-let keyItemsEffects = "items_effects"
52+let keyItemsEffectsAmount = "items_effects_amount"
8553
8654 let keyitemsEffectsMaxRanges = "items_effects_max_range"
55+
56+let keyCharsCount = "chars_count"
57+
58+let keyOwner = "owner"
59+
60+let keyAppearance = "appearance"
61+
62+let keyNaturalPyroBonus = "natural_pyro_bonus"
63+
64+let keyNaturalAquaBonus = "natural_aqua_bonus"
65+
66+let keyNaturalTerraBonus = "natural_terra_bonus"
67+
68+let keyNaturalAeroBonus = "natural_aero_bonus"
69+
70+let keyNaturalBattleBonus = "natural_battle_bonus"
71+
72+let keyNaturalGeneratingBonus = "natural_generating_bonus"
73+
74+let keyCharCurrentLand = "char_current_land"
75+
76+let keyLandPyroPower = "land_pyro_power"
77+
78+let keyLandAquaPower = "land_aqua_power"
79+
80+let keyLandTerraPower = "land_terra_power"
81+
82+let keyLandAeroPower = "land_aero_power"
83+
84+let keyCharTotalIncome = "char_total_income"
85+
86+let keyAddressTotalIncome = "address_total_income"
87+
88+let keyCharPyroPower = "char_pyro_power"
89+
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"
143+
144+func invokeChecks (callerAddr) = if ((isDataStorageUntouched(govApp) != false))
145+ then throw("Governing app not ready")
146+ else {
147+ let ecosystemAddresses = getStringValue(govApp, keyEcosystemAddresses)
148+ if ((contains(ecosystemAddresses, toString(callerAddr)) != false))
149+ then throw("Access denied")
150+ else true
151+ }
152+
87153
88154 func ecosystemCheck (caller) = if ((contains(getStringValue(this, keyEcosystemAddresses), toBase58String(caller.bytes)) != true))
89155 then throw("Access denied ")
90156 else true
91157
92158
159+func with (a,b) = makeString([toString(b), a], separator)
160+
161+
162+func withStr (a,b) = makeString([b, a], separator)
163+
164+
165+func randInt (min,max,txId,nonce) = {
166+ let hash = value(sha256_16Kb(((value(value(blockInfoByHeight(height)).vrf) + txId) + toBytes(nonce))))
167+ value(((value(toInt(hash)) % ((max - min) + 1)) + min))
168+ }
169+
170+
171+let DEV_MODE = true
172+
173+let tokenName = "Coucou"
174+
175+let tokenDesc = "bla bla"
176+
177+let tokenInitialEmissionRate = 100000000
178+
179+let landsInitialAmount = 6
180+
181+let appearanceInitialBodyAmount = 5
182+
183+let appearanceInitialEyesAmount = 5
184+
185+let appearanceInitialMouthAmount = 5
186+
187+let rangesInitialStatsTiers = "4500_7500_9000_9750_9990_10000"
188+
189+let rangesInitialNaturalElem = "400_1000_1400_1600_1750_2000"
190+
191+let rangesInitialNaturalGenerating = "200_300_375_425_450_500"
192+
193+let rangesInitialNaturalBattle = "10000_10000_10000_10000_10000_10000"
194+
195+let battleRestPeriod = 0
196+
197+let battleWinChanceHardcap = 800000
198+
199+let battleWinChanceIncrPerBlock = 100
200+
201+let battleLootRarityRange = "8000_9500_9990_10000"
202+
203+let itemsCategories = 3
204+
205+let itemsTypesPerCat = "0_6_4_3"
206+
207+let itemsEffectsAmount = 32
208+
209+let itemsEffectsMaxRange = makeString(["0", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "2000", "500", "500", "500", "500", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "100", "25", "25"], separator)
210+
93211 @Callable(i)
94212 func init () = if ((i.caller != this))
95213 then throw("Acces denied")
96- else if (if ((isDataStorageUntouched(this) != true))
97- then (DEV_MODE != true)
214+ else if (if (!(isDataStorageUntouched(this)))
215+ then !(DEV_MODE)
98216 else false)
99217 then throw("Init done already")
100218 else {
101219 let tokenIssue = Issue(tokenName, tokenDesc, 1, 8, true)
102220 let tokenId = calculateAssetId(tokenIssue)
103-[tokenIssue, BinaryEntry(keyTokenId, tokenId), IntegerEntry(keyTokenEmissionRate, tokenInitialEmissionRate), IntegerEntry(keyTokenGenerated, 0), IntegerEntry(keyTokenGeneratedLastUpdate, height), StringEntry(keyEcosystemAddresses, toString(this)), IntegerEntry(keyTotalLands, landsInitialAmount), IntegerEntry(keyCharsBodyAmount, appearanceInitialBodyAmount), IntegerEntry(keyCharsEyesAmount, appearanceInitialEyesAmount), IntegerEntry(keyCharsMouthAmount, appearanceInitialMouthAmount), StringEntry(keyCharsStatsTiersRanges, rangesInitialStatsTiers), StringEntry(keyCharsNaturalElemBonusRanges, rangesInitialNaturalElem), StringEntry(keyCharsNaturalGeneratingBonusRanges, rangesInitialNaturalGenerating), StringEntry(keyCharsNaturalBattleBonusRanges, rangesInitialNaturalBattle), IntegerEntry(keyBattleRestPeriod, battleRestPeriod), IntegerEntry(keyBattleWinChanceHardcap, battleWinChanceHardcap), IntegerEntry(keyBattleWinChanceIncrPerBlock, battleWinChanceIncrPerBlock), StringEntry(keyBattleLootRarityRanges, battleLootRarityRange), IntegerEntry(keyItemsCategories, itemsCategories), StringEntry(keyItemsTypesPerCat, itemsTypesPerCat), IntegerEntry(keyItemsEffects, itemsEffects), StringEntry(keyitemsEffectsMaxRanges, itemsEffectsMaxRange)]
221+[tokenIssue, BinaryEntry(keyTokenId, tokenId), IntegerEntry(keyTokenEmissionRate, tokenInitialEmissionRate), IntegerEntry(keyTokenGenerated, 0), IntegerEntry(keyTokenGeneratedLastUpdate, height), StringEntry(keyEcosystemAddresses, toString(this)), IntegerEntry(keyTotalLands, landsInitialAmount), IntegerEntry(keyCharsBodyAmount, appearanceInitialBodyAmount), IntegerEntry(keyCharsEyesAmount, appearanceInitialEyesAmount), IntegerEntry(keyCharsMouthAmount, appearanceInitialMouthAmount), StringEntry(keyCharsStatsTiersRanges, rangesInitialStatsTiers), StringEntry(keyCharsNaturalElemBonusRanges, rangesInitialNaturalElem), StringEntry(keyCharsNaturalGeneratingBonusRanges, rangesInitialNaturalGenerating), StringEntry(keyCharsNaturalBattleBonusRanges, rangesInitialNaturalBattle), IntegerEntry(keyBattleRestPeriod, battleRestPeriod), IntegerEntry(keyBattleWinChanceHardcap, battleWinChanceHardcap), IntegerEntry(keyBattleWinChanceIncrPerBlock, battleWinChanceIncrPerBlock), StringEntry(keyBattleLootRarityRanges, battleLootRarityRange), IntegerEntry(keyItemsCategories, itemsCategories), StringEntry(keyItemsTypesPerCat, itemsTypesPerCat), IntegerEntry(keyItemsEffectsAmount, itemsEffectsAmount), StringEntry(keyitemsEffectsMaxRanges, itemsEffectsMaxRange)]
104222 }
105223
106224
107225
108226 @Callable(i)
109227 func manageEcosystemAddresses (add,addr) = if ((i.caller != this))
110228 then throw("Acces denied")
111229 else {
112230 let mAddr = match addressFromString(addr) {
113231 case isAddr: Address =>
114232 addr
115233 case _ =>
116234 throw("Not an address")
117235 }
118236 let currentEcoAddr = getStringValue(this, keyEcosystemAddresses)
119237 let addrInList = contains(currentEcoAddr, mAddr)
120238 if (if ((add == true))
121239 then (addrInList == true)
122240 else false)
123241 then throw("Address already in the list")
124242 else if (if ((add == false))
125243 then (addrInList == false)
126244 else false)
127245 then throw("Address not in the list already")
128246 else {
129247 let newEcoAddr = if ((add == true))
130248 then ((currentEcoAddr + separator) + mAddr)
131249 else {
132250 let ecoAddrList = split(currentEcoAddr, separator)
133251 let addrIndex = valueOrErrorMessage(indexOf(ecoAddrList, mAddr), "Unknown address")
134252 makeString(removeByIndex(ecoAddrList, addrIndex), separator)
135253 }
136254 [StringEntry(keyEcosystemAddresses, newEcoAddr)]
137255 }
138256 }
139257
140258
141259
142260 @Callable(i)
143-func getGeneratedSupplies () = if ((ecosystemCheck(i.caller) != true))
261+func getGeneratedSupplies () = if (!(ecosystemCheck(i.caller)))
144262 then throw()
145263 else {
146264 let currentGeneratedSupplies = getIntegerValue(this, keyTokenGenerated)
147265 let heightDiff = (height - getIntegerValue(this, keyTokenGeneratedLastUpdate))
148266 let newGeneratedSupplies = (currentGeneratedSupplies + (heightDiff * getIntegerValue(this, keyTokenEmissionRate)))
149267 if ((currentGeneratedSupplies > newGeneratedSupplies))
150268 then throw("newGeneratedSupplies < currentGeneratedSupplies")
151269 else if ((0 > heightDiff))
152270 then throw("heightDiff < 0")
153271 else $Tuple2([IntegerEntry(keyTokenGenerated, newGeneratedSupplies), IntegerEntry(keyTokenGeneratedLastUpdate, height)], newGeneratedSupplies)
154272 }
155273
156274
157275
158276 @Callable(i)
159-func sendTokenstoApp (amount) = if ((ecosystemCheck(i.caller) != true))
277+func sendTokenstoApp (amount) = if (!(ecosystemCheck(i.caller)))
160278 then throw()
161279 else {
162280 let tokenId = getBinaryValue(this, keyTokenId)
163281 let tokenReissue = Reissue(tokenId, amount, true)
164282 $Tuple2([tokenReissue, ScriptTransfer(i.caller, amount, tokenId)], amount)
165283 }
166284
167285
168286 @Verifier(tx)
169287 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
170288

github/deemru/w8io/169f3d6 
42.29 ms