tx · 4LGnpPmveuF3Za6XSFuxxxPqctSrjeo5kmzUZ2jrsRXE

3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY:  -0.01400000 Waves

2022.03.02 05:04 [1945723] smart account 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY > SELF 0.00000000 Waves

{ "type": 13, "id": "4LGnpPmveuF3Za6XSFuxxxPqctSrjeo5kmzUZ2jrsRXE", "fee": 1400000, "feeAssetId": null, "timestamp": 1646186679629, "version": 2, "chainId": 84, "sender": "3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY", "senderPublicKey": "6w6geQvkvMqffnrYsamvmS9TjKjjePjFPWLY9qDbNddX", "proofs": [ "4zjGT9xhmZmDjmxVrYvs3m7KsM69G9fghD45tLXvxNZEAKEM1K43aZ2QgjD2mQ2cUNZm9eVjCrG79SXrifdYh1XB" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAtmc1ROQXNzZXRJRAEAAAAgnvVzUNkaAZFSSO4nPxeRoS4zrUxu6jad0qWebNIZFHoAAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAAR0eG5zBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMCAAAACVRvdGFsVHhucwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAAAAAAl0b3RhbHR4bnMJAABkAAAAAgUAAAAEdHhucwAAAAAAAAAAAQAAAAIAAAABaQEAAAAJSXNzdWVmc1ROAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZ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kABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAJVG90YWx0eG5zBQAAAAl0b3RhbHR4bnMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAElRvdGFsX0lzc3VlZF9mc1ROOgUAAAAPVG90YWxJc3N1ZWRmc1ROCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABJUb3RhbF9CdXJuZWRfZnNUTjoFAAAAD1RvdGFsQnVybmVkZnNUTgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAZVG90YWxfZnNUTl9SZXNlcnZlX0luX1ROOgUAAAAQZnNUTlJlc2VydmVWYWx1ZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAYZnNUTl9CYWNrdXBfVmFsdWVfSW5fVE46BQAAAA9mc1ROQmFja3VwUHJpY2UJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQIAAAAqPGgxPmZzVE4gTGlxdWlkYXRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAASY2FsY3VsYXRlYnVybnZhbHVlBQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlw2Emw", "height": 1945723, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DYuCAupur9cLbjLkjNGkW79WYNX9uYNvgmCcYMRxWwtZ Next: FZuV51HFpoRQxuFjbHgQCwVrn4gq8YRy4AQQ2dhxkinB Diff:
OldNewDifferences
55
66 let b = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
77
8-@Callable(c)
8+let c = {
9+ let d = getInteger(this, "TotalTxns")
10+ if ($isInstanceOf(d, "Int"))
11+ then {
12+ let e = d
13+ e
14+ }
15+ else 0
16+ }
17+
18+let f = (c + 1)
19+
20+@Callable(g)
921 func IssuefsTN () = {
10- let d = value(c.payments[0])
11- let e = toBase58String(c.caller.bytes)
12- let f = getIntegerValue(this, "fsTN/TN")
13- let g = getIntegerValue(this, "fsTNCurrentCap")
14- let h = fraction(100000, d.amount, f)
15- let i = getIntegerValue(this, "Total_Issued_fsTN:")
16- let j = getIntegerValue(this, "Totaltxns")
17- let k = (j + 1)
18- let l = (i + h)
19- let m = (g - l)
20- let n = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
21- let o = (n + d.amount)
22- let p = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
23- let q = fraction(100000, o, l)
24- let r = 100000000
25- if (isDefined(d.assetId))
22+ let h = value(g.payments[0])
23+ let i = toBase58String(g.caller.bytes)
24+ let j = getIntegerValue(this, "fsTN/TN")
25+ let k = getIntegerValue(this, "fsTNCurrentCap")
26+ let l = fraction(100000, h.amount, j)
27+ let m = getIntegerValue(this, "Total_Issued_fsTN:")
28+ let n = (m + l)
29+ let o = (k - n)
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
35+ if (isDefined(h.assetId))
2636 then throw("Incorrect asset attached, please attach TN.")
27- else if ((200000000 > d.amount))
37+ else if ((200000000 > h.amount))
2838 then throw("Please Attach minimum 2 TN To Issue fsTN Asset.")
29- else if ((l > g))
30- then throw((((((("fsTN Minting is about to reach the Cap of " + toString(g)) + "/10^8 fsTN. Please Reduce your Minting Order by ") + toString(m)) + " or put ") + toString((g - i))) + "/10^8"))
31- else [IntegerEntry("Total_Issued_fsTN:", l), IntegerEntry("Balance_Minting_fsTN:", m), IntegerEntry("Total_fsTN_Reserve_In_TN:", o), IntegerEntry("fsTN_Backup_Value_In_TN:", q), IntegerEntry("Totaltxns", k), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, h, true), ScriptTransfer(c.caller, (h - r), a), ScriptTransfer(b, r, a)]
39+ else if ((n > k))
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+ 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)]
3242 }
3343
3444
3545
36-@Callable(c)
46+@Callable(g)
3747 func Liquidate () = {
38- let e = toBase58String(c.callerPublicKey)
39- let d = value(c.payments[0])
40- let i = getIntegerValue(this, "Total_Issued_fsTN:")
41- let s = getIntegerValue(this, "Total_Burned_fsTN:")
42- let l = (i - d.amount)
43- let t = (s + d.amount)
44- let n = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
45- let p = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
46- let u = fraction(p, d.amount, 100000)
47- let o = (n - u)
48- let q = fraction(100000, o, l)
49- if ((d.assetId != a))
48+ let i = toBase58String(g.callerPublicKey)
49+ let h = value(g.payments[0])
50+ let m = getIntegerValue(this, "Total_Issued_fsTN:")
51+ let u = getIntegerValue(this, "Total_Burned_fsTN:")
52+ let n = (m - h.amount)
53+ let v = (u + h.amount)
54+ let p = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
55+ let r = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
56+ let w = fraction(r, h.amount, 100000)
57+ let q = (p - w)
58+ let s = fraction(100000, q, n)
59+ if ((h.assetId != a))
5060 then throw((("Kindly Deposit Only " + toBase58String(a)) + " (fsTN)."))
51- else if ((100000 > d.amount))
61+ else if ((100000 > h.amount))
5262 then throw("Attach Amount must be greater than 0.001 fsTN.")
53- else [Burn(a, d.amount), IntegerEntry("Total_Issued_fsTN:", l), IntegerEntry("Total_Burned_fsTN:", t), IntegerEntry("Total_fsTN_Reserve_In_TN:", o), IntegerEntry("fsTN_Backup_Value_In_TN:", q), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(c.caller, u, unit)]
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)]
5464 }
5565
5666
57-@Verifier(v)
58-func w () = {
59- let x = v
60- sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey)
67+@Verifier(x)
68+func y () = {
69+ let d = x
70+ sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey)
6171 }
6272
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX'
55
66 let b = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
77
8-@Callable(c)
8+let c = {
9+ let d = getInteger(this, "TotalTxns")
10+ if ($isInstanceOf(d, "Int"))
11+ then {
12+ let e = d
13+ e
14+ }
15+ else 0
16+ }
17+
18+let f = (c + 1)
19+
20+@Callable(g)
921 func IssuefsTN () = {
10- let d = value(c.payments[0])
11- let e = toBase58String(c.caller.bytes)
12- let f = getIntegerValue(this, "fsTN/TN")
13- let g = getIntegerValue(this, "fsTNCurrentCap")
14- let h = fraction(100000, d.amount, f)
15- let i = getIntegerValue(this, "Total_Issued_fsTN:")
16- let j = getIntegerValue(this, "Totaltxns")
17- let k = (j + 1)
18- let l = (i + h)
19- let m = (g - l)
20- let n = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
21- let o = (n + d.amount)
22- let p = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
23- let q = fraction(100000, o, l)
24- let r = 100000000
25- if (isDefined(d.assetId))
22+ let h = value(g.payments[0])
23+ let i = toBase58String(g.caller.bytes)
24+ let j = getIntegerValue(this, "fsTN/TN")
25+ let k = getIntegerValue(this, "fsTNCurrentCap")
26+ let l = fraction(100000, h.amount, j)
27+ let m = getIntegerValue(this, "Total_Issued_fsTN:")
28+ let n = (m + l)
29+ let o = (k - n)
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
35+ if (isDefined(h.assetId))
2636 then throw("Incorrect asset attached, please attach TN.")
27- else if ((200000000 > d.amount))
37+ else if ((200000000 > h.amount))
2838 then throw("Please Attach minimum 2 TN To Issue fsTN Asset.")
29- else if ((l > g))
30- then throw((((((("fsTN Minting is about to reach the Cap of " + toString(g)) + "/10^8 fsTN. Please Reduce your Minting Order by ") + toString(m)) + " or put ") + toString((g - i))) + "/10^8"))
31- else [IntegerEntry("Total_Issued_fsTN:", l), IntegerEntry("Balance_Minting_fsTN:", m), IntegerEntry("Total_fsTN_Reserve_In_TN:", o), IntegerEntry("fsTN_Backup_Value_In_TN:", q), IntegerEntry("Totaltxns", k), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, h, true), ScriptTransfer(c.caller, (h - r), a), ScriptTransfer(b, r, a)]
39+ else if ((n > k))
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+ 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)]
3242 }
3343
3444
3545
36-@Callable(c)
46+@Callable(g)
3747 func Liquidate () = {
38- let e = toBase58String(c.callerPublicKey)
39- let d = value(c.payments[0])
40- let i = getIntegerValue(this, "Total_Issued_fsTN:")
41- let s = getIntegerValue(this, "Total_Burned_fsTN:")
42- let l = (i - d.amount)
43- let t = (s + d.amount)
44- let n = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
45- let p = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
46- let u = fraction(p, d.amount, 100000)
47- let o = (n - u)
48- let q = fraction(100000, o, l)
49- if ((d.assetId != a))
48+ let i = toBase58String(g.callerPublicKey)
49+ let h = value(g.payments[0])
50+ let m = getIntegerValue(this, "Total_Issued_fsTN:")
51+ let u = getIntegerValue(this, "Total_Burned_fsTN:")
52+ let n = (m - h.amount)
53+ let v = (u + h.amount)
54+ let p = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
55+ let r = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
56+ let w = fraction(r, h.amount, 100000)
57+ let q = (p - w)
58+ let s = fraction(100000, q, n)
59+ if ((h.assetId != a))
5060 then throw((("Kindly Deposit Only " + toBase58String(a)) + " (fsTN)."))
51- else if ((100000 > d.amount))
61+ else if ((100000 > h.amount))
5262 then throw("Attach Amount must be greater than 0.001 fsTN.")
53- else [Burn(a, d.amount), IntegerEntry("Total_Issued_fsTN:", l), IntegerEntry("Total_Burned_fsTN:", t), IntegerEntry("Total_fsTN_Reserve_In_TN:", o), IntegerEntry("fsTN_Backup_Value_In_TN:", q), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(c.caller, u, unit)]
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)]
5464 }
5565
5666
57-@Verifier(v)
58-func w () = {
59- let x = v
60- sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey)
67+@Verifier(x)
68+func y () = {
69+ let d = x
70+ sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey)
6171 }
6272

github/deemru/w8io/026f985 
39.70 ms