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+IgAAAAAAR0eG5zBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMCAAAACVRvdGFsdHhucwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAAAAAAl0b3RhbHR4bnMJAABkAAAAAgUAAAAEdHhucwAAAAAAAAAAAQAAAAIAAAABaQEAAAAJSXNzdWVmc1ROAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWx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AAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAJVG90YWx0eG5zBQAAAAl0b3RhbHR4bnMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAElRvdGFsX0lzc3VlZF9mc1ROOgUAAAAPVG90YWxJc3N1ZWRmc1ROCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABJUb3RhbF9CdXJuZWRfZnNUTjoFAAAAD1RvdGFsQnVybmVkZnNUTgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAZVG90YWxfZnNUTl9SZXNlcnZlX0luX1ROOgUAAAAQZnNUTlJlc2VydmVWYWx1ZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAYZnNUTl9CYWNrdXBfVmFsdWVfSW5fVE46BQAAAA9mc1ROQmFja3VwUHJpY2UJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQIAAAAqPGgxPmZzVE4gTGlxdWlkYXRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAASY2FsY3VsYXRlYnVybnZhbHVlBQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk31NKK", "height": 1945725, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4LGnpPmveuF3Za6XSFuxxxPqctSrjeo5kmzUZ2jrsRXE Next: 4YNL9wwUjKXdFZqjs5S7jfA4GRwjMqD1hDAh3hpMJmgq Diff:
OldNewDifferences
55
66 let IssuefsTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR')
77
8-let txns = match getInteger(this, "TotalTxns") {
8+let txns = match getInteger(this, "Totaltxns") {
99 case a: Int =>
1010 a
1111 case _ =>
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')
77
8-let txns = match getInteger(this, "TotalTxns") {
8+let txns = match getInteger(this, "Totaltxns") {
99 case a: Int =>
1010 a
1111 case _ =>
1212 0
1313 }
1414
1515 let totaltxns = (txns + 1)
1616
1717 @Callable(i)
1818 func IssuefsTN () = {
1919 let pmt = value(i.payments[0])
2020 let currentKey = toBase58String(i.caller.bytes)
2121 let PricePerfsTN = getIntegerValue(this, "fsTN/TN")
2222 let fsTNCurrentCap = getIntegerValue(this, "fsTNCurrentCap")
2323 let NewfsTNToUser = fraction(100000, pmt.amount, PricePerfsTN)
2424 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
2525 let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser)
2626 let PendingMinting = (fsTNCurrentCap - TotalIssuedfsTN)
2727 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
2828 let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount)
2929 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
3030 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
3131 let FeesCharged = 100000000
3232 if (isDefined(pmt.assetId))
3333 then throw("Incorrect asset attached, please attach TN.")
3434 else if ((200000000 > pmt.amount))
3535 then throw("Please Attach minimum 2 TN To Issue fsTN Asset.")
3636 else if ((TotalIssuedfsTN > fsTNCurrentCap))
3737 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"))
3838 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)]
3939 }
4040
4141
4242
4343 @Callable(i)
4444 func Liquidate () = {
4545 let currentKey = toBase58String(i.callerPublicKey)
4646 let pmt = value(i.payments[0])
4747 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
4848 let PreviousBurnedfsTN = getIntegerValue(this, "Total_Burned_fsTN:")
4949 let TotalIssuedfsTN = (PreviousIssuedfsTN - pmt.amount)
5050 let TotalBurnedfsTN = (PreviousBurnedfsTN + pmt.amount)
5151 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
5252 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
5353 let calculateburnvalue = fraction(PreviousfsTNBackupPrice, pmt.amount, 100000)
5454 let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue)
5555 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
5656 if ((pmt.assetId != fsTNAssetID))
5757 then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN)."))
5858 else if ((100000 > pmt.amount))
5959 then throw("Attach Amount must be greater than 0.001 fsTN.")
6060 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)]
6161 }
6262
6363
6464 @Verifier(tx)
6565 func verify () = match tx {
6666 case _ =>
6767 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
6868 }
6969

github/deemru/w8io/026f985 
32.79 ms