tx · 4YNL9wwUjKXdFZqjs5S7jfA4GRwjMqD1hDAh3hpMJmgq 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY: -0.01400000 Waves 2022.03.02 05:22 [1945744] smart account 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY > SELF 0.00000000 Waves
{ "type": 13, "id": "4YNL9wwUjKXdFZqjs5S7jfA4GRwjMqD1hDAh3hpMJmgq", "fee": 1400000, "feeAssetId": null, "timestamp": 1646187755132, "version": 2, "chainId": 84, "sender": "3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY", "senderPublicKey": "6w6geQvkvMqffnrYsamvmS9TjKjjePjFPWLY9qDbNddX", "proofs": [ "3MAyF6ssmyw161eBmNECZKtYwuKvXnWeqT5uArovnco8q3q5eyvgzA28dc2hAYYwpmdwDTxeyNe4tfYryRWUyLQM" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAtmc1ROQXNzZXRJRAEAAAAgnvVzUNkaAZFSSO4nPxeRoS4zrUxu6jad0qWebNIZFHoAAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAAR0eG5zBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMCAAAACVRvdGFsdHhucwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAAAAAAl0b3RhbHR4bnMJAABkAAAAAgUAAAAEdHhucwAAAAAAAAAAAQAAAAIAAAABaQEAAAAJSXNzdWVmc1ROAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYW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R4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleahUYac=", "height": 1945744, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FZuV51HFpoRQxuFjbHgQCwVrn4gq8YRy4AQQ2dhxkinB Next: none Diff:
Old | New | Differences | |
---|---|---|---|
28 | 28 | let n = (m + l) | |
29 | 29 | let o = (k - n) | |
30 | 30 | let p = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
31 | - | let q = (p + h.amount) | |
32 | - | let r = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
33 | - | let s = fraction(100000, q, n) | |
34 | - | let t = 100000000 | |
31 | + | let q = { | |
32 | + | let d = getInteger(this, "Total_Fee_Collected") | |
33 | + | if ($isInstanceOf(d, "Int")) | |
34 | + | then { | |
35 | + | let e = d | |
36 | + | e | |
37 | + | } | |
38 | + | else 0 | |
39 | + | } | |
40 | + | let r = (q + 100000000) | |
41 | + | let s = (p + h.amount) | |
42 | + | let t = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
43 | + | let u = fraction(100000, s, n) | |
35 | 44 | if (isDefined(h.assetId)) | |
36 | 45 | then throw("Incorrect asset attached, please attach TN.") | |
37 | 46 | else if ((200000000 > h.amount)) | |
38 | 47 | then throw("Please Attach minimum 2 TN To Issue fsTN Asset.") | |
39 | 48 | else if ((n > k)) | |
40 | 49 | then throw((((((("fsTN Minting is about to reach the Cap of " + toString(k)) + "/10^8 fsTN. Please Reduce your Minting Order by ") + toString(o)) + " or put ") + toString((k - m))) + "/10^8")) | |
41 | - | else [IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Balance_Minting_fsTN:", o), IntegerEntry("Total_fsTN_Reserve_In_TN:", | |
50 | + | else [IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Balance_Minting_fsTN:", o), IntegerEntry("Total_fsTN_Reserve_In_TN:", s), IntegerEntry("fsTN_Backup_Value_In_TN:", u), IntegerEntry("Total_Fee_Collected", r), IntegerEntry("Totaltxns", f), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, l, true), ScriptTransfer(g.caller, (l - r), a), ScriptTransfer(b, r, a)] | |
42 | 51 | } | |
43 | 52 | ||
44 | 53 | ||
48 | 57 | let i = toBase58String(g.callerPublicKey) | |
49 | 58 | let h = value(g.payments[0]) | |
50 | 59 | let m = getIntegerValue(this, "Total_Issued_fsTN:") | |
51 | - | let | |
60 | + | let v = getIntegerValue(this, "Total_Burned_fsTN:") | |
52 | 61 | let n = (m - h.amount) | |
53 | - | let | |
62 | + | let w = (v + h.amount) | |
54 | 63 | let p = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
55 | - | let | |
56 | - | let | |
57 | - | let | |
58 | - | let | |
64 | + | let t = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
65 | + | let x = fraction(t, h.amount, 100000) | |
66 | + | let s = (p - x) | |
67 | + | let u = fraction(100000, s, n) | |
59 | 68 | if ((h.assetId != a)) | |
60 | 69 | then throw((("Kindly Deposit Only " + toBase58String(a)) + " (fsTN).")) | |
61 | 70 | else if ((100000 > h.amount)) | |
62 | 71 | then throw("Attach Amount must be greater than 0.001 fsTN.") | |
63 | - | else [Burn(a, h.amount), IntegerEntry("Totaltxns", f), IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Total_Burned_fsTN:", | |
72 | + | else [Burn(a, h.amount), IntegerEntry("Totaltxns", f), IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Total_Burned_fsTN:", w), IntegerEntry("Total_fsTN_Reserve_In_TN:", s), IntegerEntry("fsTN_Backup_Value_In_TN:", u), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(g.caller, x, unit)] | |
64 | 73 | } | |
65 | 74 | ||
66 | 75 | ||
67 | - | @Verifier( | |
68 | - | func | |
69 | - | let d = | |
70 | - | sigVerify( | |
76 | + | @Verifier(y) | |
77 | + | func z () = { | |
78 | + | let d = y | |
79 | + | sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) | |
71 | 80 | } | |
72 | 81 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX' | |
5 | 5 | ||
6 | 6 | let b = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
7 | 7 | ||
8 | 8 | let c = { | |
9 | 9 | let d = getInteger(this, "Totaltxns") | |
10 | 10 | if ($isInstanceOf(d, "Int")) | |
11 | 11 | then { | |
12 | 12 | let e = d | |
13 | 13 | e | |
14 | 14 | } | |
15 | 15 | else 0 | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | let f = (c + 1) | |
19 | 19 | ||
20 | 20 | @Callable(g) | |
21 | 21 | func IssuefsTN () = { | |
22 | 22 | let h = value(g.payments[0]) | |
23 | 23 | let i = toBase58String(g.caller.bytes) | |
24 | 24 | let j = getIntegerValue(this, "fsTN/TN") | |
25 | 25 | let k = getIntegerValue(this, "fsTNCurrentCap") | |
26 | 26 | let l = fraction(100000, h.amount, j) | |
27 | 27 | let m = getIntegerValue(this, "Total_Issued_fsTN:") | |
28 | 28 | let n = (m + l) | |
29 | 29 | let o = (k - n) | |
30 | 30 | let p = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
31 | - | let q = (p + h.amount) | |
32 | - | let r = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
33 | - | let s = fraction(100000, q, n) | |
34 | - | let t = 100000000 | |
31 | + | let q = { | |
32 | + | let d = getInteger(this, "Total_Fee_Collected") | |
33 | + | if ($isInstanceOf(d, "Int")) | |
34 | + | then { | |
35 | + | let e = d | |
36 | + | e | |
37 | + | } | |
38 | + | else 0 | |
39 | + | } | |
40 | + | let r = (q + 100000000) | |
41 | + | let s = (p + h.amount) | |
42 | + | let t = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
43 | + | let u = fraction(100000, s, n) | |
35 | 44 | if (isDefined(h.assetId)) | |
36 | 45 | then throw("Incorrect asset attached, please attach TN.") | |
37 | 46 | else if ((200000000 > h.amount)) | |
38 | 47 | then throw("Please Attach minimum 2 TN To Issue fsTN Asset.") | |
39 | 48 | else if ((n > k)) | |
40 | 49 | then throw((((((("fsTN Minting is about to reach the Cap of " + toString(k)) + "/10^8 fsTN. Please Reduce your Minting Order by ") + toString(o)) + " or put ") + toString((k - m))) + "/10^8")) | |
41 | - | else [IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Balance_Minting_fsTN:", o), IntegerEntry("Total_fsTN_Reserve_In_TN:", | |
50 | + | else [IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Balance_Minting_fsTN:", o), IntegerEntry("Total_fsTN_Reserve_In_TN:", s), IntegerEntry("fsTN_Backup_Value_In_TN:", u), IntegerEntry("Total_Fee_Collected", r), IntegerEntry("Totaltxns", f), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, l, true), ScriptTransfer(g.caller, (l - r), a), ScriptTransfer(b, r, a)] | |
42 | 51 | } | |
43 | 52 | ||
44 | 53 | ||
45 | 54 | ||
46 | 55 | @Callable(g) | |
47 | 56 | func Liquidate () = { | |
48 | 57 | let i = toBase58String(g.callerPublicKey) | |
49 | 58 | let h = value(g.payments[0]) | |
50 | 59 | let m = getIntegerValue(this, "Total_Issued_fsTN:") | |
51 | - | let | |
60 | + | let v = getIntegerValue(this, "Total_Burned_fsTN:") | |
52 | 61 | let n = (m - h.amount) | |
53 | - | let | |
62 | + | let w = (v + h.amount) | |
54 | 63 | let p = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
55 | - | let | |
56 | - | let | |
57 | - | let | |
58 | - | let | |
64 | + | let t = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
65 | + | let x = fraction(t, h.amount, 100000) | |
66 | + | let s = (p - x) | |
67 | + | let u = fraction(100000, s, n) | |
59 | 68 | if ((h.assetId != a)) | |
60 | 69 | then throw((("Kindly Deposit Only " + toBase58String(a)) + " (fsTN).")) | |
61 | 70 | else if ((100000 > h.amount)) | |
62 | 71 | then throw("Attach Amount must be greater than 0.001 fsTN.") | |
63 | - | else [Burn(a, h.amount), IntegerEntry("Totaltxns", f), IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Total_Burned_fsTN:", | |
72 | + | else [Burn(a, h.amount), IntegerEntry("Totaltxns", f), IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Total_Burned_fsTN:", w), IntegerEntry("Total_fsTN_Reserve_In_TN:", s), IntegerEntry("fsTN_Backup_Value_In_TN:", u), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(g.caller, x, unit)] | |
64 | 73 | } | |
65 | 74 | ||
66 | 75 | ||
67 | - | @Verifier( | |
68 | - | func | |
69 | - | let d = | |
70 | - | sigVerify( | |
76 | + | @Verifier(y) | |
77 | + | func z () = { | |
78 | + | let d = y | |
79 | + | sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) | |
71 | 80 | } | |
72 | 81 |
github/deemru/w8io/026f985 55.87 ms ◑