tx · 42wzerQZueCmxXMhLkK9UkRzUPCYGtEnMWoRonniuMt8 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01400000 Waves 2021.10.14 20:53 [1746269] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{ "type": 13, "id": "42wzerQZueCmxXMhLkK9UkRzUPCYGtEnMWoRonniuMt8", "fee": 1400000, "feeAssetId": null, "timestamp": 1634234062496, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "4jpxrENVQfCHCi46G4DVoiVHmoop28gm6cveE3xGh6SpAfF3G15if7ZJjK3VBYuqKspwLL96fQ9Ufdh6QLZSCTZM" ], "script": "base64:AAIEAAAAAAAAAAkIAhIDCgEBEgAAAAAKAAAAAAtDT0RFQXNzZXRJRAEAAAAgkmB2qfKrqGeDE5s+bUmRW9TL3ErNp4dEODxuXgzu+JEAAAAAC1N0YXJ0SGVpZ2h0AAAAAAAAGqH4AAAAAAZvbmVkYXkAAAAAAAAABaAAAAAAD21pbmltdW1sb2NrZGF5cwAAAAAAAAAABgAAAAAPbWF4aW11bWxvY2tkYXlzAAAAAAAAAAAHAAAAAAlibG9ja2RpZmYJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtTdGFydEhlaWdodAAAAAALSW5mbGF0aW9uTm8JAABkAAAAAgkAAGsAAAADAAAAAAJUC+QAAAAAAAAAAAABBQAAAAlibG9ja2RpZmYAAAAAAAAAF3AAAAAAC1N0YWtpbmdEYXBwAQAAACCjtaSeUVhAbk0T+akFnLGoDh+X4aR50o/42ilEuU4EFgAAAAAKRmVlQWRkcmVzcwEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAACmRldkFkZHJlc3MBAAAAIHE/Oe1BrsJepSkes1ESh96Qyq2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AIJAAEsAAAAAgIAAAAPTG9ja19TdGF0dXNfT2ZfBQAAAApjdXJyZW50S2V5AgAAAAZVTkxPQ0sJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAALUmV3YXJkc19PZl8FAAAACmN1cnJlbnRLZXkAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAE1RvdGFsX0NPREVfQ2xhaW1lZDoFAAAAEnRvdGFscmV3YXJkY2xhaW1lZAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnhyp7A", "height": 1746269, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6cQ22RxzPFz91h1UDDEXPGoCR1tz1tW2Fz6o1dqVWjb6 Next: 94K27WJccbM8GAexGbXWWZFZcLdjN9GJbMWbF52CmrpX Diff:
Old | New | Differences | |
---|---|---|---|
93 | 93 | then throw(((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + n)))) + " CODE are Under Lock. Consider last 8 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + n)) - height)))) | |
94 | 94 | else if ((F == 0)) | |
95 | 95 | then throw("You Have Already Withdraw your CODE Amount.") | |
96 | - | else [IntegerEntry("Total_Issued_CODE:", L), Reissue(a, getIntegerValue(this, ("Rewards_Of_" + n)), true), ScriptTransfer(k.caller, getIntegerValue(this, ("Rewards_Of_" + n)), a), IntegerEntry(("Deposit_height_Of_" + n), 0), IntegerEntry("Staked_Amount", H), IntegerEntry(("Deposit_Amount_Of_" + n), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + n), 0), StringEntry(("Lock_Status_Of_" + n), "UNLOCK"), IntegerEntry(("Rewards_Of_" + n), 0), IntegerEntry("Total_CODE_Claimed:", J)] | |
96 | + | else [IntegerEntry("Total_Issued_CODE:", L), Reissue(a, getIntegerValue(this, ("Rewards_Of_" + n)), true), ScriptTransfer(k.caller, getIntegerValue(this, ("Rewards_Of_" + n)), a), IntegerEntry("Total_Txns:", v), IntegerEntry(("Deposit_height_Of_" + n), 0), IntegerEntry("Staked_Amount", H), IntegerEntry(("Deposit_Amount_Of_" + n), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + n), 0), StringEntry(("Lock_Status_Of_" + n), "UNLOCK"), IntegerEntry(("Rewards_Of_" + n), 0), IntegerEntry("Total_CODE_Claimed:", J)] | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'ArPqXguhFLjJt5XwcNwhXMnCv2zSumrM19y5WgT34yRi' | |
5 | 5 | ||
6 | 6 | let b = 1745400 | |
7 | 7 | ||
8 | 8 | let c = 1440 | |
9 | 9 | ||
10 | 10 | let d = 6 | |
11 | 11 | ||
12 | 12 | let e = 7 | |
13 | 13 | ||
14 | 14 | let f = (height - b) | |
15 | 15 | ||
16 | 16 | let g = (fraction(10000000000, 1, f) + 6000) | |
17 | 17 | ||
18 | 18 | let h = base58'C246qxhuyo9DBk1pjMzEQSVAWmiqYupG2swGkxTeAvLV' | |
19 | 19 | ||
20 | 20 | let i = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' | |
21 | 21 | ||
22 | 22 | let j = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
23 | 23 | ||
24 | 24 | @Callable(k) | |
25 | 25 | func Deposit (l) = { | |
26 | 26 | let m = if ((size(k.payments) == 1)) | |
27 | 27 | then k.payments[0] | |
28 | 28 | else throw("No Payments Attached Please Attach CODE Asset Only.") | |
29 | 29 | let n = toBase58String(k.caller.bytes) | |
30 | 30 | let o = ((((g * m.amount) * l) / 365) / 1000) | |
31 | 31 | let p = (f * 100000) | |
32 | 32 | let q = (c * l) | |
33 | 33 | let r = (height + q) | |
34 | 34 | let s = getIntegerValue(this, "Total_Burned_CODE:") | |
35 | 35 | let t = (s + m.amount) | |
36 | 36 | let u = getIntegerValue(this, "Total_Txns:") | |
37 | 37 | let v = (u + 1) | |
38 | 38 | let w = valueOrErrorMessage(getInteger(addressFromPublicKey(h), ("Deposit_height_Of_" + n)), "Your Address not Found on Staking DApp") | |
39 | 39 | let x = valueOrErrorMessage(getInteger(addressFromPublicKey(h), ("Total_Lock_Blocks_Of_" + n)), "Your Address not Found on Staking DApp") | |
40 | 40 | let y = (x - w) | |
41 | 41 | let z = { | |
42 | 42 | let A = getInteger(this, "Staked_Amount") | |
43 | 43 | if ($isInstanceOf(A, "Int")) | |
44 | 44 | then { | |
45 | 45 | let B = A | |
46 | 46 | B | |
47 | 47 | } | |
48 | 48 | else 0 | |
49 | 49 | } | |
50 | 50 | let C = (z + m.amount) | |
51 | 51 | let D = { | |
52 | 52 | let A = getInteger(this, ("Deposit_Amount_Of_" + n)) | |
53 | 53 | if ($isInstanceOf(A, "Int")) | |
54 | 54 | then { | |
55 | 55 | let B = A | |
56 | 56 | B | |
57 | 57 | } | |
58 | 58 | else 0 | |
59 | 59 | } | |
60 | 60 | let E = (D + m.amount) | |
61 | 61 | if ((b > height)) | |
62 | 62 | then throw((("DApp is Not Started Yet please Wait until " + toString((b - height))) + " blocks")) | |
63 | 63 | else if ((m.assetId != a)) | |
64 | 64 | then throw(("Incorrect asset attached, please attach " + toBase58String(a))) | |
65 | 65 | else if ((d >= l)) | |
66 | 66 | then throw(((("Choose Locking days in between " + toString((d + 1))) + " to ") + toString(e))) | |
67 | 67 | else if ((l > e)) | |
68 | 68 | then throw(((((("You Entered days to " + toString(l)) + ", Please Enter no. of days in between ") + toString((d + 1))) + " to ") + toString(e))) | |
69 | 69 | else if ((100000 > m.amount)) | |
70 | 70 | then throw("Please Attach minimum 0.001 CODE To Issue CODE Asset.") | |
71 | 71 | else if ((m.amount > p)) | |
72 | 72 | then throw((("You can attach maximum " + toString(p)) + "/10^8 CODE.")) | |
73 | 73 | else if ((y != 129600)) | |
74 | 74 | then throw("You are Not Eligible to Mint CODE. It need minimum 90 Days Staking.") | |
75 | 75 | else [Burn(a, m.amount), IntegerEntry("Total_Burned_CODE:", t), IntegerEntry("Staked_Amount", C), IntegerEntry("Total_Txns:", v), IntegerEntry("Inflation", g), IntegerEntry(("Deposit_height_Of_" + n), height), IntegerEntry(("Deposit_Amount_Of_" + n), E), IntegerEntry(("Total_Lock_Blocks_Of_" + n), r), IntegerEntry(("Rewards_Of_" + n), o), StringEntry("message", "<h1>CODE Staked Successfully!</h1><br>")] | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | ||
80 | 80 | @Callable(k) | |
81 | 81 | func Withdraw () = { | |
82 | 82 | let n = toBase58String(k.caller.bytes) | |
83 | 83 | let F = getIntegerValue(this, ("Deposit_Amount_Of_" + n)) | |
84 | 84 | let G = getIntegerValue(this, "Staked_Amount") | |
85 | 85 | let H = (G - F) | |
86 | 86 | let I = getIntegerValue(this, "Total_CODE_Claimed:") | |
87 | 87 | let J = (I + getIntegerValue(this, ("Rewards_Of_" + n))) | |
88 | 88 | let K = getIntegerValue(this, "Total_Issued_CODE:") | |
89 | 89 | let L = (K + F) | |
90 | 90 | let u = getIntegerValue(this, "Total_Txns:") | |
91 | 91 | let v = (u + 1) | |
92 | 92 | if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + n)) > height)) | |
93 | 93 | then throw(((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + n)))) + " CODE are Under Lock. Consider last 8 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + n)) - height)))) | |
94 | 94 | else if ((F == 0)) | |
95 | 95 | then throw("You Have Already Withdraw your CODE Amount.") | |
96 | - | else [IntegerEntry("Total_Issued_CODE:", L), Reissue(a, getIntegerValue(this, ("Rewards_Of_" + n)), true), ScriptTransfer(k.caller, getIntegerValue(this, ("Rewards_Of_" + n)), a), IntegerEntry(("Deposit_height_Of_" + n), 0), IntegerEntry("Staked_Amount", H), IntegerEntry(("Deposit_Amount_Of_" + n), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + n), 0), StringEntry(("Lock_Status_Of_" + n), "UNLOCK"), IntegerEntry(("Rewards_Of_" + n), 0), IntegerEntry("Total_CODE_Claimed:", J)] | |
96 | + | else [IntegerEntry("Total_Issued_CODE:", L), Reissue(a, getIntegerValue(this, ("Rewards_Of_" + n)), true), ScriptTransfer(k.caller, getIntegerValue(this, ("Rewards_Of_" + n)), a), IntegerEntry("Total_Txns:", v), IntegerEntry(("Deposit_height_Of_" + n), 0), IntegerEntry("Staked_Amount", H), IntegerEntry(("Deposit_Amount_Of_" + n), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + n), 0), StringEntry(("Lock_Status_Of_" + n), "UNLOCK"), IntegerEntry(("Rewards_Of_" + n), 0), IntegerEntry("Total_CODE_Claimed:", J)] | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Verifier(M) | |
101 | 101 | func N () = sigVerify(M.bodyBytes, M.proofs[0], M.senderPublicKey) | |
102 | 102 |
github/deemru/w8io/169f3d6 41.34 ms ◑