tx · 4idUjwN8T4F2xUEzCQc4zSosHKJNoE8t9tWCcEJdqmEh 3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve: -0.01400000 Waves 2021.09.12 00:53 [1698958] smart account 3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve > SELF 0.00000000 Waves
{ "type": 13, "id": "4idUjwN8T4F2xUEzCQc4zSosHKJNoE8t9tWCcEJdqmEh", "fee": 1400000, "feeAssetId": null, "timestamp": 1631397220990, "version": 2, "chainId": 84, "sender": "3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve", "senderPublicKey": "GixVPmDAUorToWCPYCpBKvBFRBc7qtQSXhL8zWJsfnVN", "proofs": [ "62EHATB9ZPF3sKPK9WzVc1iBfgzmWfrQ3RhDiqJcSQENH4j94JAQEiFQwwYPV3DCxG5HhgWyb6nFPY7GMKSXDpCF" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEBAAAAAgAAAAAKTURDQXNzZXRJRAEAAAAg8PqWfCOktYC7c/5YZOoZnKjAIi+gpnpsph7Y6R/RtsAAAAAAC1VTRE5Bc3NldElEAQAAACBbw7ZR480OK0QcFbKDWYG/j8XxofSW0CjrC/Oyqq75nQAAAAEAAAABaQEAAAAHRGVwb3NpdAAAAAEAAAAEZGF5cwQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAR05vIHBheW1lbnQgYXR0YWNoZWQsIFBsZWFzZSBBdHRhY2ggTURDIFRva2VuIGFzIHBlciBUSUVSIGluIHBheW1lbnRbMV0uBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAD21heGltdW1sb2NrZGF5cwAAAAAAAAAAWgQAAAAKbG9ja3N0YXR1cwIAAAAGTE9DS0VEBAAAAARVTFNUAAA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EsAAAAAgIAAAASRGVwb3NpdF9oZWlnaHRfT2ZfBQAAAApjdXJyZW50S2V5BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAASRGVwb3NpdF9BbW91bnRfT2ZfBQAAAApjdXJyZW50S2V5CAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAABVUb3RhbF9Mb2NrX0Jsb2Nrc19PZl8FAAAACmN1cnJlbnRLZXkJAABkAAAAAgUAAAAGaGVpZ2h0BQAAAA90b3RhbGxvY2tibG9ja3MJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAA9Mb2NrX1N0YXR1c19PZl8FAAAACmN1cnJlbnRLZXkFAAAACmxvY2tzdGF0dXMFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlecvTuig=", "height": 1698958, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3mHZA9T8dXqu4wmjwxm3pYyP72H6Ddbi8GPLDCqAVWE4 Next: 3SzEaWcykoMC8yMuy879yJJHf42HnXn2uD5Xw3PhcsAp Diff:
Old | New | Differences | |
---|---|---|---|
27 | 27 | else if ((1000000000 > pmt.amount)) | |
28 | 28 | then throw("Please Attach minimum 10,000 MDC To Achieve SILVER TIER.") | |
29 | 29 | else if ((getStringValue(this, ("Lock_Status_Of_" + currentKey)) == lockstatus)) | |
30 | - | then throw(("Your Address Already Have the Locked Tokens Quantity. Please Wait for Unlock Period of | |
30 | + | then throw(("Your Address Already Have the Locked Tokens Quantity. Please Wait for Unlock Period of " + toString((height - getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)))))) | |
31 | 31 | else if ((ULST >= pmt.amount)) | |
32 | - | 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), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
32 | + | 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)] | |
33 | 33 | else if ((ULGT >= pmt.amount)) | |
34 | - | 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), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
34 | + | 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)] | |
35 | 35 | else if ((pmt.amount >= ULDT)) | |
36 | - | 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), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
37 | - | else [IntegerEntry(("Deposit_height_Of_" + currentKey), height), IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
36 | + | 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)] | |
37 | + | 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)] | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let MDCAssetID = base58'HDgUBQhx8vJY2uUmQPtqzEu6C32Ktx4jAD37aprLKV9Z' | |
5 | 5 | ||
6 | 6 | let USDNAssetID = base58'7BDByxoPpx8gjNfkuBi8h1zBTtg9PrxLvYv3q613CES8' | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func Deposit (days) = { | |
10 | 10 | let pmt = if ((size(i.payments) == 1)) | |
11 | 11 | then i.payments[0] | |
12 | 12 | else throw("No payment attached, Please Attach MDC Token as per TIER in payment[1].") | |
13 | 13 | let currentKey = toBase58String(i.caller.bytes) | |
14 | 14 | let maximumlockdays = 90 | |
15 | 15 | let lockstatus = "LOCKED" | |
16 | 16 | let ULST = 499999999999 | |
17 | 17 | let ULGT = 999999999999 | |
18 | 18 | let ULDT = 1000000000000 | |
19 | 19 | let oneday = 1440 | |
20 | 20 | let totallockblocks = (oneday * days) | |
21 | 21 | if ((pmt.assetId != MDCAssetID)) | |
22 | 22 | then throw((("Incorrect asset attached, please attach " + toBase58String(MDCAssetID)) + " only.")) | |
23 | 23 | else if ((6 >= days)) | |
24 | 24 | then throw("Choose Locking days in between 7 to 90.") | |
25 | 25 | else if ((days > maximumlockdays)) | |
26 | 26 | then throw("You Entered days greater than 90 please Enter no. of days in between 7 to 90.") | |
27 | 27 | else if ((1000000000 > pmt.amount)) | |
28 | 28 | then throw("Please Attach minimum 10,000 MDC To Achieve SILVER TIER.") | |
29 | 29 | else if ((getStringValue(this, ("Lock_Status_Of_" + currentKey)) == lockstatus)) | |
30 | - | then throw(("Your Address Already Have the Locked Tokens Quantity. Please Wait for Unlock Period of | |
30 | + | then throw(("Your Address Already Have the Locked Tokens Quantity. Please Wait for Unlock Period of " + toString((height - getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)))))) | |
31 | 31 | else if ((ULST >= pmt.amount)) | |
32 | - | 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), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
32 | + | 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)] | |
33 | 33 | else if ((ULGT >= pmt.amount)) | |
34 | - | 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), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
34 | + | 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)] | |
35 | 35 | else if ((pmt.amount >= ULDT)) | |
36 | - | 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), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
37 | - | else [IntegerEntry(("Deposit_height_Of_" + currentKey), height), IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
36 | + | 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)] | |
37 | + | 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)] | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Verifier(tx) | |
42 | 42 | func verify () = match tx { | |
43 | 43 | case _ => | |
44 | 44 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
45 | 45 | } | |
46 | 46 |
github/deemru/w8io/026f985 29.90 ms ◑