tx · 44j6NBXkGbdUMo7Lg4tiSuqSLYaeo67hahxxkCXCzSCW 3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve: -0.01400000 Waves 2021.09.12 22:22 [1700250] smart account 3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve > SELF 0.00000000 Waves
{ "type": 13, "id": "44j6NBXkGbdUMo7Lg4tiSuqSLYaeo67hahxxkCXCzSCW", "fee": 1400000, "feeAssetId": null, "timestamp": 1631474579300, "version": 2, "chainId": 84, "sender": "3N2xqkdTrWSis1QWQnpyeJyL95qjkUyP7Ve", "senderPublicKey": "GixVPmDAUorToWCPYCpBKvBFRBc7qtQSXhL8zWJsfnVN", "proofs": [ "2ZfwP8exAvq22WjJR7GMHsX532ZEN8tSmbJkEVf7b1y8tFdqPtJoyw6p8KwxgGsh7af3TqnLW5MgxrAUNU85nuSf" ], "script": "base64:AAIEAAAAAAAAAAkIAhIDCgEBEgAAAAACAAAAAApNRENBc3NldElEAQAAACDw+pZ8I6S1gLtz/lhk6hmcqMAiL6CmemymHtjpH9G2wAAAAAALVVNETkFzc2V0SUQBAAAAIFvDtlHjzQ4rRBwVsoNZgb+PxfGh9JbQKOsL87KqrvmdAAAAAgAAAAFpAQAAAAdEZXBvc2l0AAAAAQAAAARkYXlzBAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAABHTm8gcGF5bWVudCBhdHRhY2hlZCwgUGxlYXNlIEF0dGFjaCBNREMgVG9rZW4gYXMgcGVyIFRJRVIgaW4gcGF5bWVudFsxXS4EAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAPbWF4aW11bWxvY2tkYXlzAAAAAAAAAABaBAAAAApsb2Nrc3RhdHVzAgAAAAZMT0NLRUQEAAA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2ZfBQAAAApjdXJyZW50S2V5AAAAAAAAAAAACQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgIAAAAPTG9ja19TdGF0dXNfT2ZfBQAAAApjdXJyZW50S2V5AgAAAAZVTkxPQ0sJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAALUmV3YXJkc19PZl8FAAAACmN1cnJlbnRLZXkAAAAAAAAAAAAFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleZopgV8=", "height": 1700250, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8vvjyQp87RSPuvWa4JixYzRwySsxACLqe6iauyM6Snha Next: EHYJ6SAp5J1xBrCZiWNgSiAZVuwimbkoWgCZ9PyWJPaw Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | then throw("You Entered days greater than 90 please Enter no. of days in between 7 to 90.") | |
30 | 30 | else if ((1000000000 > pmt.amount)) | |
31 | 31 | then throw("Please Attach minimum 10,000 MDC To Achieve SILVER TIER.") | |
32 | - | else if ((getStringValue(this, ("Lock_Status_Of_" + currentKey)) == lockstatus)) | |
33 | - | 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")) | |
34 | - | else if ((ULST >= pmt.amount)) | |
35 | - | 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), IntegerEntry(("Rewards_Of_" + currentKey), Tier1rewards)] | |
36 | - | else if ((ULGT >= pmt.amount)) | |
32 | + | else if ((ULST >= pmt.amount)) | |
33 | + | 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), IntegerEntry(("Rewards_Of_" + currentKey), Tier1rewards)] | |
34 | + | else if ((ULGT >= pmt.amount)) | |
35 | + | then [{ | |
36 | + | let Tier2 = 20 | |
37 | + | StringEntry(("Tier_Of_" + currentKey), "GOLD") | |
38 | + | }, 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)] | |
39 | + | else if ((pmt.amount >= ULDT)) | |
37 | 40 | then [{ | |
38 | - | let | |
39 | - | StringEntry(("Tier_Of_" + currentKey), " | |
41 | + | let Tier3 = 20 | |
42 | + | StringEntry(("Tier_Of_" + currentKey), "DIAMOND") | |
40 | 43 | }, 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)] | |
41 | - | else if ((pmt.amount >= ULDT)) | |
42 | - | then [{ | |
43 | - | let Tier3 = 20 | |
44 | - | StringEntry(("Tier_Of_" + currentKey), "DIAMOND") | |
45 | - | }, 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)] | |
46 | - | else [{ | |
47 | - | let Tier4 = 20 | |
48 | - | IntegerEntry(("Deposit_height_Of_" + currentKey), height) | |
49 | - | }, IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
44 | + | else [{ | |
45 | + | let Tier4 = 20 | |
46 | + | IntegerEntry(("Deposit_height_Of_" + currentKey), height) | |
47 | + | }, IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
50 | 48 | } | |
51 | 49 | ||
52 | 50 |
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 actualblocks = (oneday * days) | |
21 | 21 | let totallockblocks = (height + actualblocks) | |
22 | 22 | let Tier1 = 695 | |
23 | 23 | let Tier1rewards = fraction(fraction(Tier1, pmt.amount, pow(10, 0, 5, 0, 0, UP)), actualblocks, pow(10, 0, 6, 0, 0, UP)) | |
24 | 24 | if ((pmt.assetId != MDCAssetID)) | |
25 | 25 | then throw((("Incorrect asset attached, please attach " + toBase58String(MDCAssetID)) + " only.")) | |
26 | 26 | else if ((6 >= days)) | |
27 | 27 | then throw("Choose Locking days in between 7 to 90.") | |
28 | 28 | else if ((days > maximumlockdays)) | |
29 | 29 | then throw("You Entered days greater than 90 please Enter no. of days in between 7 to 90.") | |
30 | 30 | else if ((1000000000 > pmt.amount)) | |
31 | 31 | then throw("Please Attach minimum 10,000 MDC To Achieve SILVER TIER.") | |
32 | - | else if ((getStringValue(this, ("Lock_Status_Of_" + currentKey)) == lockstatus)) | |
33 | - | 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")) | |
34 | - | else if ((ULST >= pmt.amount)) | |
35 | - | 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), IntegerEntry(("Rewards_Of_" + currentKey), Tier1rewards)] | |
36 | - | else if ((ULGT >= pmt.amount)) | |
32 | + | else if ((ULST >= pmt.amount)) | |
33 | + | 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), IntegerEntry(("Rewards_Of_" + currentKey), Tier1rewards)] | |
34 | + | else if ((ULGT >= pmt.amount)) | |
35 | + | then [{ | |
36 | + | let Tier2 = 20 | |
37 | + | StringEntry(("Tier_Of_" + currentKey), "GOLD") | |
38 | + | }, 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)] | |
39 | + | else if ((pmt.amount >= ULDT)) | |
37 | 40 | then [{ | |
38 | - | let | |
39 | - | StringEntry(("Tier_Of_" + currentKey), " | |
41 | + | let Tier3 = 20 | |
42 | + | StringEntry(("Tier_Of_" + currentKey), "DIAMOND") | |
40 | 43 | }, 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)] | |
41 | - | else if ((pmt.amount >= ULDT)) | |
42 | - | then [{ | |
43 | - | let Tier3 = 20 | |
44 | - | StringEntry(("Tier_Of_" + currentKey), "DIAMOND") | |
45 | - | }, 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)] | |
46 | - | else [{ | |
47 | - | let Tier4 = 20 | |
48 | - | IntegerEntry(("Deposit_height_Of_" + currentKey), height) | |
49 | - | }, IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
44 | + | else [{ | |
45 | + | let Tier4 = 20 | |
46 | + | IntegerEntry(("Deposit_height_Of_" + currentKey), height) | |
47 | + | }, IntegerEntry(("Deposit_Amount_Of_" + currentKey), pmt.amount), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), totallockblocks), StringEntry(("Lock_Status_Of_" + currentKey), lockstatus)] | |
50 | 48 | } | |
51 | 49 | ||
52 | 50 | ||
53 | 51 | ||
54 | 52 | @Callable(i) | |
55 | 53 | func Withdraw () = { | |
56 | 54 | let currentKey = toBase58String(i.caller.bytes) | |
57 | 55 | let checkdepositvalue = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)) | |
58 | 56 | if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height)) | |
59 | 57 | 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)))) | |
60 | 58 | else if ((checkdepositvalue == 0)) | |
61 | 59 | then throw("You Have Already Withdraw your Amount.") | |
62 | 60 | else [ScriptTransfer(i.caller, getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)), MDCAssetID), ScriptTransfer(i.caller, getIntegerValue(this, ("Rewards_Of_" + currentKey)), USDNAssetID), 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"), IntegerEntry(("Rewards_Of_" + currentKey), 0)] | |
63 | 61 | } | |
64 | 62 | ||
65 | 63 | ||
66 | 64 | @Verifier(tx) | |
67 | 65 | func verify () = match tx { | |
68 | 66 | case _ => | |
69 | 67 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
70 | 68 | } | |
71 | 69 |
github/deemru/w8io/026f985 25.25 ms ◑