tx · 8AwB9SWCVRH4UQcgTE6gnC8sNRzfWCuptiLvdQKjaKpm

3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo:  -0.01900000 Waves

2022.09.24 12:21 [2243032] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves

{ "type": 13, "id": "8AwB9SWCVRH4UQcgTE6gnC8sNRzfWCuptiLvdQKjaKpm", "fee": 1900000, "feeAssetId": null, "timestamp": 1664011244618, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "4FERMmVmpFiGJa2har7MbT1pQnocYKyBCxzTxqfRmcwPPK7KK6jTySUxXgmP9VLboFdSqYRpJyTEB9oFBq8H9VNw" ], "script": "base64:AAIEAAAAAAAAABQIAhIDCgEBEgASBAoCAQESAwoBAQAAAAoAAAAAC0NPREVBc3NldElEAQAAACDDu1qZD791ejInBFn8Vvk3iN043OoKdDgvJd+307zSoAAAAAALeFVTREFzc2V0SUQBAAAAINC7vzt0HrCMShdGxhTVW1ISJItWkUSqsoCQ+orK0cl3AAAAAAtTdGFraW5nRGFwcAEAAAAg/UGbBLHhsjFFb0b3YWn4seNHtEaYngIcscRj3mvW1T8AAAAAElRyZWFzdXJ5RmVlQWRkcmVzcwEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAAC1N0YXJ0SGVpZ2h0AAAAAAAAHDqQAAAAAA9taW5pbXVtbG9ja2RheXMJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAAEk1pbmltdW1fRGF5c19SYW5nZQAAAAAPbWF4aW11bWxvY2tkYXlzCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAABJNYXhpbXVtX0RheXNfUmFuZ2UAAAAABm9uZWRheQ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ADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXldls7N", "height": 2243032, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BhSajcoDX9txW5hB9j3LDxpMYYE2swUEJ9B6QfQtt7Hb Next: ChbtmKJSbUMm55aBeDsxeXwDW4nkoBScaQ6k19HwdBRr Diff:
OldNewDifferences
9494 let fetchUserStakeAmt = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_Amount_Of_" + currentKey)), "Your Address not Found on Staking DApp")
9595 let FlatfeePercent = 500
9696 let FeesPercent = ((MaxFee - (fraction(fetchUserStakeAmt, 1000000, MaxA4AAmt) * 19)) / 10000)
97- let ClaimFee = 51800000
97+ let ClaimFee = getIntegerValue(this, "Claim_Fee")
9898 let pmt = value(i.payments[0])
9999 let checkdepositvalue = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey))
100100 let userFeeAmt = (((getIntegerValue(this, ("Rewards_Of_" + currentKey)) - checkdepositvalue) * FeesPercent) / 10000)
124124 let fetchusermatureheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Total_Lock_Blocks_Of_" + currentKey)), "Your Address not Found on Staking DApp")
125125 let gapofheight = (fetchusermatureheight - fetchuserstakeheight)
126126 if ((pmt.assetId != xUSDAssetID))
127- then throw((("Wrong Asset Attached for Payment, please Attach 0.518 xUSD (" + toBase58String(xUSDAssetID)) + ")"))
127+ then throw((((("Wrong Asset Attached for Payment, please Attach 0." + toString(fraction(1, ClaimFee, 100000))) + " xUSD (") + toBase58String(xUSDAssetID)) + ")"))
128128 else if ((pmt.amount != ClaimFee))
129- then throw("Please Attach Exact 0.518 xUSD.")
129+ then throw((("Please Attach Exact 0." + toString(fraction(1, ClaimFee, 100000))) + " xUSD."))
130130 else if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height))
131131 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."))
132132 else if ((checkdepositvalue == 0))
152152 then throw("Minimum days range must be more than 6 and in between 7-200.")
153153 else if ((Maximum_Days_Range > Maximum_days))
154154 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)]
155+ else if ((Minimum_Days_Range > Maximum_Days_Range))
156+ then throw((((("Minimum days range can't be exceed the value of Maximum days range. Choose the Range between [" + toString(Minimum_days)) + "-") + toString(Maximum_days)) + "]"))
157+ else [IntegerEntry("Minimum_Days_Range", Minimum_Days_Range), IntegerEntry("Maximum_Days_Range", Maximum_Days_Range)]
158+ }
159+
160+
161+
162+@Callable(i)
163+func SetClaimFee (ClaimFee) = {
164+ let calleraddress = toBase58String(i.caller.bytes)
165+ let adminrights = getStringValue(this, "DApp_Admin_Rights")
166+ let Minimum_Claim_fee = 10000000
167+ let Maximum_Claim_fee = 100000000
168+ if ((adminrights != calleraddress))
169+ then throw((("I know You are not An Admin. Only " + adminrights) + " has rights to change Claim Fee."))
170+ else if ((Minimum_Claim_fee > ClaimFee))
171+ then throw((("Minimum Claim fee is " + toString(Minimum_Claim_fee)) + " xUSD [int-format]."))
172+ else if ((ClaimFee > Maximum_Claim_fee))
173+ then throw((("Maximum Claim fee can't be more than " + toString(Maximum_Claim_fee)) + " xUSD. [int-format]"))
174+ else [IntegerEntry("Claim_Fee", ClaimFee)]
156175 }
157176
158177
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let CODEAssetID = base58'EB4CUQH4fHzzQt9YjcHtA6T7uosHNH9RnQKHgBdZHPCB'
55
66 let xUSDAssetID = base58'F3or3Nn6NTcSkRvzqtoCoyuCfdqNSuP8rjLboS2AemPL'
77
88 let StakingDapp = base58'J3cAptAPQxVqpEz6Rch57JeKpbns48s1a6HoeQG9aX4J'
99
1010 let TreasuryFeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR'
1111
1212 let StartHeight = 1850000
1313
1414 let minimumlockdays = getIntegerValue(this, "Minimum_Days_Range")
1515
1616 let maximumlockdays = getIntegerValue(this, "Maximum_Days_Range")
1717
1818 let oneday = 1440
1919
2020 let blockdiff = (height - StartHeight)
2121
2222 let InflationNo = (fraction(10000000000, 1, blockdiff) + 6000)
2323
2424 @Callable(i)
2525 func Deposit (days) = {
2626 let pmt = if ((size(i.payments) == 1))
2727 then i.payments[0]
2828 else throw((("No Payments Attached Please Attach " + toBase58String(CODEAssetID)) + " Asset Only."))
2929 let currentKey = toBase58String(i.caller.bytes)
3030 let UserClaimAmount = ((((InflationNo * pmt.amount) * days) / 365) / 1000)
3131 let allowdedpymt = (blockdiff * 100000)
3232 let actualblocks = (oneday * days)
3333 let totallockblocks = (height + actualblocks)
3434 let PreviousTxnsCODE = match getIntegerValue(this, "Total_Txns:") {
3535 case a: Int =>
3636 a
3737 case _ =>
3838 0
3939 }
4040 let TotalTxnsCODE = (PreviousTxnsCODE + 1)
4141 let PreviousBurnedCODE = match getInteger(this, "Total_Burned_CODE:") {
4242 case a: Int =>
4343 a
4444 case _ =>
4545 0
4646 }
4747 let TotalBurnedCODE = (PreviousBurnedCODE + pmt.amount)
4848 let fetchuserstakeheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_height_Of_" + currentKey)), "Your Address not Found on Staking DApp")
4949 let fetchusermatureheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Total_Lock_Blocks_Of_" + currentKey)), "Your Address not Found on Staking DApp")
5050 let gapofheight = (fetchusermatureheight - fetchuserstakeheight)
5151 let currentCODEAmount = match getInteger(this, ("Deposit_Amount_Of_" + currentKey)) {
5252 case a: Int =>
5353 a
5454 case _ =>
5555 0
5656 }
5757 let newCODEAmount = (currentCODEAmount + pmt.amount)
5858 let UserNoOfDeposits = match getInteger(this, ("No_Of_Deposits_" + currentKey)) {
5959 case a: Int =>
6060 a
6161 case _ =>
6262 0
6363 }
6464 let SumpupofUserNoOfDeposits = (UserNoOfDeposits + 1)
6565 if ((StartHeight > height))
6666 then throw((("DApp is Not Started Yet please Wait until " + toString((StartHeight - height))) + " blocks"))
6767 else if ((pmt.assetId != CODEAssetID))
6868 then throw((("Incorrect asset attached, please attach " + toBase58String(CODEAssetID)) + " asset only"))
6969 else if ((minimumlockdays >= days))
7070 then throw(((("Choose Locking days in between " + toString((minimumlockdays + 1))) + " to ") + toString(maximumlockdays)))
7171 else if ((days > maximumlockdays))
7272 then throw(((((("You Entered days to " + toString(days)) + ", Please Enter no. of days in between ") + toString((minimumlockdays + 1))) + " to ") + toString(maximumlockdays)))
7373 else if ((100000 > pmt.amount))
7474 then throw("Please Attach minimum 0.001 CODE Token To Issue More CODE Asset.")
7575 else if ((pmt.amount > allowdedpymt))
7676 then throw((("You can attach maximum " + toString(allowdedpymt)) + "/10^8 CODE."))
7777 else if ((pmt.amount > UserClaimAmount))
7878 then throw((((("Your Stake Output is lower than input, please increase no. of days (" + toString(UserClaimAmount)) + "/") + toString(pmt.amount)) + ")/10^8 CODE."))
7979 else if ((gapofheight != 129600))
8080 then throw("You are Not Eligible to Mint CODE. It need minimum 90 Days Staking.")
8181 else if ((UserNoOfDeposits == 1))
8282 then throw("You Already Have an Active Staking, Please Wait until Mature.")
8383 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>")]
8484 }
8585
8686
8787
8888 @Callable(i)
8989 func Withdraw () = {
9090 let currentKey = toBase58String(i.caller.bytes)
9191 let MaxA4AAmt = 1200000000000
9292 let MaxFee = 24000000
9393 let divisiblefactor = 19
9494 let fetchUserStakeAmt = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_Amount_Of_" + currentKey)), "Your Address not Found on Staking DApp")
9595 let FlatfeePercent = 500
9696 let FeesPercent = ((MaxFee - (fraction(fetchUserStakeAmt, 1000000, MaxA4AAmt) * 19)) / 10000)
97- let ClaimFee = 51800000
97+ let ClaimFee = getIntegerValue(this, "Claim_Fee")
9898 let pmt = value(i.payments[0])
9999 let checkdepositvalue = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey))
100100 let userFeeAmt = (((getIntegerValue(this, ("Rewards_Of_" + currentKey)) - checkdepositvalue) * FeesPercent) / 10000)
101101 let userFlatFeeAmt = (((getIntegerValue(this, ("Rewards_Of_" + currentKey)) - checkdepositvalue) * FlatfeePercent) / 10000)
102102 let PreviousTxnsCODE = match getIntegerValue(this, "Total_Txns:") {
103103 case a: Int =>
104104 a
105105 case _ =>
106106 0
107107 }
108108 let TotalTxnsCODE = (PreviousTxnsCODE + 1)
109109 let fetchRewardData = match getIntegerValue(this, "Total_CODE_Claimed:") {
110110 case a: Int =>
111111 a
112112 case _ =>
113113 0
114114 }
115115 let totalrewardclaimed = (fetchRewardData + getIntegerValue(this, ("Rewards_Of_" + currentKey)))
116116 let PreviousIssuedCODE = match getIntegerValue(this, "Total_Issued_CODE:") {
117117 case a: Int =>
118118 a
119119 case _ =>
120120 0
121121 }
122122 let TotalIssuedCODE = (PreviousIssuedCODE + getIntegerValue(this, ("Rewards_Of_" + currentKey)))
123123 let fetchuserstakeheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_height_Of_" + currentKey)), "Your Address not Found on Staking DApp")
124124 let fetchusermatureheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Total_Lock_Blocks_Of_" + currentKey)), "Your Address not Found on Staking DApp")
125125 let gapofheight = (fetchusermatureheight - fetchuserstakeheight)
126126 if ((pmt.assetId != xUSDAssetID))
127- then throw((("Wrong Asset Attached for Payment, please Attach 0.518 xUSD (" + toBase58String(xUSDAssetID)) + ")"))
127+ then throw((((("Wrong Asset Attached for Payment, please Attach 0." + toString(fraction(1, ClaimFee, 100000))) + " xUSD (") + toBase58String(xUSDAssetID)) + ")"))
128128 else if ((pmt.amount != ClaimFee))
129- then throw("Please Attach Exact 0.518 xUSD.")
129+ then throw((("Please Attach Exact 0." + toString(fraction(1, ClaimFee, 100000))) + " xUSD."))
130130 else if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height))
131131 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."))
132132 else if ((checkdepositvalue == 0))
133133 then throw("You Have Already Withdraw your CODE Amount.")
134134 else if ((gapofheight != 129600))
135135 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.")
136136 else if ((fetchUserStakeAmt >= 1199999999999))
137137 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>")]
138138 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>")]
139139 }
140140
141141
142142
143143 @Callable(i)
144144 func SetDaysRange (Minimum_Days_Range,Maximum_Days_Range) = {
145145 let calleraddress = toBase58String(i.caller.bytes)
146146 let adminrights = getStringValue(this, "DApp_Admin_Rights")
147147 let Minimum_days = 7
148148 let Maximum_days = 200
149149 if ((adminrights != calleraddress))
150150 then throw((("I know You are not An Admin. Only " + adminrights) + " has rights to change Days Range."))
151151 else if ((Minimum_days > Minimum_Days_Range))
152152 then throw("Minimum days range must be more than 6 and in between 7-200.")
153153 else if ((Maximum_Days_Range > Maximum_days))
154154 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)]
155+ else if ((Minimum_Days_Range > Maximum_Days_Range))
156+ then throw((((("Minimum days range can't be exceed the value of Maximum days range. Choose the Range between [" + toString(Minimum_days)) + "-") + toString(Maximum_days)) + "]"))
157+ else [IntegerEntry("Minimum_Days_Range", Minimum_Days_Range), IntegerEntry("Maximum_Days_Range", Maximum_Days_Range)]
158+ }
159+
160+
161+
162+@Callable(i)
163+func SetClaimFee (ClaimFee) = {
164+ let calleraddress = toBase58String(i.caller.bytes)
165+ let adminrights = getStringValue(this, "DApp_Admin_Rights")
166+ let Minimum_Claim_fee = 10000000
167+ let Maximum_Claim_fee = 100000000
168+ if ((adminrights != calleraddress))
169+ then throw((("I know You are not An Admin. Only " + adminrights) + " has rights to change Claim Fee."))
170+ else if ((Minimum_Claim_fee > ClaimFee))
171+ then throw((("Minimum Claim fee is " + toString(Minimum_Claim_fee)) + " xUSD [int-format]."))
172+ else if ((ClaimFee > Maximum_Claim_fee))
173+ then throw((("Maximum Claim fee can't be more than " + toString(Maximum_Claim_fee)) + " xUSD. [int-format]"))
174+ else [IntegerEntry("Claim_Fee", ClaimFee)]
156175 }
157176
158177
159178 @Verifier(tx)
160179 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
161180

github/deemru/w8io/169f3d6 
38.50 ms