tx · 9t5dbQNsAbMDsVudyzuRuUhZ5mz2mUX4kstPRCTmUQLt 3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG: -0.01500000 Waves 2022.05.23 17:41 [2064456] smart account 3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG > SELF 0.00000000 Waves
{ "type": 13, "id": "9t5dbQNsAbMDsVudyzuRuUhZ5mz2mUX4kstPRCTmUQLt", "fee": 1500000, "feeAssetId": null, "timestamp": 1653316869000, "version": 2, "chainId": 84, "sender": "3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG", "senderPublicKey": "A5uPpc5KS7DgroqteAzwUgULhnPuQKdsgxYXJMyji3j8", "proofs": [ "4Wt2jtzmV2dKPHczyb8tHeurTDwnTm4Gi6WLzJ3JcMsHeoqoVPUj9zv9HKtnoLP1BnGaDMvzaCjptrmE8C1LJcTa" ], "script": "base64:AAIFAAAAAAAAABEIAhIAEgQKAgQIEgASAwoBAQAAAF8AAAAACXNlcGFyYXRvcgIAAAABXwAAAAAGZ292QXBwCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXl4Znd2YnVlVUJ5bllIZlFzdXROWFpOcU5vekdpTW5zRwAAAAAIY2hhcnNBcHAJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNOQTNMUlNpZ2s2a25MWjE2dVR6Y2RMTm93MkVRWnRYVGFKAAAAAAhsYW5kc0FwcAkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM014aUpMclk2UWE1YlNZeHhTRkhTRzViVlYybjU5eDFNR24AAAAACmJhdHRsZXNBcHAJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNdUg5Tmdwb0dhU1F1ZkVRTFBSaWtYTlM5UFhoa2hjTHpwAAAAABVrZXlFY29zeXN0ZW1BZGRyZXNzZXMCAAAAE2Vjb3N5c3RlbV9hZGRyZXNzZXMAAAAACmtleVRva2VuSWQCAAAACHRva2V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ZXIJAQAAAAV0aHJvdwAAAAAEAAAAB3Rva2VuSWQJAQAAABFAZXh0ck5hdGl2ZSgxMDUyKQAAAAIFAAAABHRoaXMFAAAACmtleVRva2VuSWQEAAAADHRva2VuUmVpc3N1ZQkBAAAAB1JlaXNzdWUAAAADBQAAAAd0b2tlbklkBQAAAAZhbW91bnQGCQAFFAAAAAIJAARMAAAAAgUAAAAMdG9rZW5SZWlzc3VlCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAd0b2tlbklkBQAAAANuaWwFAAAABmFtb3VudAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V53PK0WQ==", "height": 2064456, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6qL3BAEnYpNyaDhjZP9PEFuKsm3i6CzSdf2jihht3r4b Next: 6DLmpqiG2nnDZ3k2jWT8MfDQpkgDQH4dNAyUkMtFanHV Diff:
Old | New | Differences | |
---|---|---|---|
184 | 184 | ||
185 | 185 | let appearanceInitialMouthAmount = 5 | |
186 | 186 | ||
187 | - | let rangesInitialStatsTiers = " | |
187 | + | let rangesInitialStatsTiers = "500_7500_9000_9750_9990_10000" | |
188 | 188 | ||
189 | 189 | let rangesInitialNaturalElem = "400_1000_1400_1600_1750_2000" | |
190 | 190 | ||
191 | 191 | let rangesInitialNaturalGenerating = "200_300_375_425_450_500" | |
192 | 192 | ||
193 | - | let rangesInitialNaturalBattle = " | |
193 | + | let rangesInitialNaturalBattle = "9000_9100_9200_9300_9400_9500" | |
194 | 194 | ||
195 | 195 | let battleRestPeriod = 0 | |
196 | 196 | ||
218 | 218 | else { | |
219 | 219 | let tokenIssue = Issue(tokenName, tokenDesc, 1, 8, true) | |
220 | 220 | let tokenId = calculateAssetId(tokenIssue) | |
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)] | |
221 | + | [tokenIssue, BinaryEntry(keyTokenId, tokenId), IntegerEntry(keyTokenEmissionRate, tokenInitialEmissionRate), IntegerEntry(keyTokenGenerated, 0), IntegerEntry(keyTokenGeneratedLastUpdate, height), StringEntry(keyEcosystemAddresses, makeString([toString(this), toString(charsApp), toString(landsApp), toString(battlesApp)], separator)), 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)] | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "_" | |
5 | 5 | ||
6 | 6 | let govApp = addressFromStringValue("3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG") | |
7 | 7 | ||
8 | 8 | let charsApp = addressFromStringValue("3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ") | |
9 | 9 | ||
10 | 10 | let landsApp = addressFromStringValue("3MxiJLrY6Qa5bSYxxSFHSG5bVV2n59x1MGn") | |
11 | 11 | ||
12 | 12 | let battlesApp = addressFromStringValue("3MuH9NgpoGaSQufEQLPRikXNS9PXhkhcLzp") | |
13 | 13 | ||
14 | 14 | let keyEcosystemAddresses = "ecosystem_addresses" | |
15 | 15 | ||
16 | 16 | let keyTokenId = "token_id" | |
17 | 17 | ||
18 | 18 | let keyTokenEmissionRate = "token_emission_rate" | |
19 | 19 | ||
20 | 20 | let keyTokenGenerated = "token_generated" | |
21 | 21 | ||
22 | 22 | let keyTokenGeneratedLastUpdate = "token_generated_last_update" | |
23 | 23 | ||
24 | 24 | let keyCharsBodyAmount = "chars_body_amount" | |
25 | 25 | ||
26 | 26 | let keyCharsEyesAmount = "chars_eyes_amount" | |
27 | 27 | ||
28 | 28 | let keyCharsMouthAmount = "chars_mouth_amount" | |
29 | 29 | ||
30 | 30 | let keyCharsStatsTiersRanges = "chars_stats_tiers_ranges" | |
31 | 31 | ||
32 | 32 | let keyCharsNaturalElemBonusRanges = "chars_natural_elem_bonus_ranges" | |
33 | 33 | ||
34 | 34 | let keyCharsNaturalBattleBonusRanges = "chars_natural_battle_bonus_ranges" | |
35 | 35 | ||
36 | 36 | let keyCharsNaturalGeneratingBonusRanges = "chars_natural_generating_bonus_ranges" | |
37 | 37 | ||
38 | 38 | let keyTotalLands = "total_lands" | |
39 | 39 | ||
40 | 40 | let keyBattleRestPeriod = "battle_rest_period" | |
41 | 41 | ||
42 | 42 | let keyBattleWinChanceHardcap = "battle_win_chance_hardcap" | |
43 | 43 | ||
44 | 44 | let keyBattleWinChanceIncrPerBlock = "battle_win_chance_incr_per_block" | |
45 | 45 | ||
46 | 46 | let keyBattleLootRarityRanges = "battle_loot_rarity_ranges" | |
47 | 47 | ||
48 | 48 | let keyItemsCategories = "items_categories" | |
49 | 49 | ||
50 | 50 | let keyItemsTypesPerCat = "items_types_per_cat" | |
51 | 51 | ||
52 | 52 | let keyItemsEffectsAmount = "items_effects_amount" | |
53 | 53 | ||
54 | 54 | let keyitemsEffectsMaxRanges = "items_effects_max_range" | |
55 | 55 | ||
56 | 56 | let keyCharsCount = "chars_count" | |
57 | 57 | ||
58 | 58 | let keyOwner = "owner" | |
59 | 59 | ||
60 | 60 | let keyAppearance = "appearance" | |
61 | 61 | ||
62 | 62 | let keyNaturalPyroBonus = "natural_pyro_bonus" | |
63 | 63 | ||
64 | 64 | let keyNaturalAquaBonus = "natural_aqua_bonus" | |
65 | 65 | ||
66 | 66 | let keyNaturalTerraBonus = "natural_terra_bonus" | |
67 | 67 | ||
68 | 68 | let keyNaturalAeroBonus = "natural_aero_bonus" | |
69 | 69 | ||
70 | 70 | let keyNaturalBattleBonus = "natural_battle_bonus" | |
71 | 71 | ||
72 | 72 | let keyNaturalGeneratingBonus = "natural_generating_bonus" | |
73 | 73 | ||
74 | 74 | let keyCharCurrentLand = "char_current_land" | |
75 | 75 | ||
76 | 76 | let keyLandPyroPower = "land_pyro_power" | |
77 | 77 | ||
78 | 78 | let keyLandAquaPower = "land_aqua_power" | |
79 | 79 | ||
80 | 80 | let keyLandTerraPower = "land_terra_power" | |
81 | 81 | ||
82 | 82 | let keyLandAeroPower = "land_aero_power" | |
83 | 83 | ||
84 | 84 | let keyCharTotalIncome = "char_total_income" | |
85 | 85 | ||
86 | 86 | let keyAddressTotalIncome = "address_total_income" | |
87 | 87 | ||
88 | 88 | let keyCharPyroPower = "char_pyro_power" | |
89 | 89 | ||
90 | 90 | let keyCharAquaPower = "char_aqua_power" | |
91 | 91 | ||
92 | 92 | let keyCharTerraPower = "char_terra_power" | |
93 | 93 | ||
94 | 94 | let keyCharAeroPower = "char_aero_power" | |
95 | 95 | ||
96 | 96 | let keyCharInitialPyroShares = "char_initial_pyro_shares" | |
97 | 97 | ||
98 | 98 | let keyCharInitialAquaShares = "char_initial_aqua_shares" | |
99 | 99 | ||
100 | 100 | let keyCharInitialTerraShares = "char_initial_terra_shares" | |
101 | 101 | ||
102 | 102 | let keyCharInitialAeroShares = "char_initial_aero_shares" | |
103 | 103 | ||
104 | 104 | let keyCharInitialLandPyroGrantedTokens = "char_initial_land_pyro_granted_tokens" | |
105 | 105 | ||
106 | 106 | let keyCharInitialLandAquaGrantedTokens = "char_initial_land_aqua_granted_tokens" | |
107 | 107 | ||
108 | 108 | let keyCharInitialLandTerraGrantedTokens = "char_initial_land_terra_granted_tokens" | |
109 | 109 | ||
110 | 110 | let keyCharInitialLandAeroGrantedTokens = "char_initial_land_aero_granted_tokens" | |
111 | 111 | ||
112 | 112 | let keyLandLastTokenDistributionUpdate = "land_mast_token_distribution_update" | |
113 | 113 | ||
114 | 114 | let keyLandPyroTotalGrantedTokens = "land_pyro_total_granted_tokens" | |
115 | 115 | ||
116 | 116 | let keyLandAquaTotalGrantedTokens = "land_aqua_total_granted_tokens" | |
117 | 117 | ||
118 | 118 | let keyLandTerraTotalGrantedTokens = "land_terra_total_granted_tokens" | |
119 | 119 | ||
120 | 120 | let keyLandAeroTotalGrantedTokens = "land_aero_total_granted_tokens" | |
121 | 121 | ||
122 | 122 | let keyLastBattleHeight = "last_battle_height" | |
123 | 123 | ||
124 | 124 | let keyItemsCount = "items_count" | |
125 | 125 | ||
126 | 126 | let keyItemOwner = "item_owner" | |
127 | 127 | ||
128 | 128 | let keyItemCategory = "item_category" | |
129 | 129 | ||
130 | 130 | let keyItemType = "item_type" | |
131 | 131 | ||
132 | 132 | let keyItemEffects = "item_effects" | |
133 | 133 | ||
134 | 134 | let keyItemIsEquippedBy = "item_is_equipped_by" | |
135 | 135 | ||
136 | 136 | let keyCharWeapon = "char_weapon" | |
137 | 137 | ||
138 | 138 | let keyCharArmor = "char_armor" | |
139 | 139 | ||
140 | 140 | let keyCharJewel = "char_jewel" | |
141 | 141 | ||
142 | 142 | let keyItemEffectsValuesPerTypes = "item_effects_values_per_types" | |
143 | 143 | ||
144 | 144 | func invokeChecks (callerAddr) = if ((isDataStorageUntouched(govApp) != false)) | |
145 | 145 | then throw("Governing app not ready") | |
146 | 146 | else { | |
147 | 147 | let ecosystemAddresses = getStringValue(govApp, keyEcosystemAddresses) | |
148 | 148 | if ((contains(ecosystemAddresses, toString(callerAddr)) != false)) | |
149 | 149 | then throw("Access denied") | |
150 | 150 | else true | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func ecosystemCheck (caller) = if ((contains(getStringValue(this, keyEcosystemAddresses), toBase58String(caller.bytes)) != true)) | |
155 | 155 | then throw("Access denied ") | |
156 | 156 | else true | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func with (a,b) = makeString([toString(b), a], separator) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func withStr (a,b) = makeString([b, a], separator) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func randInt (min,max,txId,nonce) = { | |
166 | 166 | let hash = value(sha256_16Kb(((value(value(blockInfoByHeight(height)).vrf) + txId) + toBytes(nonce)))) | |
167 | 167 | value(((value(toInt(hash)) % ((max - min) + 1)) + min)) | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | let DEV_MODE = true | |
172 | 172 | ||
173 | 173 | let tokenName = "Coucou" | |
174 | 174 | ||
175 | 175 | let tokenDesc = "bla bla" | |
176 | 176 | ||
177 | 177 | let tokenInitialEmissionRate = 100000000 | |
178 | 178 | ||
179 | 179 | let landsInitialAmount = 6 | |
180 | 180 | ||
181 | 181 | let appearanceInitialBodyAmount = 5 | |
182 | 182 | ||
183 | 183 | let appearanceInitialEyesAmount = 5 | |
184 | 184 | ||
185 | 185 | let appearanceInitialMouthAmount = 5 | |
186 | 186 | ||
187 | - | let rangesInitialStatsTiers = " | |
187 | + | let rangesInitialStatsTiers = "500_7500_9000_9750_9990_10000" | |
188 | 188 | ||
189 | 189 | let rangesInitialNaturalElem = "400_1000_1400_1600_1750_2000" | |
190 | 190 | ||
191 | 191 | let rangesInitialNaturalGenerating = "200_300_375_425_450_500" | |
192 | 192 | ||
193 | - | let rangesInitialNaturalBattle = " | |
193 | + | let rangesInitialNaturalBattle = "9000_9100_9200_9300_9400_9500" | |
194 | 194 | ||
195 | 195 | let battleRestPeriod = 0 | |
196 | 196 | ||
197 | 197 | let battleWinChanceHardcap = 800000 | |
198 | 198 | ||
199 | 199 | let battleWinChanceIncrPerBlock = 100 | |
200 | 200 | ||
201 | 201 | let battleLootRarityRange = "8000_9500_9990_10000" | |
202 | 202 | ||
203 | 203 | let itemsCategories = 3 | |
204 | 204 | ||
205 | 205 | let itemsTypesPerCat = "0_6_4_3" | |
206 | 206 | ||
207 | 207 | let itemsEffectsAmount = 32 | |
208 | 208 | ||
209 | 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 | 210 | ||
211 | 211 | @Callable(i) | |
212 | 212 | func init () = if ((i.caller != this)) | |
213 | 213 | then throw("Acces denied") | |
214 | 214 | else if (if (!(isDataStorageUntouched(this))) | |
215 | 215 | then !(DEV_MODE) | |
216 | 216 | else false) | |
217 | 217 | then throw("Init done already") | |
218 | 218 | else { | |
219 | 219 | let tokenIssue = Issue(tokenName, tokenDesc, 1, 8, true) | |
220 | 220 | let tokenId = calculateAssetId(tokenIssue) | |
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)] | |
221 | + | [tokenIssue, BinaryEntry(keyTokenId, tokenId), IntegerEntry(keyTokenEmissionRate, tokenInitialEmissionRate), IntegerEntry(keyTokenGenerated, 0), IntegerEntry(keyTokenGeneratedLastUpdate, height), StringEntry(keyEcosystemAddresses, makeString([toString(this), toString(charsApp), toString(landsApp), toString(battlesApp)], separator)), 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)] | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | ||
226 | 226 | @Callable(i) | |
227 | 227 | func manageEcosystemAddresses (add,addr) = if ((i.caller != this)) | |
228 | 228 | then throw("Acces denied") | |
229 | 229 | else { | |
230 | 230 | let mAddr = match addressFromString(addr) { | |
231 | 231 | case isAddr: Address => | |
232 | 232 | addr | |
233 | 233 | case _ => | |
234 | 234 | throw("Not an address") | |
235 | 235 | } | |
236 | 236 | let currentEcoAddr = getStringValue(this, keyEcosystemAddresses) | |
237 | 237 | let addrInList = contains(currentEcoAddr, mAddr) | |
238 | 238 | if (if ((add == true)) | |
239 | 239 | then (addrInList == true) | |
240 | 240 | else false) | |
241 | 241 | then throw("Address already in the list") | |
242 | 242 | else if (if ((add == false)) | |
243 | 243 | then (addrInList == false) | |
244 | 244 | else false) | |
245 | 245 | then throw("Address not in the list already") | |
246 | 246 | else { | |
247 | 247 | let newEcoAddr = if ((add == true)) | |
248 | 248 | then ((currentEcoAddr + separator) + mAddr) | |
249 | 249 | else { | |
250 | 250 | let ecoAddrList = split(currentEcoAddr, separator) | |
251 | 251 | let addrIndex = valueOrErrorMessage(indexOf(ecoAddrList, mAddr), "Unknown address") | |
252 | 252 | makeString(removeByIndex(ecoAddrList, addrIndex), separator) | |
253 | 253 | } | |
254 | 254 | [StringEntry(keyEcosystemAddresses, newEcoAddr)] | |
255 | 255 | } | |
256 | 256 | } | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | ||
260 | 260 | @Callable(i) | |
261 | 261 | func getGeneratedSupplies () = if (!(ecosystemCheck(i.caller))) | |
262 | 262 | then throw() | |
263 | 263 | else { | |
264 | 264 | let currentGeneratedSupplies = getIntegerValue(this, keyTokenGenerated) | |
265 | 265 | let heightDiff = (height - getIntegerValue(this, keyTokenGeneratedLastUpdate)) | |
266 | 266 | let newGeneratedSupplies = (currentGeneratedSupplies + (heightDiff * getIntegerValue(this, keyTokenEmissionRate))) | |
267 | 267 | if ((currentGeneratedSupplies > newGeneratedSupplies)) | |
268 | 268 | then throw("newGeneratedSupplies < currentGeneratedSupplies") | |
269 | 269 | else if ((0 > heightDiff)) | |
270 | 270 | then throw("heightDiff < 0") | |
271 | 271 | else $Tuple2([IntegerEntry(keyTokenGenerated, newGeneratedSupplies), IntegerEntry(keyTokenGeneratedLastUpdate, height)], newGeneratedSupplies) | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | ||
276 | 276 | @Callable(i) | |
277 | 277 | func sendTokenstoApp (amount) = if (!(ecosystemCheck(i.caller))) | |
278 | 278 | then throw() | |
279 | 279 | else { | |
280 | 280 | let tokenId = getBinaryValue(this, keyTokenId) | |
281 | 281 | let tokenReissue = Reissue(tokenId, amount, true) | |
282 | 282 | $Tuple2([tokenReissue, ScriptTransfer(i.caller, amount, tokenId)], amount) | |
283 | 283 | } | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | @Verifier(tx) | |
287 | 287 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
288 | 288 |
github/deemru/w8io/169f3d6 65.76 ms ◑