tx · BhSajcoDX9txW5hB9j3LDxpMYYE2swUEJ9B6QfQtt7Hb 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01900000 Waves 2022.09.24 11:29 [2242995] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{ "type": 13, "id": "BhSajcoDX9txW5hB9j3LDxpMYYE2swUEJ9B6QfQtt7Hb", "fee": 1900000, "feeAssetId": null, "timestamp": 1664008251128, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "DA2d3PYLU2SxqZa8nFMPbiCkPysBTszXjuZRrQsxMR8tg9eBn8n8jqiVmyqMgdhcC9RvpACLECxfyV4Cru37FFF" ], "script": "base64:AAIEAAAAAAAAAA8IAhIDCgEBEgASBAoCAQEAAAAKAAAAAAtDT0RFQXNzZXRJRAEAAAAgw7tamQ+/dXoyJwRZ/Fb5N4jdONzqCnQ4LyXft9O80qAAAAAAC3hVU0RBc3NldElEAQAAACDQu787dB6wjEoXRsYU1VtSEiSLVpFEqrKAkPqKytHJdwAAAAALU3Rha2luZ0RhcHABAAAAIP1BmwSx4bIxRW9G92Fp+LHjR7RGmJ4CHLHEY95r1tU/AAAAABJUcmVhc3VyeUZlZUFkZHJlc3MBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAAtTdGFydEhlaWdodAAAAAAAABw6kAAAAAAPbWluaW11bWxvY2tkYXlzCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAABJNaW5pbXVtX0RheXNfUmFuZ2UAAAAAD21heGltdW1sb2NrZGF5cwkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAASTWF4aW11bV9EYXlzX1JhbmdlAAAAAAZvbmVkYXkAAAA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mlnaHRzAgAAACEgaGFzIHJpZ2h0cyB0byBjaGFuZ2UgRGF5cyBSYW5nZS4DCQAAZgAAAAIFAAAADE1pbmltdW1fZGF5cwUAAAASTWluaW11bV9EYXlzX1JhbmdlCQAAAgAAAAECAAAAPE1pbmltdW0gZGF5cyByYW5nZSBtdXN0IGJlIG1vcmUgdGhhbiA2IGFuZCBpbiBiZXR3ZWVuIDctMjAwLgMJAABmAAAAAgUAAAASTWF4aW11bV9EYXlzX1JhbmdlBQAAAAxNYXhpbXVtX2RheXMJAAACAAAAAQIAAAAoTWF4aW11bSBkYXlzIHJhbmdlIGNhbid0IGV4Y2VlZCB0aGUgMjAwLgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAASTWluaW11bV9EYXlzX1JhbmdlBQAAABJNaW5pbXVtX0RheXNfUmFuZ2UJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAEk1heGltdW1fRGF5c19SYW5nZQUAAAASTWF4aW11bV9EYXlzX1JhbmdlBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQWixu4=", "height": 2242995, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AHdaMetRytcFTtV1woAbXUsfeWEo51PpWvcXrwQ5HPW Next: 8AwB9SWCVRH4UQcgTE6gnC8sNRzfWCuptiLvdQKjaKpm Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let CODEAssetID = base58' | |
4 | + | let CODEAssetID = base58'EB4CUQH4fHzzQt9YjcHtA6T7uosHNH9RnQKHgBdZHPCB' | |
5 | 5 | ||
6 | - | let StakingDapp = base58'C246qxhuyo9DBk1pjMzEQSVAWmiqYupG2swGkxTeAvLV' | |
6 | + | let xUSDAssetID = base58'F3or3Nn6NTcSkRvzqtoCoyuCfdqNSuP8rjLboS2AemPL' | |
7 | + | ||
8 | + | let StakingDapp = base58'J3cAptAPQxVqpEz6Rch57JeKpbns48s1a6HoeQG9aX4J' | |
7 | 9 | ||
8 | 10 | let TreasuryFeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' | |
9 | 11 | ||
10 | - | let | |
12 | + | let StartHeight = 1850000 | |
11 | 13 | ||
12 | - | let | |
14 | + | let minimumlockdays = getIntegerValue(this, "Minimum_Days_Range") | |
13 | 15 | ||
14 | - | let TreasuryFee = 9 | |
15 | - | ||
16 | - | let useramount = ((1000 - TreasuryFee) - devFee) | |
17 | - | ||
18 | - | let StartHeight = 1750000 | |
19 | - | ||
20 | - | let minimumlockdays = 6 | |
21 | - | ||
22 | - | let maximumlockdays = 7 | |
16 | + | let maximumlockdays = getIntegerValue(this, "Maximum_Days_Range") | |
23 | 17 | ||
24 | 18 | let oneday = 1440 | |
25 | 19 | ||
100 | 94 | let fetchUserStakeAmt = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_Amount_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
101 | 95 | let FlatfeePercent = 500 | |
102 | 96 | let FeesPercent = ((MaxFee - (fraction(fetchUserStakeAmt, 1000000, MaxA4AAmt) * 19)) / 10000) | |
97 | + | let ClaimFee = 51800000 | |
98 | + | let pmt = value(i.payments[0]) | |
103 | 99 | let checkdepositvalue = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)) | |
104 | 100 | let userFeeAmt = (((getIntegerValue(this, ("Rewards_Of_" + currentKey)) - checkdepositvalue) * FeesPercent) / 10000) | |
105 | 101 | let userFlatFeeAmt = (((getIntegerValue(this, ("Rewards_Of_" + currentKey)) - checkdepositvalue) * FlatfeePercent) / 10000) | |
127 | 123 | let fetchuserstakeheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_height_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
128 | 124 | let fetchusermatureheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Total_Lock_Blocks_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
129 | 125 | let gapofheight = (fetchusermatureheight - fetchuserstakeheight) | |
130 | - | if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height)) | |
131 | - | then throw((((("Your " + toString(getIntegerValue(this, ("Rewards_Of_" + currentKey)))) + "/10^8 CODE are Still Maturing. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))) + " blocks.")) | |
132 | - | else if ((checkdepositvalue == 0)) | |
133 | - | then throw("You Have Already Withdraw your CODE Amount.") | |
134 | - | else if ((gapofheight != 129600)) | |
135 | - | then throw("You are Not Eligible to Withdraw CODE. It need minimum 90 Days Staking at A4A DApp. Probably you already have Claimed Your Stake or you Overwrite the Smart Contract with less than 90 days.") | |
136 | - | else if ((fetchUserStakeAmt >= 1199999999999)) | |
137 | - | then [IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Total_CODE_Claimed:", totalrewardclaimed), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Fee_%_Charge", FlatfeePercent), IntegerEntry("Fee_Amount", userFlatFeeAmt), Reissue(CODEAssetID, getIntegerValue(this, ("Rewards_Of_" + currentKey)), true), ScriptTransfer(i.caller, (getIntegerValue(this, ("Rewards_Of_" + currentKey)) - userFlatFeeAmt), CODEAssetID), ScriptTransfer(addressFromPublicKey(TreasuryFeeAddress), userFlatFeeAmt, CODEAssetID), IntegerEntry(("No_Of_Deposits_" + currentKey), 0), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Rewards_Of_" + currentKey), 0), StringEntry("message", "<h1>CODE UnStaked Successfully!</h1><br>")] | |
138 | - | else [IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Total_CODE_Claimed:", totalrewardclaimed), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Fee_%_Charge", FeesPercent), IntegerEntry("Fee_Amount", userFeeAmt), Reissue(CODEAssetID, getIntegerValue(this, ("Rewards_Of_" + currentKey)), true), ScriptTransfer(i.caller, (getIntegerValue(this, ("Rewards_Of_" + currentKey)) - userFeeAmt), CODEAssetID), ScriptTransfer(addressFromPublicKey(TreasuryFeeAddress), userFeeAmt, CODEAssetID), IntegerEntry(("No_Of_Deposits_" + currentKey), 0), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Rewards_Of_" + currentKey), 0), StringEntry("message", "<h1>CODE UnStaked Successfully!</h1><br>")] | |
126 | + | if ((pmt.assetId != xUSDAssetID)) | |
127 | + | then throw((("Wrong Asset Attached for Payment, please Attach 0.518 xUSD (" + toBase58String(xUSDAssetID)) + ")")) | |
128 | + | else if ((pmt.amount != ClaimFee)) | |
129 | + | then throw("Please Attach Exact 0.518 xUSD.") | |
130 | + | else if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height)) | |
131 | + | then throw((((("Your " + toString(getIntegerValue(this, ("Rewards_Of_" + currentKey)))) + "/10^8 CODE are Still Maturing. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))) + " blocks.")) | |
132 | + | else if ((checkdepositvalue == 0)) | |
133 | + | then throw("You Have Already Withdraw your CODE Amount.") | |
134 | + | else if ((gapofheight != 129600)) | |
135 | + | then throw("You are Not Eligible to Withdraw CODE. It need minimum 90 Days Staking at A4A DApp. Probably you already have Claimed Your Stake or you Overwrite the Smart Contract with less than 90 days.") | |
136 | + | else if ((fetchUserStakeAmt >= 1199999999999)) | |
137 | + | then [IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Total_CODE_Claimed:", totalrewardclaimed), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Fee_%_Charge", FlatfeePercent), IntegerEntry("Fee_Amount", userFlatFeeAmt), Reissue(CODEAssetID, getIntegerValue(this, ("Rewards_Of_" + currentKey)), true), ScriptTransfer(i.caller, (getIntegerValue(this, ("Rewards_Of_" + currentKey)) - userFlatFeeAmt), CODEAssetID), ScriptTransfer(addressFromPublicKey(TreasuryFeeAddress), userFlatFeeAmt, CODEAssetID), IntegerEntry(("No_Of_Deposits_" + currentKey), 0), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Rewards_Of_" + currentKey), 0), StringEntry("message", "<h1>CODE UnStaked Successfully!</h1><br>")] | |
138 | + | else [IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Total_CODE_Claimed:", totalrewardclaimed), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Fee_%_Charge", FeesPercent), IntegerEntry("Fee_Amount", userFeeAmt), Reissue(CODEAssetID, getIntegerValue(this, ("Rewards_Of_" + currentKey)), true), ScriptTransfer(i.caller, (getIntegerValue(this, ("Rewards_Of_" + currentKey)) - userFeeAmt), CODEAssetID), ScriptTransfer(addressFromPublicKey(TreasuryFeeAddress), userFeeAmt, CODEAssetID), IntegerEntry(("No_Of_Deposits_" + currentKey), 0), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Rewards_Of_" + currentKey), 0), StringEntry("message", "<h1>CODE UnStaked Successfully!</h1><br>")] | |
139 | + | } | |
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | @Callable(i) | |
144 | + | func SetDaysRange (Minimum_Days_Range,Maximum_Days_Range) = { | |
145 | + | let calleraddress = toBase58String(i.caller.bytes) | |
146 | + | let adminrights = getStringValue(this, "DApp_Admin_Rights") | |
147 | + | let Minimum_days = 7 | |
148 | + | let Maximum_days = 200 | |
149 | + | if ((adminrights != calleraddress)) | |
150 | + | then throw((("I know You are not An Admin. Only " + adminrights) + " has rights to change Days Range.")) | |
151 | + | else if ((Minimum_days > Minimum_Days_Range)) | |
152 | + | then throw("Minimum days range must be more than 6 and in between 7-200.") | |
153 | + | else if ((Maximum_Days_Range > Maximum_days)) | |
154 | + | then throw("Maximum days range can't exceed the 200.") | |
155 | + | else [IntegerEntry("Minimum_Days_Range", Minimum_Days_Range), IntegerEntry("Maximum_Days_Range", Maximum_Days_Range)] | |
139 | 156 | } | |
140 | 157 | ||
141 | 158 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let CODEAssetID = base58' | |
4 | + | let CODEAssetID = base58'EB4CUQH4fHzzQt9YjcHtA6T7uosHNH9RnQKHgBdZHPCB' | |
5 | 5 | ||
6 | - | let StakingDapp = base58'C246qxhuyo9DBk1pjMzEQSVAWmiqYupG2swGkxTeAvLV' | |
6 | + | let xUSDAssetID = base58'F3or3Nn6NTcSkRvzqtoCoyuCfdqNSuP8rjLboS2AemPL' | |
7 | + | ||
8 | + | let StakingDapp = base58'J3cAptAPQxVqpEz6Rch57JeKpbns48s1a6HoeQG9aX4J' | |
7 | 9 | ||
8 | 10 | let TreasuryFeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' | |
9 | 11 | ||
10 | - | let | |
12 | + | let StartHeight = 1850000 | |
11 | 13 | ||
12 | - | let | |
14 | + | let minimumlockdays = getIntegerValue(this, "Minimum_Days_Range") | |
13 | 15 | ||
14 | - | let TreasuryFee = 9 | |
15 | - | ||
16 | - | let useramount = ((1000 - TreasuryFee) - devFee) | |
17 | - | ||
18 | - | let StartHeight = 1750000 | |
19 | - | ||
20 | - | let minimumlockdays = 6 | |
21 | - | ||
22 | - | let maximumlockdays = 7 | |
16 | + | let maximumlockdays = getIntegerValue(this, "Maximum_Days_Range") | |
23 | 17 | ||
24 | 18 | let oneday = 1440 | |
25 | 19 | ||
26 | 20 | let blockdiff = (height - StartHeight) | |
27 | 21 | ||
28 | 22 | let InflationNo = (fraction(10000000000, 1, blockdiff) + 6000) | |
29 | 23 | ||
30 | 24 | @Callable(i) | |
31 | 25 | func Deposit (days) = { | |
32 | 26 | let pmt = if ((size(i.payments) == 1)) | |
33 | 27 | then i.payments[0] | |
34 | 28 | else throw((("No Payments Attached Please Attach " + toBase58String(CODEAssetID)) + " Asset Only.")) | |
35 | 29 | let currentKey = toBase58String(i.caller.bytes) | |
36 | 30 | let UserClaimAmount = ((((InflationNo * pmt.amount) * days) / 365) / 1000) | |
37 | 31 | let allowdedpymt = (blockdiff * 100000) | |
38 | 32 | let actualblocks = (oneday * days) | |
39 | 33 | let totallockblocks = (height + actualblocks) | |
40 | 34 | let PreviousTxnsCODE = match getIntegerValue(this, "Total_Txns:") { | |
41 | 35 | case a: Int => | |
42 | 36 | a | |
43 | 37 | case _ => | |
44 | 38 | 0 | |
45 | 39 | } | |
46 | 40 | let TotalTxnsCODE = (PreviousTxnsCODE + 1) | |
47 | 41 | let PreviousBurnedCODE = match getInteger(this, "Total_Burned_CODE:") { | |
48 | 42 | case a: Int => | |
49 | 43 | a | |
50 | 44 | case _ => | |
51 | 45 | 0 | |
52 | 46 | } | |
53 | 47 | let TotalBurnedCODE = (PreviousBurnedCODE + pmt.amount) | |
54 | 48 | let fetchuserstakeheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_height_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
55 | 49 | let fetchusermatureheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Total_Lock_Blocks_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
56 | 50 | let gapofheight = (fetchusermatureheight - fetchuserstakeheight) | |
57 | 51 | let currentCODEAmount = match getInteger(this, ("Deposit_Amount_Of_" + currentKey)) { | |
58 | 52 | case a: Int => | |
59 | 53 | a | |
60 | 54 | case _ => | |
61 | 55 | 0 | |
62 | 56 | } | |
63 | 57 | let newCODEAmount = (currentCODEAmount + pmt.amount) | |
64 | 58 | let UserNoOfDeposits = match getInteger(this, ("No_Of_Deposits_" + currentKey)) { | |
65 | 59 | case a: Int => | |
66 | 60 | a | |
67 | 61 | case _ => | |
68 | 62 | 0 | |
69 | 63 | } | |
70 | 64 | let SumpupofUserNoOfDeposits = (UserNoOfDeposits + 1) | |
71 | 65 | if ((StartHeight > height)) | |
72 | 66 | then throw((("DApp is Not Started Yet please Wait until " + toString((StartHeight - height))) + " blocks")) | |
73 | 67 | else if ((pmt.assetId != CODEAssetID)) | |
74 | 68 | then throw((("Incorrect asset attached, please attach " + toBase58String(CODEAssetID)) + " asset only")) | |
75 | 69 | else if ((minimumlockdays >= days)) | |
76 | 70 | then throw(((("Choose Locking days in between " + toString((minimumlockdays + 1))) + " to ") + toString(maximumlockdays))) | |
77 | 71 | else if ((days > maximumlockdays)) | |
78 | 72 | then throw(((((("You Entered days to " + toString(days)) + ", Please Enter no. of days in between ") + toString((minimumlockdays + 1))) + " to ") + toString(maximumlockdays))) | |
79 | 73 | else if ((100000 > pmt.amount)) | |
80 | 74 | then throw("Please Attach minimum 0.001 CODE Token To Issue More CODE Asset.") | |
81 | 75 | else if ((pmt.amount > allowdedpymt)) | |
82 | 76 | then throw((("You can attach maximum " + toString(allowdedpymt)) + "/10^8 CODE.")) | |
83 | 77 | else if ((pmt.amount > UserClaimAmount)) | |
84 | 78 | then throw((((("Your Stake Output is lower than input, please increase no. of days (" + toString(UserClaimAmount)) + "/") + toString(pmt.amount)) + ")/10^8 CODE.")) | |
85 | 79 | else if ((gapofheight != 129600)) | |
86 | 80 | then throw("You are Not Eligible to Mint CODE. It need minimum 90 Days Staking.") | |
87 | 81 | else if ((UserNoOfDeposits == 1)) | |
88 | 82 | then throw("You Already Have an Active Staking, Please Wait until Mature.") | |
89 | 83 | else [Burn(CODEAssetID, pmt.amount), IntegerEntry("Total_Burned_CODE:", TotalBurnedCODE), IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Inflation", InflationNo), IntegerEntry("Block_Passed", blockdiff), IntegerEntry(("No_Of_Deposits_" + currentKey), SumpupofUserNoOfDeposits), IntegerEntry(("Deposit_height_Of_" + currentKey), height), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), totallockblocks), IntegerEntry(("Deposit_Amount_Of_" + currentKey), newCODEAmount), IntegerEntry(("Rewards_Of_" + currentKey), UserClaimAmount), StringEntry("message", "<h1>CODE Staked Successfully!</h1><br>")] | |
90 | 84 | } | |
91 | 85 | ||
92 | 86 | ||
93 | 87 | ||
94 | 88 | @Callable(i) | |
95 | 89 | func Withdraw () = { | |
96 | 90 | let currentKey = toBase58String(i.caller.bytes) | |
97 | 91 | let MaxA4AAmt = 1200000000000 | |
98 | 92 | let MaxFee = 24000000 | |
99 | 93 | let divisiblefactor = 19 | |
100 | 94 | let fetchUserStakeAmt = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_Amount_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
101 | 95 | let FlatfeePercent = 500 | |
102 | 96 | let FeesPercent = ((MaxFee - (fraction(fetchUserStakeAmt, 1000000, MaxA4AAmt) * 19)) / 10000) | |
97 | + | let ClaimFee = 51800000 | |
98 | + | let pmt = value(i.payments[0]) | |
103 | 99 | let checkdepositvalue = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)) | |
104 | 100 | let userFeeAmt = (((getIntegerValue(this, ("Rewards_Of_" + currentKey)) - checkdepositvalue) * FeesPercent) / 10000) | |
105 | 101 | let userFlatFeeAmt = (((getIntegerValue(this, ("Rewards_Of_" + currentKey)) - checkdepositvalue) * FlatfeePercent) / 10000) | |
106 | 102 | let PreviousTxnsCODE = match getIntegerValue(this, "Total_Txns:") { | |
107 | 103 | case a: Int => | |
108 | 104 | a | |
109 | 105 | case _ => | |
110 | 106 | 0 | |
111 | 107 | } | |
112 | 108 | let TotalTxnsCODE = (PreviousTxnsCODE + 1) | |
113 | 109 | let fetchRewardData = match getIntegerValue(this, "Total_CODE_Claimed:") { | |
114 | 110 | case a: Int => | |
115 | 111 | a | |
116 | 112 | case _ => | |
117 | 113 | 0 | |
118 | 114 | } | |
119 | 115 | let totalrewardclaimed = (fetchRewardData + getIntegerValue(this, ("Rewards_Of_" + currentKey))) | |
120 | 116 | let PreviousIssuedCODE = match getIntegerValue(this, "Total_Issued_CODE:") { | |
121 | 117 | case a: Int => | |
122 | 118 | a | |
123 | 119 | case _ => | |
124 | 120 | 0 | |
125 | 121 | } | |
126 | 122 | let TotalIssuedCODE = (PreviousIssuedCODE + getIntegerValue(this, ("Rewards_Of_" + currentKey))) | |
127 | 123 | let fetchuserstakeheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_height_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
128 | 124 | let fetchusermatureheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Total_Lock_Blocks_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
129 | 125 | let gapofheight = (fetchusermatureheight - fetchuserstakeheight) | |
130 | - | if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height)) | |
131 | - | then throw((((("Your " + toString(getIntegerValue(this, ("Rewards_Of_" + currentKey)))) + "/10^8 CODE are Still Maturing. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))) + " blocks.")) | |
132 | - | else if ((checkdepositvalue == 0)) | |
133 | - | then throw("You Have Already Withdraw your CODE Amount.") | |
134 | - | else if ((gapofheight != 129600)) | |
135 | - | then throw("You are Not Eligible to Withdraw CODE. It need minimum 90 Days Staking at A4A DApp. Probably you already have Claimed Your Stake or you Overwrite the Smart Contract with less than 90 days.") | |
136 | - | else if ((fetchUserStakeAmt >= 1199999999999)) | |
137 | - | then [IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Total_CODE_Claimed:", totalrewardclaimed), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Fee_%_Charge", FlatfeePercent), IntegerEntry("Fee_Amount", userFlatFeeAmt), Reissue(CODEAssetID, getIntegerValue(this, ("Rewards_Of_" + currentKey)), true), ScriptTransfer(i.caller, (getIntegerValue(this, ("Rewards_Of_" + currentKey)) - userFlatFeeAmt), CODEAssetID), ScriptTransfer(addressFromPublicKey(TreasuryFeeAddress), userFlatFeeAmt, CODEAssetID), IntegerEntry(("No_Of_Deposits_" + currentKey), 0), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Rewards_Of_" + currentKey), 0), StringEntry("message", "<h1>CODE UnStaked Successfully!</h1><br>")] | |
138 | - | else [IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Total_CODE_Claimed:", totalrewardclaimed), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Fee_%_Charge", FeesPercent), IntegerEntry("Fee_Amount", userFeeAmt), Reissue(CODEAssetID, getIntegerValue(this, ("Rewards_Of_" + currentKey)), true), ScriptTransfer(i.caller, (getIntegerValue(this, ("Rewards_Of_" + currentKey)) - userFeeAmt), CODEAssetID), ScriptTransfer(addressFromPublicKey(TreasuryFeeAddress), userFeeAmt, CODEAssetID), IntegerEntry(("No_Of_Deposits_" + currentKey), 0), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Rewards_Of_" + currentKey), 0), StringEntry("message", "<h1>CODE UnStaked Successfully!</h1><br>")] | |
126 | + | if ((pmt.assetId != xUSDAssetID)) | |
127 | + | then throw((("Wrong Asset Attached for Payment, please Attach 0.518 xUSD (" + toBase58String(xUSDAssetID)) + ")")) | |
128 | + | else if ((pmt.amount != ClaimFee)) | |
129 | + | then throw("Please Attach Exact 0.518 xUSD.") | |
130 | + | else if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height)) | |
131 | + | then throw((((("Your " + toString(getIntegerValue(this, ("Rewards_Of_" + currentKey)))) + "/10^8 CODE are Still Maturing. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))) + " blocks.")) | |
132 | + | else if ((checkdepositvalue == 0)) | |
133 | + | then throw("You Have Already Withdraw your CODE Amount.") | |
134 | + | else if ((gapofheight != 129600)) | |
135 | + | then throw("You are Not Eligible to Withdraw CODE. It need minimum 90 Days Staking at A4A DApp. Probably you already have Claimed Your Stake or you Overwrite the Smart Contract with less than 90 days.") | |
136 | + | else if ((fetchUserStakeAmt >= 1199999999999)) | |
137 | + | then [IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Total_CODE_Claimed:", totalrewardclaimed), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Fee_%_Charge", FlatfeePercent), IntegerEntry("Fee_Amount", userFlatFeeAmt), Reissue(CODEAssetID, getIntegerValue(this, ("Rewards_Of_" + currentKey)), true), ScriptTransfer(i.caller, (getIntegerValue(this, ("Rewards_Of_" + currentKey)) - userFlatFeeAmt), CODEAssetID), ScriptTransfer(addressFromPublicKey(TreasuryFeeAddress), userFlatFeeAmt, CODEAssetID), IntegerEntry(("No_Of_Deposits_" + currentKey), 0), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Rewards_Of_" + currentKey), 0), StringEntry("message", "<h1>CODE UnStaked Successfully!</h1><br>")] | |
138 | + | else [IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Total_CODE_Claimed:", totalrewardclaimed), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Fee_%_Charge", FeesPercent), IntegerEntry("Fee_Amount", userFeeAmt), Reissue(CODEAssetID, getIntegerValue(this, ("Rewards_Of_" + currentKey)), true), ScriptTransfer(i.caller, (getIntegerValue(this, ("Rewards_Of_" + currentKey)) - userFeeAmt), CODEAssetID), ScriptTransfer(addressFromPublicKey(TreasuryFeeAddress), userFeeAmt, CODEAssetID), IntegerEntry(("No_Of_Deposits_" + currentKey), 0), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Rewards_Of_" + currentKey), 0), StringEntry("message", "<h1>CODE UnStaked Successfully!</h1><br>")] | |
139 | + | } | |
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | @Callable(i) | |
144 | + | func SetDaysRange (Minimum_Days_Range,Maximum_Days_Range) = { | |
145 | + | let calleraddress = toBase58String(i.caller.bytes) | |
146 | + | let adminrights = getStringValue(this, "DApp_Admin_Rights") | |
147 | + | let Minimum_days = 7 | |
148 | + | let Maximum_days = 200 | |
149 | + | if ((adminrights != calleraddress)) | |
150 | + | then throw((("I know You are not An Admin. Only " + adminrights) + " has rights to change Days Range.")) | |
151 | + | else if ((Minimum_days > Minimum_Days_Range)) | |
152 | + | then throw("Minimum days range must be more than 6 and in between 7-200.") | |
153 | + | else if ((Maximum_Days_Range > Maximum_days)) | |
154 | + | then throw("Maximum days range can't exceed the 200.") | |
155 | + | else [IntegerEntry("Minimum_Days_Range", Minimum_Days_Range), IntegerEntry("Maximum_Days_Range", Maximum_Days_Range)] | |
139 | 156 | } | |
140 | 157 | ||
141 | 158 | ||
142 | 159 | @Verifier(tx) | |
143 | 160 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
144 | 161 |
github/deemru/w8io/169f3d6 39.21 ms ◑