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
44 let fsTNAssetID = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX'
55
66 let IssuefsTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
7+
8+let txns = match getInteger(this, "TotalTxns") {
9+ case a: Int =>
10+ a
11+ case _ =>
12+ 0
13+}
14+
15+let totaltxns = (txns + 1)
716
817 @Callable(i)
918 func IssuefsTN () = {
1322 let fsTNCurrentCap = getIntegerValue(this, "fsTNCurrentCap")
1423 let NewfsTNToUser = fraction(100000, pmt.amount, PricePerfsTN)
1524 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
16- let txns = getIntegerValue(this, "Totaltxns")
17- let totaltxns = (txns + 1)
1825 let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser)
1926 let PendingMinting = (fsTNCurrentCap - TotalIssuedfsTN)
2027 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
5057 then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN)."))
5158 else if ((100000 > pmt.amount))
5259 then throw("Attach Amount must be greater than 0.001 fsTN.")
53- else [Burn(fsTNAssetID, pmt.amount), IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_Burned_fsTN:", TotalBurnedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, calculateburnvalue, unit)]
60+ else [Burn(fsTNAssetID, pmt.amount), IntegerEntry("Totaltxns", totaltxns), IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_Burned_fsTN:", TotalBurnedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, calculateburnvalue, unit)]
5461 }
5562
5663
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let fsTNAssetID = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX'
55
66 let IssuefsTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
7+
8+let txns = match getInteger(this, "TotalTxns") {
9+ case a: Int =>
10+ a
11+ case _ =>
12+ 0
13+}
14+
15+let totaltxns = (txns + 1)
716
817 @Callable(i)
918 func IssuefsTN () = {
1019 let pmt = value(i.payments[0])
1120 let currentKey = toBase58String(i.caller.bytes)
1221 let PricePerfsTN = getIntegerValue(this, "fsTN/TN")
1322 let fsTNCurrentCap = getIntegerValue(this, "fsTNCurrentCap")
1423 let NewfsTNToUser = fraction(100000, pmt.amount, PricePerfsTN)
1524 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
16- let txns = getIntegerValue(this, "Totaltxns")
17- let totaltxns = (txns + 1)
1825 let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser)
1926 let PendingMinting = (fsTNCurrentCap - TotalIssuedfsTN)
2027 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
2128 let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount)
2229 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
2330 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
2431 let FeesCharged = 100000000
2532 if (isDefined(pmt.assetId))
2633 then throw("Incorrect asset attached, please attach TN.")
2734 else if ((200000000 > pmt.amount))
2835 then throw("Please Attach minimum 2 TN To Issue fsTN Asset.")
2936 else if ((TotalIssuedfsTN > fsTNCurrentCap))
3037 then throw((((((("fsTN Minting is about to reach the Cap of " + toString(fsTNCurrentCap)) + "/10^8 fsTN. Please Reduce your Minting Order by ") + toString(PendingMinting)) + " or put ") + toString((fsTNCurrentCap - PreviousIssuedfsTN))) + "/10^8"))
3138 else [IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Balance_Minting_fsTN:", PendingMinting), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), IntegerEntry("Totaltxns", totaltxns), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(fsTNAssetID, NewfsTNToUser, true), ScriptTransfer(i.caller, (NewfsTNToUser - FeesCharged), fsTNAssetID), ScriptTransfer(IssuefsTNFeeAddress, FeesCharged, fsTNAssetID)]
3239 }
3340
3441
3542
3643 @Callable(i)
3744 func Liquidate () = {
3845 let currentKey = toBase58String(i.callerPublicKey)
3946 let pmt = value(i.payments[0])
4047 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
4148 let PreviousBurnedfsTN = getIntegerValue(this, "Total_Burned_fsTN:")
4249 let TotalIssuedfsTN = (PreviousIssuedfsTN - pmt.amount)
4350 let TotalBurnedfsTN = (PreviousBurnedfsTN + pmt.amount)
4451 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
4552 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
4653 let calculateburnvalue = fraction(PreviousfsTNBackupPrice, pmt.amount, 100000)
4754 let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue)
4855 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
4956 if ((pmt.assetId != fsTNAssetID))
5057 then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN)."))
5158 else if ((100000 > pmt.amount))
5259 then throw("Attach Amount must be greater than 0.001 fsTN.")
53- else [Burn(fsTNAssetID, pmt.amount), IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_Burned_fsTN:", TotalBurnedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, calculateburnvalue, unit)]
60+ else [Burn(fsTNAssetID, pmt.amount), IntegerEntry("Totaltxns", totaltxns), IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_Burned_fsTN:", TotalBurnedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, calculateburnvalue, unit)]
5461 }
5562
5663
5764 @Verifier(tx)
5865 func verify () = match tx {
5966 case _ =>
6067 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
6168 }
6269

github/deemru/w8io/026f985 
106.16 ms