tx · ER9trjjaDpwAgmmEcsKbxF8f5d9twbVGVrdzETZ2HCS9

3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY:  -0.01400000 Waves

2022.03.01 17:51 [1945061] smart account 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY > SELF 0.00000000 Waves

{ "type": 13, "id": "ER9trjjaDpwAgmmEcsKbxF8f5d9twbVGVrdzETZ2HCS9", "fee": 1400000, "feeAssetId": null, "timestamp": 1646146295848, "version": 2, "chainId": 84, "sender": "3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY", "senderPublicKey": "6w6geQvkvMqffnrYsamvmS9TjKjjePjFPWLY9qDbNddX", "proofs": [ "ErN7hvVQs6HDCzGwkLJVFyCvRkeAMPRkMqHQoL8gGxGLvFmrxv9A7TSKRSr53F5kmuHpW75vSMEQs6cPcy42Rqp" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAACAAAAAAtmc1ROQXNzZXRJRAEAAAAgunlRijbGbPphc8vWuPRLktrcUDjlRgQdfuCFMS9mn34AAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAgAAAAFpAQAAAAlJc3N1ZWZzVE4AAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAMUHJpY2VQZXJmc1ROCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAdmc1ROL1ROBAAAAA5mc1ROQ3VycmVudENhcAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAOZnNUTkN1cnJlbnR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mFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAASY2FsY3VsYXRlYnVybnZhbHVlBQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnFNYUD", "height": 1945061, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C8pTU5ToujsuEratAAbT5NQc6qFiHByYGyWg7nc42KUk Next: 7dkqn1Gbs8niR3YWhGCsfh8toga3VtpaZM4keAjVrPnf Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX'
4+let a = base58'DYv8LXPqdm9N6xTdnfqrHzH9RMTnXLnfkYHffauHNc7o'
55
6-let b = addressFromPublicKey(base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr')
6+let b = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
77
88 @Callable(c)
99 func IssuefsTN () = {
1010 let d = value(c.payments[0])
1111 let e = toBase58String(c.caller.bytes)
1212 let f = getIntegerValue(this, "fsTN/TN")
13- let g = fraction(100000, d.amount, f)
14- let h = getIntegerValue(this, "Total_Issued_fsTN:")
15- let i = (h + g)
16- let j = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
17- let k = (j + d.amount)
18- let l = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
19- let m = fraction(100000, k, i)
20- let n = 100000000
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 = (i + h)
17+ let k = (g - j)
18+ let l = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
19+ let m = (l + d.amount)
20+ let n = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
21+ let o = fraction(100000, m, j)
22+ let p = 100000000
2123 if (isDefined(d.assetId))
2224 then throw("Incorrect asset attached, please attach TN.")
2325 else if ((200000000 > d.amount))
2426 then throw("Please Attach minimum 2 TN To Issue fsTN Asset.")
25- else [IntegerEntry("Total_Issued_fsTN:", i), IntegerEntry("Total_fsTN_Reserve_In_TN:", k), IntegerEntry("fsTN_Backup_Value_In_TN:", m), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, g, true), ScriptTransfer(c.caller, (g - n), a), ScriptTransfer(b, n, a)]
27+ else if ((j > g))
28+ then throw((((((("fsTN Minting is about to reach the Cap of " + toString(g)) + "/10^8 fsTN. Please Reduce your Minting Order by ") + toString(k)) + " or put ") + toString((g - i))) + "/10^8"))
29+ else [IntegerEntry("Total_Issued_fsTN:", j), IntegerEntry("Balance_Minting_fsTN:", k), IntegerEntry("Total_fsTN_Reserve_In_TN:", m), IntegerEntry("fsTN_Backup_Value_In_TN:", o), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, h, true), ScriptTransfer(c.caller, (h - p), a), ScriptTransfer(b, p, a)]
2630 }
2731
2832
3135 func Liquidate () = {
3236 let e = toBase58String(c.callerPublicKey)
3337 let d = value(c.payments[0])
34- let h = getIntegerValue(this, "Total_Issued_fsTN:")
35- let i = (h - d.amount)
36- let j = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
37- let l = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
38- let o = fraction(l, d.amount, 100000)
39- let k = (j - o)
40- let m = fraction(100000, k, i)
38+ let i = getIntegerValue(this, "Total_Issued_fsTN:")
39+ let j = (i - d.amount)
40+ let l = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
41+ let n = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
42+ let q = fraction(n, d.amount, 100000)
43+ let m = (l - q)
44+ let o = fraction(100000, m, j)
4145 if ((d.assetId != a))
4246 then throw((("Kindly Deposit Only " + toBase58String(a)) + " (fsTN)."))
4347 else if ((100000 > d.amount))
4448 then throw("Attach Amount must be greater than 0.001 fsTN.")
45- else [Burn(a, d.amount), IntegerEntry("Total_Issued_fsTN:", i), IntegerEntry("Total_fsTN_Reserve_In_TN:", k), IntegerEntry("fsTN_Backup_Value_In_TN:", m), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(c.caller, o, unit)]
49+ else [Burn(a, d.amount), IntegerEntry("Total_Issued_fsTN:", j), IntegerEntry("Total_fsTN_Reserve_In_TN:", m), IntegerEntry("fsTN_Backup_Value_In_TN:", o), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(c.caller, q, unit)]
4650 }
4751
4852
49-@Verifier(p)
50-func q () = {
51- let r = p
52- sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
53+@Verifier(r)
54+func s () = {
55+ let t = r
56+ sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
5357 }
5458
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX'
4+let a = base58'DYv8LXPqdm9N6xTdnfqrHzH9RMTnXLnfkYHffauHNc7o'
55
6-let b = addressFromPublicKey(base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr')
6+let b = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
77
88 @Callable(c)
99 func IssuefsTN () = {
1010 let d = value(c.payments[0])
1111 let e = toBase58String(c.caller.bytes)
1212 let f = getIntegerValue(this, "fsTN/TN")
13- let g = fraction(100000, d.amount, f)
14- let h = getIntegerValue(this, "Total_Issued_fsTN:")
15- let i = (h + g)
16- let j = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
17- let k = (j + d.amount)
18- let l = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
19- let m = fraction(100000, k, i)
20- let n = 100000000
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 = (i + h)
17+ let k = (g - j)
18+ let l = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
19+ let m = (l + d.amount)
20+ let n = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
21+ let o = fraction(100000, m, j)
22+ let p = 100000000
2123 if (isDefined(d.assetId))
2224 then throw("Incorrect asset attached, please attach TN.")
2325 else if ((200000000 > d.amount))
2426 then throw("Please Attach minimum 2 TN To Issue fsTN Asset.")
25- else [IntegerEntry("Total_Issued_fsTN:", i), IntegerEntry("Total_fsTN_Reserve_In_TN:", k), IntegerEntry("fsTN_Backup_Value_In_TN:", m), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, g, true), ScriptTransfer(c.caller, (g - n), a), ScriptTransfer(b, n, a)]
27+ else if ((j > g))
28+ then throw((((((("fsTN Minting is about to reach the Cap of " + toString(g)) + "/10^8 fsTN. Please Reduce your Minting Order by ") + toString(k)) + " or put ") + toString((g - i))) + "/10^8"))
29+ else [IntegerEntry("Total_Issued_fsTN:", j), IntegerEntry("Balance_Minting_fsTN:", k), IntegerEntry("Total_fsTN_Reserve_In_TN:", m), IntegerEntry("fsTN_Backup_Value_In_TN:", o), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(a, h, true), ScriptTransfer(c.caller, (h - p), a), ScriptTransfer(b, p, a)]
2630 }
2731
2832
2933
3034 @Callable(c)
3135 func Liquidate () = {
3236 let e = toBase58String(c.callerPublicKey)
3337 let d = value(c.payments[0])
34- let h = getIntegerValue(this, "Total_Issued_fsTN:")
35- let i = (h - d.amount)
36- let j = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
37- let l = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
38- let o = fraction(l, d.amount, 100000)
39- let k = (j - o)
40- let m = fraction(100000, k, i)
38+ let i = getIntegerValue(this, "Total_Issued_fsTN:")
39+ let j = (i - d.amount)
40+ let l = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
41+ let n = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
42+ let q = fraction(n, d.amount, 100000)
43+ let m = (l - q)
44+ let o = fraction(100000, m, j)
4145 if ((d.assetId != a))
4246 then throw((("Kindly Deposit Only " + toBase58String(a)) + " (fsTN)."))
4347 else if ((100000 > d.amount))
4448 then throw("Attach Amount must be greater than 0.001 fsTN.")
45- else [Burn(a, d.amount), IntegerEntry("Total_Issued_fsTN:", i), IntegerEntry("Total_fsTN_Reserve_In_TN:", k), IntegerEntry("fsTN_Backup_Value_In_TN:", m), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(c.caller, o, unit)]
49+ else [Burn(a, d.amount), IntegerEntry("Total_Issued_fsTN:", j), IntegerEntry("Total_fsTN_Reserve_In_TN:", m), IntegerEntry("fsTN_Backup_Value_In_TN:", o), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(c.caller, q, unit)]
4650 }
4751
4852
49-@Verifier(p)
50-func q () = {
51- let r = p
52- sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
53+@Verifier(r)
54+func s () = {
55+ let t = r
56+ sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
5357 }
5458

github/deemru/w8io/026f985 
27.14 ms