tx · FZuV51HFpoRQxuFjbHgQCwVrn4gq8YRy4AQQ2dhxkinB 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY: -0.01400000 Waves 2022.03.02 05:05 [1945725] smart account 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY > SELF 0.00000000 Waves
{ "type": 13, "id": "FZuV51HFpoRQxuFjbHgQCwVrn4gq8YRy4AQQ2dhxkinB", "fee": 1400000, "feeAssetId": null, "timestamp": 1646186774754, "version": 2, "chainId": 84, "sender": "3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY", "senderPublicKey": "6w6geQvkvMqffnrYsamvmS9TjKjjePjFPWLY9qDbNddX", "proofs": [ "3b16n49uBFSuShfZ5YhMmsiGDqZvHgX9f5SW5eFBJzgDK9qbMMqtyNgzAa71qJipNtog6GzgQB8naT7sA1y49ifs" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAtmc1ROQXNzZXRJRAEAAAAgnvVzUNkaAZFSSO4nPxeRoS4zrUxu6jad0qWebNIZFHoAAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAAR0eG5zBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMCAAAACVRvdGFsdHhucwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAAAAAAl0b3RhbHR4bnMJAABkAAAAAgUAAAAEdHhucwAAAAAAAAAAAQAAAAIAAAABaQEAAAAJSXNzdWVmc1ROAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxs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AAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAJVG90YWx0eG5zBQAAAAl0b3RhbHR4bnMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAElRvdGFsX0lzc3VlZF9mc1ROOgUAAAAPVG90YWxJc3N1ZWRmc1ROCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABJUb3RhbF9CdXJuZWRfZnNUTjoFAAAAD1RvdGFsQnVybmVkZnNUTgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAZVG90YWxfZnNUTl9SZXNlcnZlX0luX1ROOgUAAAAQZnNUTlJlc2VydmVWYWx1ZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAYZnNUTl9CYWNrdXBfVmFsdWVfSW5fVE46BQAAAA9mc1ROQmFja3VwUHJpY2UJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQIAAAAqPGgxPmZzVE4gTGlxdWlkYXRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAASY2FsY3VsYXRlYnVybnZhbHVlBQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk31NKK", "height": 1945725, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4LGnpPmveuF3Za6XSFuxxxPqctSrjeo5kmzUZ2jrsRXE Next: 4YNL9wwUjKXdFZqjs5S7jfA4GRwjMqD1hDAh3hpMJmgq Diff:
Old | New | Differences | |
---|---|---|---|
6 | 6 | let b = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
7 | 7 | ||
8 | 8 | let c = { | |
9 | - | let d = getInteger(this, " | |
9 | + | let d = getInteger(this, "Totaltxns") | |
10 | 10 | if ($isInstanceOf(d, "Int")) | |
11 | 11 | then { | |
12 | 12 | let e = d |
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 | - | let d = getInteger(this, " | |
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 | 31 | let q = (p + h.amount) | |
32 | 32 | let r = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
33 | 33 | let s = fraction(100000, q, n) | |
34 | 34 | let t = 100000000 | |
35 | 35 | if (isDefined(h.assetId)) | |
36 | 36 | then throw("Incorrect asset attached, please attach TN.") | |
37 | 37 | else if ((200000000 > h.amount)) | |
38 | 38 | then throw("Please Attach minimum 2 TN To Issue fsTN Asset.") | |
39 | 39 | else if ((n > k)) | |
40 | 40 | 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 | 41 | else [IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Balance_Minting_fsTN:", o), IntegerEntry("Total_fsTN_Reserve_In_TN:", q), IntegerEntry("fsTN_Backup_Value_In_TN:", s), IntegerEntry("Totaltxns", f), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, l, true), ScriptTransfer(g.caller, (l - t), a), ScriptTransfer(b, t, a)] | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(g) | |
47 | 47 | func Liquidate () = { | |
48 | 48 | let i = toBase58String(g.callerPublicKey) | |
49 | 49 | let h = value(g.payments[0]) | |
50 | 50 | let m = getIntegerValue(this, "Total_Issued_fsTN:") | |
51 | 51 | let u = getIntegerValue(this, "Total_Burned_fsTN:") | |
52 | 52 | let n = (m - h.amount) | |
53 | 53 | let v = (u + h.amount) | |
54 | 54 | let p = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
55 | 55 | let r = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
56 | 56 | let w = fraction(r, h.amount, 100000) | |
57 | 57 | let q = (p - w) | |
58 | 58 | let s = fraction(100000, q, n) | |
59 | 59 | if ((h.assetId != a)) | |
60 | 60 | then throw((("Kindly Deposit Only " + toBase58String(a)) + " (fsTN).")) | |
61 | 61 | else if ((100000 > h.amount)) | |
62 | 62 | then throw("Attach Amount must be greater than 0.001 fsTN.") | |
63 | 63 | else [Burn(a, h.amount), IntegerEntry("Totaltxns", f), IntegerEntry("Total_Issued_fsTN:", n), IntegerEntry("Total_Burned_fsTN:", v), IntegerEntry("Total_fsTN_Reserve_In_TN:", q), IntegerEntry("fsTN_Backup_Value_In_TN:", s), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(g.caller, w, unit)] | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | @Verifier(x) | |
68 | 68 | func y () = { | |
69 | 69 | let d = x | |
70 | 70 | sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey) | |
71 | 71 | } | |
72 | 72 |
github/deemru/w8io/026f985 25.20 ms ◑