tx · GJFrd6SkpuVzPqwYqFfFPsxXYybjYhkefUe9bFThBrqG

3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw:  -0.01400000 Waves

2022.06.30 19:12 [2119390] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves

{ "type": 13, "id": "GJFrd6SkpuVzPqwYqFfFPsxXYybjYhkefUe9bFThBrqG", "fee": 1400000, "feeAssetId": null, "timestamp": 1656605583454, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "4YnjXJxp7N2ewxyXqFdPW52NGqhBQxsXyoF3sWviYxxgdz71RBVDT2aaRyRUxgH3t74m4SpUvFXVRG6XRvDDnxu2" ], "script": "base64:AAIFAAAAAAAAABUIAhIAEgMKAQgSABIAEgASABIAEgAAAAAaAAAAAARIQVNIAQAAACBfeIyN06ehC1vFjGoHEYEtTN1wMyTBUs+Yvje4CEB5awAAAAAIS3Jvc3NNZWQBAAAAIBGfxbR1fpefc4QqS5TeX7MwH8KSuZ0QWI31bzl52bmiAAAAAAdNZWRpY2FsAQAAACCV5i0E3OSaG3AYrkbPeGN88GJyR/hqGLXTn4eMTpX+VgAAAAADTGFiAQAAACCwcKaIQz7vhHW2e0CQ0tCHi6bYcYwoEFge0vX6qWaUYAAAAAAEWHJheQEAAAAghD/NhQmrRO36AbkPg1HonmVZNz8MYCDw2ezNrpN094oAAAAABUd5bmVhAQAAACCEP82FCatE7foBuQ+DUeieZVk3PwxgIPDZ7M2uk3T3igAAAAAGRGVudGFsAQAAACAJeytaBIrRrsvPrcbRrDc2kMng8SDDxgt8VjhW4/IVQgAAAAAJRW1lcmdlbmN5AQAAACAJeytaBIrRrsvPrcbRrDc2kMng8SDDxgt8VjhW4/IVQgAAAAAJTWluQW1vdW50AAAAAAAAAAK8AAAAAA5Lcm9zc01l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AAaAAAAAIFAAAACU1pbkFtb3VudAkAAGkAAAACCQAAZQAAAAIFAAAABmhlaWdodAUAAAARVXNlck1hdHVyaXR5VmFsdWUFAAAABFdlZWsDCQAAZgAAAAIJAABoAAAAAgUAAAANVGltZUVtZXJnZW5jeQUAAAADRGF5CQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAABdMYXN0RW1lcmdlbmN5QmxvY2tWYWx1ZQUAAAADRGF5CQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAACRZb3UgY2Fubm90IGNsYWltIHRoZSByZXdhcmQgYmVmb3JlOiAJAAGkAAAAAQkAAGUAAAACBQAAAA1UaW1lRW1lcmdlbmN5CQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAABdMYXN0RW1lcmdlbmN5QmxvY2tWYWx1ZQUAAAADRGF5AgAAAAUgZGF5cwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAAE19MYXN0RW1lcmdlbmN5QmxvY2sFAAAABmhlaWdodAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIJAABoAAAAAgUAAAAPRW1lcmdlbmN5UmV3YXJkAAAAAAAF9eEABQAAAAlFbWVyZ2VuY3kFAAAAA25pbAAAAABvTP5g", "height": 2119390, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CYZ6yBqYG4GyyKqpr19H8PVkY2717cFPrKsNfLTjotof Next: none Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let StakedToken = base58'Hoej8L1ezqQY4Miex4Z4J7uJ33LCdcubV3DsubGHEqWP'
4+let HASH = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv'
55
6-let GovernToken = base58'6ZPMzZseuYoMP4ByozJpVxbugXBobwJYF22zVjW5JjN'
6+let KrossMed = base58'2BoEb7xRk6k58CGk2kZgVi91qDkcGJuBiqsK5AdHLYRX'
77
8-let LikePackageASIMICost = (1 * 100000000)
8+let Medical = base58'B69KJt2GnNYHUybTmrDBvq4BaYD5RqQK6TDBJLQKWrvh'
99
10-let LikePackageTROIKANCost = (5 * 100000000)
10+let Lab = base58'CskPF5HYr8RBcXeDdDyZSkkSurQ2Btcp4nEFFUqLqXMq'
11+
12+let Xray = base58'9uFF8axM2Te2meSHLZy3pMaZ6EE19zk5Wm3oPby6zphf'
13+
14+let Gynea = base58'9uFF8axM2Te2meSHLZy3pMaZ6EE19zk5Wm3oPby6zphf'
15+
16+let Dental = base58'e1brL4ZTbHuRmw5cvThdaBBxDZCF7rW6a2AGMMKvzg1'
17+
18+let Emergency = base58'e1brL4ZTbHuRmw5cvThdaBBxDZCF7rW6a2AGMMKvzg1'
19+
20+let MinAmount = 700
21+
22+let KrossMedReward = 1
23+
24+let MedicalReward = 1
25+
26+let LabReward = 1
27+
28+let XrayReward = 1
29+
30+let GyneaReward = 1
31+
32+let DentalReward = 1
33+
34+let EmergencyReward = 1
35+
36+let ReferreTip = 1
37+
38+let minJoinWeeks = 4
39+
40+let TimeMedical = 14
41+
42+let TimeLab = 60
43+
44+let TimeXray = 60
45+
46+let TimeGynea = 60
47+
48+let TimeDental = 90
49+
50+let TimeEmergency = 30
51+
52+let Week = (1440 * 7)
53+
54+let Day = 1440
1155
1256 @Callable(i)
13-func DevWithdraw () = {
14- let currentKey = toBase58String(i.caller.bytes)
15- if ((currentKey == "3P74buHt98BnojFcaREJZtb98KDyUmZGemJ"))
16- then {
17- let DevBoxAmount = match getInteger(this, "DevBox") {
18- case a: Int =>
19- a
20- case _ =>
21- 0
57+func DepositHASH () = {
58+ let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
59+ let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
60+ let amount = match getInteger(this, UserDeposit) {
61+ case a: Int =>
62+ a
63+ case _ =>
64+ 0
65+ }
66+ let UserMaturityValue = match getInteger(this, UserMaturity) {
67+ case a: Int =>
68+ a
69+ case _ =>
70+ 0
71+ }
72+ let UserDepositTimer = if ((UserMaturityValue != 0))
73+ then UserMaturityValue
74+ else height
75+ let pmt = if ((size(i.payments) == 1))
76+ then i.payments[0]
77+ else throw("Attached payment is required")
78+ if (if (((MinAmount * 100000000) > pmt.amount))
79+ then true
80+ else (pmt.assetId != HASH))
81+ then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH")
82+ else {
83+ let UserDepositValue = (amount + pmt.amount)
84+[IntegerEntry((toBase58String(i.caller.bytes) + "_Deposit"), UserDepositValue), IntegerEntry((toBase58String(i.caller.bytes) + "_DepositBlock"), UserDepositTimer), ScriptTransfer(i.caller, (KrossMedReward * 100000000), KrossMed)]
2285 }
23- if ((0 > DevBoxAmount))
24- then throw("Not enough balance")
25- else [IntegerEntry("DevBox", 0), ScriptTransfer(i.caller, DevBoxAmount, GovernToken)]
26- }
27- else throw("You cannot withdraw as your are not the Dev.")
2886 }
2987
3088
3189
3290 @Callable(i)
33-func WithdrawWeeklyEarning () = {
34- let ContractWalletStakeBalance = assetBalance(this, StakedToken)
35- let MaxDepositer = getStringValue(this, "MaxDepositer")
36- let UserWeeklyEarnings = (toBase58String(i.caller.bytes) + "_WeekEarning")
37- let StakeBalance = match getInteger(this, "StakeBalance") {
91+func RewardReferrer (UserWalletAddressStr) = if ((UserWalletAddressStr == ""))
92+ then throw("Referrer Wallet Address cannot be empty !")
93+ else {
94+ let UserWalletAddress = addressFromStringValue(UserWalletAddressStr)
95+ let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
96+ let TippedStatus = (toBase58String(i.caller.bytes) + "_TippedStatus")
97+ let amount = match getInteger(this, UserDeposit) {
98+ case a: Int =>
99+ a
100+ case _ =>
101+ 0
102+ }
103+ let TippedStatusValue = match getString(this, TippedStatus) {
104+ case a: String =>
105+ a
106+ case _ =>
107+ "NO"
108+ }
109+ if ((TippedStatusValue == "YES"))
110+ then throw("You already tipped a User, you only can tip once a user")
111+ else if (((MinAmount * 100000000) > amount))
112+ then throw((("To tip your referrer you must have at least deposited: " + toString(MinAmount)) + " HASH"))
113+ else [StringEntry((toBase58String(i.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(UserWalletAddress, (ReferreTip * 100000000), KrossMed)]
114+ }
115+
116+
117+
118+@Callable(i)
119+func RequestMedical () = {
120+ let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
121+ let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
122+ let LastMedicalBlock = (toBase58String(i.caller.bytes) + "_LastMedicalBlock")
123+ let amount = match getInteger(this, UserDeposit) {
38124 case a: Int =>
39125 a
40126 case _ =>
41127 0
42128 }
43- let PrizeAmount = match getInteger(this, "FundBox") {
129+ let UserMaturityValue = match getInteger(this, UserMaturity) {
130+ case a: Int =>
131+ a
132+ case _ =>
133+ height
134+ }
135+ let LastMedicalBlockValue = match getInteger(this, LastMedicalBlock) {
44136 case a: Int =>
45137 a
46138 case _ =>
47139 0
48140 }
49- let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
141+ if (((minJoinWeeks * Week) > (height - UserMaturityValue)))
142+ then throw((((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks") + " Your account maturity is: ") + toString(((height - UserMaturityValue) / Week))))
143+ else if (((((MinAmount * 100000000) * (height - UserMaturityValue)) / Week) > amount))
144+ then throw(((("Your Account Maturity is: " + toString(((height - UserMaturityValue) / Week))) + " Weeks. You should have deposited at least: ") + toString((MinAmount * ((height - UserMaturityValue) / Week)))))
145+ else if (((TimeMedical * Day) > ((height - LastMedicalBlockValue) / Day)))
146+ then throw((("You cannot claim the reward before: " + toString((TimeMedical - ((height - LastMedicalBlockValue) / Day)))) + " days"))
147+ else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastMedicalBlock"), height), ScriptTransfer(i.caller, (MedicalReward * 100000000), Medical)]
148+ }
149+
150+
151+
152+@Callable(i)
153+func RequestLab () = {
154+ let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
155+ let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
156+ let LastLabBlock = (toBase58String(i.caller.bytes) + "_LastLabBlock")
157+ let amount = match getInteger(this, UserDeposit) {
50158 case a: Int =>
51159 a
52160 case _ =>
53161 0
54162 }
55- let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
56- then (PrizeAmount == 0)
57- else false)
58- then 0
59- else if (if ((HeightTransactFundBox == 0))
60- then (PrizeAmount != 0)
61- else false)
62- then height
63- else if (if ((HeightTransactFundBox != 0))
64- then (PrizeAmount != 0)
65- else false)
66- then HeightTransactFundBox
67- else 0
68- let currentKey = toBase58String(i.caller.bytes)
69- let newAmount = match getInteger(this, UserWeeklyEarnings) {
163+ let UserMaturityValue = match getInteger(this, UserMaturity) {
164+ case a: Int =>
165+ a
166+ case _ =>
167+ height
168+ }
169+ let LastLabBlockValue = match getInteger(this, LastLabBlock) {
70170 case a: Int =>
71171 a
72172 case _ =>
73173 0
74174 }
75- if ((0 > newAmount))
76- then throw("Can't withdraw negative amount")
77- else if ((0 > newAmount))
78- then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((newAmount / 100000000))))
79- else [IntegerEntry(UserWeeklyEarnings, 0), IntegerEntry("PrizeHeight", PrizeHeightValue), IntegerEntry("MaxDeposit", 0), ScriptTransfer(i.caller, newAmount, StakedToken)]
175+ if (((minJoinWeeks * Week) > (height - UserMaturityValue)))
176+ then throw((((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks") + " Your account maturity is: ") + toString(((height - UserMaturityValue) / Week))))
177+ else if (((((MinAmount * 100000000) * (height - UserMaturityValue)) / Week) > amount))
178+ then throw(((("Your Account Maturity is: " + toString(((height - UserMaturityValue) / Week))) + " Weeks. You should have deposited at least: ") + toString((MinAmount * ((height - UserMaturityValue) / Week)))))
179+ else if (((TimeLab * Day) > ((height - LastLabBlockValue) / Day)))
180+ then throw((("You cannot claim the reward before: " + toString((TimeLab - ((height - LastLabBlockValue) / Day)))) + " days"))
181+ else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastLabBlock"), height), ScriptTransfer(i.caller, (LabReward * 100000000), Lab)]
80182 }
81183
82184
83185
84186 @Callable(i)
85-func PushReward () = {
86- let minPushBlock = 10
87- let minStakeBlock = (7 * 1440)
88- let DelayAfterPush = 60
89- let WaitTime = (1440 * 1)
90- let minref = 3
91- let FirstPushTimer = (7 * 1440)
92- let userWalletGovernBalance = assetBalance(Address(i.caller.bytes), GovernToken)
93- let pmt = if ((size(i.payments) == 1))
94- then i.payments[0]
95- else throw("Attached payment is required")
96- let UserPush = (toBase58String(i.caller.bytes) + "_Push")
97- let UserLastPushOldValue = match getInteger(this, UserPush) {
187+func RequestXray () = {
188+ let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
189+ let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
190+ let LastXrayBlock = (toBase58String(i.caller.bytes) + "_LastXrayBlock")
191+ let amount = match getInteger(this, UserDeposit) {
98192 case a: Int =>
99193 a
100194 case _ =>
101195 0
102196 }
103- let UserRefsNum = (toBase58String(i.caller.bytes) + "_refs")
104- let UserRefsNumValue = match getInteger(this, UserRefsNum) {
197+ let UserMaturityValue = match getInteger(this, UserMaturity) {
198+ case a: Int =>
199+ a
200+ case _ =>
201+ height
202+ }
203+ let LastXrayBlockValue = match getInteger(this, LastXrayBlock) {
105204 case a: Int =>
106205 a
107206 case _ =>
108207 0
109208 }
110- let HighestPushValue = match getInteger(this, "HighestPush") {
209+ if (((minJoinWeeks * Week) > (height - UserMaturityValue)))
210+ then throw((((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks") + " Your account maturity is: ") + toString(((height - UserMaturityValue) / Week))))
211+ else if (((((MinAmount * 100000000) * (height - UserMaturityValue)) / Week) > amount))
212+ then throw(((("Your Account Maturity is: " + toString(((height - UserMaturityValue) / Week))) + " Weeks. You should have deposited at least: ") + toString((MinAmount * ((height - UserMaturityValue) / Week)))))
213+ else if (((TimeXray * Day) > ((height - LastXrayBlockValue) / Day)))
214+ then throw((("You cannot claim the reward before: " + toString((TimeXray - ((height - LastXrayBlockValue) / Day)))) + " days"))
215+ else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastXrayBlock"), height), ScriptTransfer(i.caller, (XrayReward * 100000000), Xray)]
216+ }
217+
218+
219+
220+@Callable(i)
221+func RequestGynea () = {
222+ let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
223+ let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
224+ let LastGyneaBlock = (toBase58String(i.caller.bytes) + "_LastGyneaBlock")
225+ let amount = match getInteger(this, UserDeposit) {
111226 case a: Int =>
112227 a
113228 case _ =>
114229 0
115230 }
116- if ((userWalletGovernBalance > pmt.amount))
117- then if (if (((pmt.amount + UserLastPushOldValue) > HighestPushValue))
118- then (pmt.assetId == GovernToken)
119- else false)
120- then {
121- let UserLastPushBlock = (toBase58String(i.caller.bytes) + "_UserLastPushBlock")
122- let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock")
123- let UserStake = (toBase58String(i.caller.bytes) + "_Staking")
124- let ContractWalletStakeBalance = assetBalance(this, StakedToken)
125- let StakeBalance = match getInteger(this, "StakeBalance") {
126- case a: Int =>
127- a
128- case _ =>
129- 0
130- }
131- let PrizeAmount = match getInteger(this, "FundBox") {
132- case a: Int =>
133- a
134- case _ =>
135- 0
136- }
137- let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
138- case a: Int =>
139- a
140- case _ =>
141- 0
142- }
143- let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
144- then (PrizeAmount == 0)
145- else false)
146- then 0
147- else if (if ((HeightTransactFundBox == 0))
148- then (PrizeAmount != 0)
149- else false)
150- then height
151- else if (if ((HeightTransactFundBox != 0))
152- then (PrizeAmount != 0)
153- else false)
154- then HeightTransactFundBox
155- else 0
156- let ActualDelay = match getInteger(this, "Delay") {
157- case a: Int =>
158- a
159- case _ =>
160- 0
161- }
162- let HighestPushAddress = match getInteger(this, "HighestPushAddress") {
163- case a: Int =>
164- a
165- case _ =>
166- 0
167- }
168- let UserLastPushBlockValue = match getInteger(this, UserLastPushBlock) {
169- case a: Int =>
170- a
171- case _ =>
172- 0
173- }
174- let UserLastStakeBlockValue = match getInteger(this, UserLastStakeBlock) {
175- case a: Int =>
176- a
177- case _ =>
178- 0
179- }
180- let UserStakeValue = match getInteger(this, UserStake) {
181- case a: Int =>
182- a
183- case _ =>
184- 0
185- }
186- let DevBoxBalance = match getInteger(this, "DevBox") {
187- case a: Int =>
188- a
189- case _ =>
190- 0
191- }
192- let DevBoxAmount = (DevBoxBalance + ((pmt.amount * 5) / 1000))
193- let UserPushvalue = (pmt.amount + UserLastPushOldValue)
194- let NewDelay = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
195- then (HighestPushValue > 0)
196- else false)
197- then FirstPushTimer
198- else (ActualDelay + DelayAfterPush)
199- let HighestPushAddressValue = if (if ((height > ((PrizeHeightValue + NewDelay) + WaitTime)))
200- then (HighestPushValue > 0)
201- else false)
202- then ""
203- else HighestPushAddress
204- let PrizeHeightValueNew = if (if ((height > ((PrizeHeightValue + NewDelay) + WaitTime)))
205- then (HighestPushValue > 0)
206- else false)
207- then height
208- else PrizeHeightValue
209- if (if ((UserPushvalue > 0))
210- then ((height - UserLastStakeBlockValue) > minStakeBlock)
211- else false)
212- then if (((height - UserLastPushBlockValue) > minPushBlock))
213- then if ((UserStakeValue > 0))
214- then if ((UserPushvalue > HighestPushValue))
215- then if ((PrizeAmount > 0))
216- then if (if (if (if (((PrizeHeightValueNew + NewDelay) >= height))
217- then true
218- else (height >= ((PrizeHeightValueNew + NewDelay) + WaitTime)))
219- then (HighestPushValue > 0)
220- else false)
221- then true
222- else (HighestPushValue == 0))
223- then if ((UserRefsNumValue >= minref))
224- then [IntegerEntry(UserPush, UserPushvalue), StringEntry("HighestPushAddress", toBase58String(i.caller.bytes)), IntegerEntry("HighestPush", UserPushvalue), IntegerEntry(UserLastPushBlock, height), IntegerEntry("PrizeHeight", PrizeHeightValueNew), IntegerEntry("Delay", NewDelay), IntegerEntry("DevBox", DevBoxAmount)]
225- else throw((("You have to have " + toString(minref)) + " referrals already staking for a minimum of 10 days, to push"))
226- else {
227- let txt = if ((HighestPushValue > 0))
228- then "You cannot Push after rewarding Prize and before One day has passed after award"
229- else "Unexpected error"
230- throw(txt)
231- }
232- else throw("You cannot push before the reward is unlocked, no reward has been detected yet")
233- else throw("Your push in troikan token, should be Higher than last Highest Push")
234- else throw("To be able to participate in Pushing for the reward you need to Stake ASIMIs in the dApp")
235- else throw("You have to wait 10min before you can make a new Push")
236- else throw(("Your Push dot not comply one of the following conditions: " + "1. Positive Value for Push in Troikan Toke
237- 2. Must Staked ASIMI Token for a minimum of week "))
238- }
239- else throw((("Can deposit only positive amounts of Troikan Token, or Check your Wallet balance in Troika, you should have more than " + toString(HighestPushValue)) + " to push"))
240- else throw("You do not have enough Troikan Tokens in your Wallet Balance, Please Harvest if you have earned Troikan wallet or transfer to your wallet necessary Troikan amount !")
231+ let UserMaturityValue = match getInteger(this, UserMaturity) {
232+ case a: Int =>
233+ a
234+ case _ =>
235+ height
236+ }
237+ let LastGyneaBlockValue = match getInteger(this, LastGyneaBlock) {
238+ case a: Int =>
239+ a
240+ case _ =>
241+ 0
242+ }
243+ if (((minJoinWeeks * Week) > (height - UserMaturityValue)))
244+ then throw((((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks") + " Your account maturity is: ") + toString(((height - UserMaturityValue) / Week))))
245+ else if (((((MinAmount * 100000000) * (height - UserMaturityValue)) / Week) > amount))
246+ then throw(((("Your Account Maturity is: " + toString(((height - UserMaturityValue) / Week))) + " Weeks. You should have deposited at least: ") + toString((MinAmount * ((height - UserMaturityValue) / Week)))))
247+ else if (((TimeGynea * Day) > ((height - LastGyneaBlockValue) / Day)))
248+ then throw((("You cannot claim the reward before: " + toString((TimeGynea - ((height - LastGyneaBlockValue) / Day)))) + " days"))
249+ else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastGyneaBlock"), height), ScriptTransfer(i.caller, (GyneaReward * 100000000), Gynea)]
241250 }
242251
243252
244253
245254 @Callable(i)
246-func Stake () = {
247- let WaitTime = (1440 * 1)
248- let pmt = if ((size(i.payments) == 1))
249- then i.payments[0]
250- else throw("Attached payment is required")
251- if (if ((pmt.amount > 0))
252- then (pmt.assetId == StakedToken)
253- else false)
254- then {
255- let GovernTokenSmartContractBalance = assetBalance(this, GovernToken)
256- let UserAPY = (toBase58String(i.caller.bytes) + "_APY")
257- let UserPush = (toBase58String(i.caller.bytes) + "_Push")
258- let UserStakedTokenKey = (toBase58String(i.caller.bytes) + "_Staking")
259- let UserGovernTokenKey = (toBase58String(i.caller.bytes) + "_Earnings")
260- let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock")
261- let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions")
262- let AddressHeight = (toBase58String(i.caller.bytes) + "_PrizeHeight")
263- let UserWeekEarnings = (toBase58String(i.caller.bytes) + "_WeekEarning")
264- let UserStakeTransactions = match getInteger(this, UserStakeTransactionsKey) {
265- case a: Int =>
266- a
267- case _ =>
268- 0
269- }
270- let MaxDepositer = getStringValue(this, "MaxDepositer")
271- let MaxDepositBlock = match getInteger(this, "MaxDepositBlock") {
272- case a: Int =>
273- a
274- case _ =>
275- 0
276- }
277- let MaxDeposit = match getInteger(this, "MaxDeposit") {
278- case a: Int =>
279- a
280- case _ =>
281- 0
282- }
283- let MaxDepositerValue = if ((pmt.amount > MaxDeposit))
284- then toBase58String(i.caller.bytes)
285- else MaxDepositer
286- let MaxDepositValue = if ((pmt.amount > MaxDeposit))
287- then pmt.amount
288- else MaxDeposit
289- let MaxDepositBlockValue = if ((pmt.amount > MaxDeposit))
290- then height
291- else MaxDepositBlock
292- let UserPushValue = match getInteger(this, UserPush) {
293- case a: Int =>
294- a
295- case _ =>
296- 0
297- }
298- let UserLastStakeBlockValue = match getInteger(this, UserLastStakeBlock) {
299- case a: Int =>
300- a
301- case _ =>
302- 0
303- }
304- let UserLastStakeBlockNewValue = if ((UserLastStakeBlockValue == 0))
305- then height
306- else UserLastStakeBlockValue
307- let NewUserStakeTransactions = (UserStakeTransactions + 1)
308- let currentAmountStakedToken = match getInteger(this, UserStakedTokenKey) {
309- case a: Int =>
310- a
311- case _ =>
312- 0
313- }
314- let newAmountStakedToken = (currentAmountStakedToken + pmt.amount)
315- let ContractWalletStakeBalance = assetBalance(this, StakedToken)
316- let StakeBalance = match getInteger(this, "StakeBalance") {
317- case a: Int =>
318- a
319- case _ =>
320- 0
321- }
322- let StakeBalanceAmount = (StakeBalance + pmt.amount)
323- let PrizeAmount = match getInteger(this, "FundBox") {
324- case a: Int =>
325- a
326- case _ =>
327- 0
328- }
329- let UserWeekEarningsValue = match getInteger(this, UserWeekEarnings) {
330- case a: Int =>
331- a
332- case _ =>
333- 0
334- }
335- let currentAmountGovernToken = match getInteger(this, UserGovernTokenKey) {
336- case a: Int =>
337- a
338- case _ =>
339- 0
340- }
341- let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
342- case a: Int =>
343- a
344- case _ =>
345- 0
346- }
347- let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
348- then (PrizeAmount == 0)
349- else false)
350- then 0
351- else if (if ((HeightTransactFundBox == 0))
352- then (PrizeAmount != 0)
353- else false)
354- then height
355- else if (if ((HeightTransactFundBox != 0))
356- then (PrizeAmount != 0)
357- else false)
358- then HeightTransactFundBox
359- else 0
360- let ActualDelay = match getInteger(this, "Delay") {
361- case a: Int =>
362- a
363- case _ =>
364- 0
365- }
366- let HighestPushValue = match getInteger(this, "HighestPush") {
367- case a: Int =>
368- a
369- case _ =>
370- 0
371- }
372- let HighestPushAddress = getStringValue(this, "HighestPushAddress")
373- let HighestPushAddressValue = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
374- then (HighestPushValue > 0)
375- else false)
376- then ""
377- else HighestPushAddress
378- let PrizeHeightValueNew = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
379- then (HighestPushValue > 0)
380- else false)
381- then height
382- else PrizeHeightValue
383- if ((100000000 > GovernTokenSmartContractBalance))
384- then throw("No enough GovernToken In Contract, Please deposit GovernTokens")
385- else {
386- let Reward = if ((StakeBalance == 0))
387- then 10000
388- else if ((NewUserStakeTransactions > 10))
389- then ((10000 * NewUserStakeTransactions) * (1 + (newAmountStakedToken / StakeBalance)))
390- else (10000 * (1 + (newAmountStakedToken / StakeBalance)))
391- let UserAPYValue = if ((currentAmountGovernToken > 0))
392- then ((100 * Reward) / currentAmountGovernToken)
393- else 0
394- let newAmountGovernToken = (currentAmountGovernToken + Reward)
395-[IntegerEntry(UserGovernTokenKey, newAmountGovernToken), IntegerEntry(UserStakedTokenKey, newAmountStakedToken), IntegerEntry(UserStakeTransactionsKey, NewUserStakeTransactions), IntegerEntry("StakeBalance", StakeBalanceAmount), IntegerEntry("PrizeHeight", PrizeHeightValueNew), IntegerEntry(UserAPY, UserAPYValue), IntegerEntry(UserLastStakeBlock, UserLastStakeBlockNewValue), IntegerEntry(UserPush, UserPushValue), StringEntry("MaxDepositer", MaxDepositerValue), IntegerEntry("MaxDeposit", MaxDepositValue), IntegerEntry("MaxDepositBlock", MaxDepositBlockValue), StringEntry("HighestPushAddress", HighestPushAddressValue), IntegerEntry(UserWeekEarnings, UserWeekEarningsValue), ScriptTransfer(i.caller, Reward, GovernToken)]
396- }
397- }
398- else throw("Can deposit only StakeToken")
255+func RequestDental () = {
256+ let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
257+ let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
258+ let LastDentalBlock = (toBase58String(i.caller.bytes) + "_LastDentalBlock")
259+ let amount = match getInteger(this, UserDeposit) {
260+ case a: Int =>
261+ a
262+ case _ =>
263+ 0
264+ }
265+ let UserMaturityValue = match getInteger(this, UserMaturity) {
266+ case a: Int =>
267+ a
268+ case _ =>
269+ height
270+ }
271+ let LastDentalBlockValue = match getInteger(this, LastDentalBlock) {
272+ case a: Int =>
273+ a
274+ case _ =>
275+ 0
276+ }
277+ if (((minJoinWeeks * Week) > (height - UserMaturityValue)))
278+ then throw((((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks") + " Your account maturity is: ") + toString(((height - UserMaturityValue) / Week))))
279+ else if (((((MinAmount * 100000000) * (height - UserMaturityValue)) / Week) > amount))
280+ then throw(((("Your Account Maturity is: " + toString(((height - UserMaturityValue) / Week))) + " Weeks. You should have deposited at least: ") + toString((MinAmount * ((height - UserMaturityValue) / Week)))))
281+ else if (((TimeDental * Day) > ((height - LastDentalBlockValue) / Day)))
282+ then throw((("You cannot claim the reward before: " + toString((TimeDental - ((height - LastDentalBlockValue) / Day)))) + " days"))
283+ else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastDentalBlock"), height), ScriptTransfer(i.caller, (DentalReward * 100000000), Dental)]
399284 }
400285
401286
402287
403288 @Callable(i)
404-func WithdrawStakedFunds (amount) = {
405- let WaitTime = (1440 * 1)
406- let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock")
407- let UserStakedTokenKey = (toBase58String(i.caller.bytes) + "_Staking")
408- let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
409- let ContractWalletStakeBalance = assetBalance(this, StakedToken)
410- let UserLastStakeBlockValue = match getInteger(this, UserLastStakeBlock) {
289+func RequestEmergency () = {
290+ let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
291+ let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
292+ let LastEmergencyBlock = (toBase58String(i.caller.bytes) + "_LastEmergencyBlock")
293+ let amount = match getInteger(this, UserDeposit) {
411294 case a: Int =>
412295 a
413296 case _ =>
414297 0
415298 }
416- let StakeBalance = match getInteger(this, "StakeBalance") {
299+ let UserMaturityValue = match getInteger(this, UserMaturity) {
300+ case a: Int =>
301+ a
302+ case _ =>
303+ height
304+ }
305+ let LastEmergencyBlockValue = match getInteger(this, LastEmergencyBlock) {
417306 case a: Int =>
418307 a
419308 case _ =>
420309 0
421310 }
422- let PrizeAmount = match getInteger(this, "FundBox") {
423- case a: Int =>
424- a
425- case _ =>
426- 0
427- }
428- let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
429- case a: Int =>
430- a
431- case _ =>
432- 0
433- }
434- let ActualDelay = match getInteger(this, "Delay") {
435- case a: Int =>
436- a
437- case _ =>
438- 0
439- }
440- let HighestPushValue = match getInteger(this, "HighestPush") {
441- case a: Int =>
442- a
443- case _ =>
444- 0
445- }
446- let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
447- then (PrizeAmount == 0)
448- else false)
449- then 0
450- else if (if ((HeightTransactFundBox == 0))
451- then (PrizeAmount != 0)
452- else false)
453- then height
454- else if (if ((HeightTransactFundBox != 0))
455- then (PrizeAmount != 0)
456- else false)
457- then HeightTransactFundBox
458- else 0
459- let HighestPushAddress = getStringValue(this, "HighestPushAddress")
460- let HighestPushAddressValue = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
461- then (HighestPushValue > 0)
462- else false)
463- then ""
464- else HighestPushAddress
465- let PrizeHeightValueNew = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
466- then (HighestPushValue > 0)
467- else false)
468- then height
469- else PrizeHeightValue
470- let currentKey = toBase58String(i.caller.bytes)
471- let currentAmount = match getInteger(this, UserStakedTokenKey) {
472- case a: Int =>
473- a
474- case _ =>
475- 0
476- }
477- let newAmount = (currentAmount - amount)
478- let StakeBalanceAmount = (StakeBalance - amount)
479- let UserLastStakeBlockNewValue = if ((StakeBalanceAmount == 0))
480- then 0
481- else UserLastStakeBlockValue
482- if ((0 > amount))
483- then throw("Can't withdraw negative amount")
484- else if ((0 > newAmount))
485- then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((currentAmount / 100000000))))
486- else if ((100000000 > assetBalance(this, GovernToken)))
487- then throw(("Not enough Troika In Contract: " + toString((assetBalance(this, GovernToken) / 100000000))))
488- else [IntegerEntry(UserGovernTokenKey, 100000000), IntegerEntry(UserStakedTokenKey, newAmount), IntegerEntry("StakeBalance", StakeBalanceAmount), IntegerEntry("PrizeHeight", PrizeHeightValueNew), IntegerEntry(UserLastStakeBlock, UserLastStakeBlockNewValue), StringEntry("HighestPushAddress", HighestPushAddressValue), ScriptTransfer(i.caller, 100000000, GovernToken), ScriptTransfer(i.caller, amount, StakedToken)]
489- }
490-
491-
492-
493-@Callable(i)
494-func WithdrawBigStakeReward () = {
495- let WaitTime = (1440 * 1)
496- let LastBigStakerRewardBlock = (toBase58String(i.caller.bytes) + "_LastBigStakerRewardBlock")
497- let BigStakerReward = (toBase58String(i.caller.bytes) + "_BigStaker")
498- let UserGovernTokenKey = (toBase58String(i.caller.bytes) + "_Earnings")
499- let LimiWithdrawReward = 10
500- let UserGovernTokenAmount = match getInteger(this, UserGovernTokenKey) {
501- case a: Int =>
502- a
503- case _ =>
504- 0
505- }
506- let LastBigStakerRewardBlockValue = match getInteger(this, LastBigStakerRewardBlock) {
507- case a: Int =>
508- a
509- case _ =>
510- 0
511- }
512- let BigStakerRewardTotalValue = match getInteger(this, "BigStakerRewardTotal") {
513- case a: Int =>
514- a
515- case _ =>
516- 0
517- }
518- let PrizeAmount = match getInteger(this, "FundBox") {
519- case a: Int =>
520- a
521- case _ =>
522- 0
523- }
524- let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
525- case a: Int =>
526- a
527- case _ =>
528- 0
529- }
530- let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
531- then (PrizeAmount == 0)
532- else false)
533- then 0
534- else if (if ((HeightTransactFundBox == 0))
535- then (PrizeAmount != 0)
536- else false)
537- then height
538- else if (if ((HeightTransactFundBox != 0))
539- then (PrizeAmount != 0)
540- else false)
541- then HeightTransactFundBox
542- else 0
543- let ActualDelay = match getInteger(this, "Delay") {
544- case a: Int =>
545- a
546- case _ =>
547- 0
548- }
549- let HighestPushValue = match getInteger(this, "HighestPush") {
550- case a: Int =>
551- a
552- case _ =>
553- 0
554- }
555- let HighestPushAddress = getStringValue(this, "HighestPushAddress")
556- let HighestPushAddressValue = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
557- then (HighestPushValue > 0)
558- else false)
559- then ""
560- else HighestPushAddress
561- let PrizeHeightValueNew = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
562- then (HighestPushValue > 0)
563- else false)
564- then height
565- else PrizeHeightValue
566- let currentKey = toBase58String(i.caller.bytes)
567- let amount = match getInteger(this, BigStakerReward) {
568- case a: Int =>
569- a
570- case _ =>
571- 0
572- }
573- let StakeBalanceAmount = (BigStakerRewardTotalValue - amount)
574- let BigStakerRewardTax = if ((0 > ((UserGovernTokenAmount / 1000) * (1000 - ((1000 * (height - LastBigStakerRewardBlockValue)) / (LimiWithdrawReward * 1440))))))
575- then (1000 * 100000000)
576- else ((UserGovernTokenAmount / 1000) * (1000 - ((1000 * (height - LastBigStakerRewardBlockValue)) / (LimiWithdrawReward * 1440))))
577- if ((0 > amount))
578- then throw(((("Can't withdraw negative amount " + toString((UserGovernTokenAmount - (1000 * 100000000)))) + " ... ") + toString(amount)))
579- else if (if (if (((1000 * 100000000) > UserGovernTokenAmount))
580- then true
581- else (1 > amount))
582- then true
583- else (0 > (UserGovernTokenAmount - BigStakerRewardTax)))
584- then throw(("No ASIMI reward available, or Not enough Earned Troikan Tokens to do transaction, you have: " + toString((UserGovernTokenAmount / 100000000))))
585- else if ((StakeBalanceAmount > 0))
586- then [IntegerEntry(BigStakerReward, 0), IntegerEntry("BigStakerRewardTotal", StakeBalanceAmount), IntegerEntry(UserGovernTokenKey, (UserGovernTokenAmount - BigStakerRewardTax)), IntegerEntry("PrizeHeight", PrizeHeightValue), IntegerEntry(LastBigStakerRewardBlock, height), StringEntry("HighestPushAddress", HighestPushAddressValue), ScriptTransfer(i.caller, amount, StakedToken)]
587- else throw("Balance Error, Total Big Stakers cannot be negative, Operation won't be authorized")
588- }
589-
590-
591-
592-@Callable(i)
593-func HarvestGovernToiken (amount) = {
594- let ContractWalletStakeBalance = assetBalance(this, StakedToken)
595- let UserGovernTokenKey = (toBase58String(i.caller.bytes) + "_Earnings")
596- let StakeBalance = match getInteger(this, "StakeBalance") {
597- case a: Int =>
598- a
599- case _ =>
600- 0
601- }
602- let PrizeAmount = match getInteger(this, "FundBox") {
603- case a: Int =>
604- a
605- case _ =>
606- 0
607- }
608- let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
609- case a: Int =>
610- a
611- case _ =>
612- 0
613- }
614- let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
615- then (PrizeAmount == 0)
616- else false)
617- then 0
618- else if (if ((HeightTransactFundBox == 0))
619- then (PrizeAmount != 0)
620- else false)
621- then height
622- else if (if ((HeightTransactFundBox != 0))
623- then (PrizeAmount != 0)
624- else false)
625- then HeightTransactFundBox
626- else 0
627- let currentKey = toBase58String(i.caller.bytes)
628- let currentAmount = match getInteger(this, UserGovernTokenKey) {
629- case a: Int =>
630- a
631- case _ =>
632- 0
633- }
634- let newAmount = (currentAmount - amount)
635- if ((0 > amount))
636- then throw("Can't withdraw negative amount")
637- else if ((0 > newAmount))
638- then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((currentAmount / 100000000))))
639- else [IntegerEntry(UserGovernTokenKey, newAmount), IntegerEntry("PrizeHeight", PrizeHeightValue), ScriptTransfer(i.caller, amount, GovernToken)]
640- }
641-
642-
643-
644-@Callable(i)
645-func delayprize () = {
646- let DelayDays = (1440 * 1)
647- let WaitTime = (1440 * 1)
648- let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
649- let UserWalletSGovernBalance = assetBalance(Address(i.caller.bytes), GovernToken)
650- let ContractWalletStakeBalance = assetBalance(this, StakedToken)
651- let StakeBalance = match getInteger(this, "StakeBalance") {
652- case a: Int =>
653- a
654- case _ =>
655- 0
656- }
657- let PrizeAmount = match getInteger(this, "FundBox") {
658- case a: Int =>
659- a
660- case _ =>
661- 0
662- }
663- let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
664- case a: Int =>
665- a
666- case _ =>
667- 0
668- }
669- let ActualDelay = match getInteger(this, "Delay") {
670- case a: Int =>
671- a
672- case _ =>
673- 0
674- }
675- let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
676- then (PrizeAmount == 0)
677- else false)
678- then 0
679- else if (if ((HeightTransactFundBox == 0))
680- then (PrizeAmount != 0)
681- else false)
682- then height
683- else if (if ((HeightTransactFundBox != 0))
684- then (PrizeAmount != 0)
685- else false)
686- then HeightTransactFundBox
687- else 0
688- let HighestPushValue = match getInteger(this, "HighestPush") {
689- case a: Int =>
690- a
691- case _ =>
692- 0
693- }
694- let HighestPushAddress = getStringValue(this, "HighestPushAddress")
695- let HighestPushAddressValue = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
696- then (HighestPushValue > 0)
697- else false)
698- then ""
699- else HighestPushAddress
700- let PrizeHeightValueNew = if (if ((height > ((PrizeHeightValue + ActualDelay) + WaitTime)))
701- then (HighestPushValue > 0)
702- else false)
703- then height
704- else PrizeHeightValue
705- let ActualDelayCost = match getInteger(this, "DelayCost") {
706- case a: Int =>
707- a
708- case _ =>
709- 10
710- }
711- let pmt = if ((size(i.payments) == 1))
712- then i.payments[0]
713- else throw("Attached payment is required")
714- let DevBoxBalance = match getInteger(this, "DevBox") {
715- case a: Int =>
716- a
717- case _ =>
718- 0
719- }
720- if (if (isDefined(pmt.assetId))
721- then (pmt.assetId == GovernToken)
722- else false)
723- then if ((PrizeAmount > 0))
724- then {
725- let UserGovernTokenAmount = pmt.amount
726- let DevBoxAmount = (DevBoxBalance + ((pmt.amount * 5) / 1000))
727- let NewDelayCost = if ((ActualDelayCost == 0))
728- then 1000000000
729- else (2 * ActualDelayCost)
730- if ((UserGovernTokenAmount >= NewDelayCost))
731- then {
732- let NewDelay = (ActualDelay + DelayDays)
733-[IntegerEntry("Delay", NewDelay), IntegerEntry("DelayCost", NewDelayCost), IntegerEntry("PrizeHeight", PrizeHeightValueNew), IntegerEntry("DevBox", DevBoxAmount), StringEntry("HighestPushAddress", HighestPushAddressValue)]
734- }
735- else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString(NewDelayCost)) + "TROIKAs"))
736- }
737- else throw("You cannot delay the reward before reward is received! Please wait until a reward is available")
738- else throw("Can Use only Troika Token to Delay Reward")
739- }
740-
741-
742-
743-@Callable(i)
744-func ClaimPrize () = {
745- let UserStakedTokenKey = (toBase58String(i.caller.bytes) + "_Staking")
746- let UserPush = (toBase58String(i.caller.bytes) + "_Push")
747- let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock")
748- let minStakeBlock = (1440 * 7)
749- let minref = 3
750- let ContractGovTokenBalance = assetBalance(this, GovernToken)
751- let ContractWalletStakeBalance = assetBalance(this, StakedToken)
752- let StakeBalance = match getInteger(this, "StakeBalance") {
753- case a: Int =>
754- a
755- case _ =>
756- 0
757- }
758- let PrizeAmount = match getInteger(this, "FundBox") {
759- case a: Int =>
760- a
761- case _ =>
762- 0
763- }
764- let UserPushValue = match getInteger(this, UserPush) {
765- case a: Int =>
766- a
767- case _ =>
768- 0
769- }
770- let UserLastStakeBlockValue = match getInteger(this, UserLastStakeBlock) {
771- case a: Int =>
772- a
773- case _ =>
774- 0
775- }
776- let UserStakedTokenAmount = match getInteger(this, UserStakedTokenKey) {
777- case a: Int =>
778- a
779- case _ =>
780- 0
781- }
782- let ActualDelay = match getInteger(this, "Delay") {
783- case a: Int =>
784- a
785- case _ =>
786- 0
787- }
788- let PrizeWinner = getStringValue(this, "HighestPushAddress")
789- let PrizeHeight = match getInteger(this, "PrizeHeight") {
790- case a: Int =>
791- a
792- case _ =>
793- 0
794- }
795- let HighestPushValue = match getInteger(this, "HighestPush") {
796- case a: Int =>
797- a
798- case _ =>
799- 0
800- }
801- let UserRefsNum = (toBase58String(i.caller.bytes) + "_refs")
802- let UserRefsNumValue = match getInteger(this, UserRefsNum) {
803- case a: Int =>
804- a
805- case _ =>
806- 0
807- }
808- if (if ((PrizeAmount == 0))
809- then true
810- else (10000000000 > ContractGovTokenBalance))
811- then throw("No prize to Claim or Not enough Govern Token en Contract (Min 100 Troika)")
812- else if ((toBase58String(i.caller.bytes) != PrizeWinner))
813- then throw("You are not the winner hence cannot claim the reward ")
814- else if (if ((100000000 > UserStakedTokenAmount))
815- then (minStakeBlock > UserLastStakeBlockValue)
816- else false)
817- then throw("You have to Stake ASIMI Token to claim reward ")
818- else if (if ((height > (PrizeHeight + ActualDelay)))
819- then (UserPushValue >= HighestPushValue)
820- else false)
821- then if ((UserRefsNumValue >= minref))
822- then [IntegerEntry(PrizeWinner, PrizeAmount), IntegerEntry("FundBox", 0), IntegerEntry("HighestPush", 0), IntegerEntry(UserPush, 0), StringEntry("HighestPushAddress", ""), IntegerEntry("PrizeHeight", 0), IntegerEntry("Delay", 0), IntegerEntry("DelayCost", 0), StringEntry("LastWinner", PrizeWinner), IntegerEntry("LastPrize", PrizeAmount), ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 1000000000, GovernToken)]
823- else throw((("You have to have " + toString(minref)) + " referrals already staking for a minimum of 10 days to Claim the prize"))
824- else throw("You have to be the user with the highest Push and wait till countown is finished, to claim Reward")
825- }
826-
827-
828-
829-@Callable(i)
830-func Addmentor (Mentor) = {
831- let UserMentorAddress = (toBase58String(i.caller.bytes) + "_Mentor")
832- if ((Mentor != ""))
833- then [StringEntry(UserMentorAddress, Mentor)]
834- else throw("Mentor's Address cannot be empty")
835- }
836-
837-
838-
839-@Callable(i)
840-func GetLikesPackage (TwitterUserId,TwittId) = {
841- let pmt = if ((size(i.payments) == 2))
842- then i.payments[0]
843- else throw("Attached payment is required")
844- if (if ((i.payments[0].assetId == StakedToken))
845- then (i.payments[1].assetId == GovernToken)
846- else false)
847- then if ((i.payments[0].amount >= LikePackageASIMICost))
848- then if ((i.payments[1].amount >= LikePackageTROIKANCost))
849- then [IntegerEntry((toString(TwitterUserId) + "_Twitt2Like"), TwittId)]
850- else throw(("TROIKAN Amount should be :" + toString((LikePackageASIMICost / 100000000))))
851- else throw(("ASIMI Amount should be :" + toString((LikePackageTROIKANCost / 100000000))))
852- else throw("Payments should be both ASIMI and TROIKAN tokens")
311+ if (((minJoinWeeks * Week) > (height - UserMaturityValue)))
312+ then throw((((("You should at least be a member of " + toString(minJoinWeeks)) + " Weeks") + " Your account maturity is: ") + toString(((height - UserMaturityValue) / Week))))
313+ else if (((((MinAmount * 100000000) * (height - UserMaturityValue)) / Week) > amount))
314+ then throw(((("Your Account Maturity is: " + toString(((height - UserMaturityValue) / Week))) + " Weeks. You should have deposited at least: ") + toString((MinAmount * ((height - UserMaturityValue) / Week)))))
315+ else if (((TimeEmergency * Day) > ((height - LastEmergencyBlockValue) / Day)))
316+ then throw((("You cannot claim the reward before: " + toString((TimeEmergency - ((height - LastEmergencyBlockValue) / Day)))) + " days"))
317+ else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastEmergencyBlock"), height), ScriptTransfer(i.caller, (EmergencyReward * 100000000), Emergency)]
853318 }
854319
855320

github/deemru/w8io/169f3d6 
80.49 ms