tx · AZR2jJC66Gh7d74LXJwVS5VRszS39Mj1rGVkzCCighr6

3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve:  -0.01400000 Waves

2021.09.12 02:02 [1699025] smart account 3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve > SELF 0.00000000 Waves

{ "type": 13, "id": "AZR2jJC66Gh7d74LXJwVS5VRszS39Mj1rGVkzCCighr6", "fee": 1400000, "feeAssetId": null, "timestamp": 1631401413639, "version": 2, "chainId": 84, "sender": "3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve", "senderPublicKey": "GixVPmDAUorToWCPYCpBKvBFRBc7qtQSXhL8zWJsfnVN", "proofs": [ "2vn767cmAWivStdZevpAeAXd1mJiV4sbpyfpEsjbSpznGNVxgfW9Hjd5Ajhtvau5hFB81P7466UVuhbhPXG4xyaB" ], "script": "base64:AAIEAAAAAAAAAAkIAhIDCgEBEgAAAAACAAAAAApNRENBc3NldElEAQAAACDw+pZ8I6S1gLtz/lhk6hmcqMAiL6CmemymHtjpH9G2wAAAAAALVVNETkFzc2V0SUQBAAAAIFvDtlHjzQ4rRBwVsoNZgb+PxfGh9JbQKOsL87KqrvmdAAAAAgAAAAFpAQAAAAdEZXBvc2l0AAAAAQAAAARkYXlzBAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAABHTm8gcGF5bWVudCBhdHRhY2hlZCwgUGxlYXNlIEF0dGFjaCBNREMgVG9rZW4gYXMgcGVyIFRJRVIgaW4gcGF5bWVudFsxXS4EAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAPbWF4aW11bWxvY2tkYXlzAAAAAAAAAABaBAAAAApsb2Nrc3RhdHVzAgAAAAZMT0NLRUQEAAAABFVMU1QA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luZ0VudHJ5AAAAAgkAASwAAAACAgAAAA9Mb2NrX1N0YXR1c19PZl8FAAAACmN1cnJlbnRLZXkCAAAABlVOTE9DSwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5hhCavQ==", "height": 1699025, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: YfMWhhJ8cwGaiWc2ykgbrazsdQyk6kYU8ZHymiFrtAr Next: FQgp8gmFJRToapj3UCKJtApxSL8UHwryVaGCWs4Z1Axi Diff:
OldNewDifferences
4343 func Withdraw () = {
4444 let currentKey = toBase58String(i.caller.bytes)
4545 let checkdepositvalue = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey))
46- if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height))
47- then throw(((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)))) + " MDC are Under Lock. Consider last 5 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))))
48- else if ((checkdepositvalue == 0))
49- then throw("You Have Already Withdraw your Amount.")
50- else [ScriptTransfer(i.caller, getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)), MDCAssetID), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), StringEntry(("Lock_Status_Of_" + currentKey), "UNLOCK")]
46+ if ((currentKey != ("Deposit_Amount_Of_" + currentKey)))
47+ then throw("Wrong Address input")
48+ else if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height))
49+ then throw(((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)))) + " MDC are Under Lock. Consider last 5 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))))
50+ else if ((checkdepositvalue == 0))
51+ then throw("You Have Already Withdraw your Amount.")
52+ else [ScriptTransfer(i.caller, getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)), MDCAssetID), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), StringEntry(("Lock_Status_Of_" + currentKey), "UNLOCK")]
5153 }
5254
5355
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let MDCAssetID = base58'HDgUBQhx8vJY2uUmQPtqzEu6C32Ktx4jAD37aprLKV9Z'
55
66 let USDNAssetID = base58'7BDByxoPpx8gjNfkuBi8h1zBTtg9PrxLvYv3q613CES8'
77
88 @Callable(i)
99 func Deposit (days) = {
1010 let pmt = if ((size(i.payments) == 1))
1111 then i.payments[0]
1212 else throw("No payment attached, Please Attach MDC Token as per TIER in payment[1].")
1313 let currentKey = toBase58String(i.caller.bytes)
1414 let maximumlockdays = 90
1515 let lockstatus = "LOCKED"
1616 let ULST = 499999999999
1717 let ULGT = 999999999999
1818 let ULDT = 1000000000000
1919 let oneday = 1440
2020 let totallockblocks = (oneday * days)
2121 if ((pmt.assetId != MDCAssetID))
2222 then throw((("Incorrect asset attached, please attach " + toBase58String(MDCAssetID)) + " only."))
2323 else if ((6 >= days))
2424 then throw("Choose Locking days in between 7 to 90.")
2525 else if ((days > maximumlockdays))
2626 then throw("You Entered days greater than 90 please Enter no. of days in between 7 to 90.")
2727 else if ((1000000000 > pmt.amount))
2828 then throw("Please Attach minimum 10,000 MDC To Achieve SILVER TIER.")
2929 else if ((getStringValue(this, ("Lock_Status_Of_" + currentKey)) == lockstatus))
3030 then throw((("Your Address Already Have the Tokens Under Lock. Locked Qty = " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)))) + " MDC. Consider last 5 digits as value after Decimals"))
3131 else if ((ULST >= pmt.amount))
3232 then [StringEntry(("Tier_Of_" + currentKey), "SILVER"), IntegerEntry(("Deposit_height_Of_" + currentKey), height), IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), (height + totallockblocks)), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)]
3333 else if ((ULGT >= pmt.amount))
3434 then [StringEntry(("Tier_Of_" + currentKey), "GOLD"), IntegerEntry(("Deposit_height_Of_" + currentKey), height), IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), (height + totallockblocks)), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)]
3535 else if ((pmt.amount >= ULDT))
3636 then [StringEntry(("Tier_Of_" + currentKey), "DIAMOND"), IntegerEntry(("Deposit_height_Of_" + currentKey), height), IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), (height + totallockblocks)), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)]
3737 else [IntegerEntry(("Deposit_height_Of_" + currentKey), height), IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), (height + totallockblocks)), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)]
3838 }
3939
4040
4141
4242 @Callable(i)
4343 func Withdraw () = {
4444 let currentKey = toBase58String(i.caller.bytes)
4545 let checkdepositvalue = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey))
46- if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height))
47- then throw(((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)))) + " MDC are Under Lock. Consider last 5 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))))
48- else if ((checkdepositvalue == 0))
49- then throw("You Have Already Withdraw your Amount.")
50- else [ScriptTransfer(i.caller, getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)), MDCAssetID), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), StringEntry(("Lock_Status_Of_" + currentKey), "UNLOCK")]
46+ if ((currentKey != ("Deposit_Amount_Of_" + currentKey)))
47+ then throw("Wrong Address input")
48+ else if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height))
49+ then throw(((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)))) + " MDC are Under Lock. Consider last 5 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))))
50+ else if ((checkdepositvalue == 0))
51+ then throw("You Have Already Withdraw your Amount.")
52+ else [ScriptTransfer(i.caller, getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)), MDCAssetID), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), StringEntry(("Lock_Status_Of_" + currentKey), "UNLOCK")]
5153 }
5254
5355
5456 @Verifier(tx)
5557 func verify () = match tx {
5658 case _ =>
5759 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5860 }
5961

github/deemru/w8io/026f985 
22.03 ms