tx · B1J7Dk6mbWUc9xCs7L8MKbojn9ENSuUtiwMffBmiocpU

3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY:  -0.01400000 Waves

2021.12.16 13:33 [1836697] smart account 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY > SELF 0.00000000 Waves

{ "type": 13, "id": "B1J7Dk6mbWUc9xCs7L8MKbojn9ENSuUtiwMffBmiocpU", "fee": 1400000, "feeAssetId": null, "timestamp": 1639650802297, "version": 2, "chainId": 84, "sender": "3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY", "senderPublicKey": "6w6geQvkvMqffnrYsamvmS9TjKjjePjFPWLY9qDbNddX", "proofs": [ "2CLca1sAYXPJfr48eNZyP4pcp5rYUFRAi9TwReyddb82V1MgABA9PVXMbAVhEx6MTshVcrRqpra95T1AcCBHHkGN" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAACAAAAAAtmc1ROQXNzZXRJRAEAAAAgnvVzUNkaAZFSSO4nPxeRoS4zrUxu6jad0qWebNIZFHoAAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAAAAAgAAAAFpAQAAAAlJc3N1ZWZzVE4AAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAMUHJpY2VQZXJmc1ROCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAdmc1ROL1ROBAAAAA1OZXdmc1ROVG9Vc2VyCQAAawAAAAMAAAAAAAABhqAIBQAAAANwbXQAAAAGYW1vdW50BQAAAAxQcmljZVBlcmZzVE4EAAAAEl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AAACCQEAAAAEQnVybgAAAAIFAAAAC2ZzVE5Bc3NldElECAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAASVG90YWxfSXNzdWVkX2ZzVE46BQAAAA9Ub3RhbElzc3VlZGZzVE4JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGVRvdGFsX2ZzVE5fUmVzZXJ2ZV9Jbl9UTjoFAAAAEGZzVE5SZXNlcnZlVmFsdWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGGZzVE5fQmFja3VwX1ZhbHVlX0luX1ROOgUAAAAPZnNUTkJhY2t1cFByaWNlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5mc1ROIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAEmNhbGN1bGF0ZWJ1cm52YWx1ZQUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5r8YbQg==", "height": 1836697, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 53dtX7UbXw9kMW5VvVMStrmjTLa3V8Tk1hgibF6SJeCg Next: C8pTU5ToujsuEratAAbT5NQc6qFiHByYGyWg7nc42KUk Diff:
OldNewDifferences
4040 let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue)
4141 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
4242 if ((pmt.assetId != fsTNAssetID))
43- then throw("Kindly Deposit Only BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX (fsTN).")
43+ then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN)."))
4444 else if ((100000 > pmt.amount))
4545 then throw("Attach Amount must be greater than 0.001 fsTN.")
4646 else [Burn(fsTNAssetID, pmt.amount), IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), 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)]
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'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr')
77
88 @Callable(i)
99 func IssuefsTN () = {
1010 let pmt = value(i.payments[0])
1111 let currentKey = toBase58String(i.caller.bytes)
1212 let PricePerfsTN = getIntegerValue(this, "fsTN/TN")
1313 let NewfsTNToUser = fraction(100000, pmt.amount, PricePerfsTN)
1414 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
1515 let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser)
1616 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
1717 let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount)
1818 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
1919 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
2020 let FeePercentage = 1
2121 let BalanceTokensReturnedToUser = (100 - FeePercentage)
2222 if (isDefined(pmt.assetId))
2323 then throw("Incorrect asset attached, please attach TN.")
2424 else if ((5000000 > pmt.amount))
2525 then throw("Please Attach minimum 0.05 TN To Issue fsTN Asset.")
2626 else [IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(fsTNAssetID, NewfsTNToUser, true), ScriptTransfer(i.caller, ((NewfsTNToUser * BalanceTokensReturnedToUser) / 100), fsTNAssetID), ScriptTransfer(IssuefsTNFeeAddress, ((NewfsTNToUser * FeePercentage) / 100), fsTNAssetID)]
2727 }
2828
2929
3030
3131 @Callable(i)
3232 func Liquidate () = {
3333 let currentKey = toBase58String(i.callerPublicKey)
3434 let pmt = value(i.payments[0])
3535 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
3636 let TotalIssuedfsTN = (PreviousIssuedfsTN - pmt.amount)
3737 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
3838 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
3939 let calculateburnvalue = fraction(PreviousfsTNBackupPrice, pmt.amount, 100000)
4040 let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue)
4141 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
4242 if ((pmt.assetId != fsTNAssetID))
43- then throw("Kindly Deposit Only BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX (fsTN).")
43+ then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN)."))
4444 else if ((100000 > pmt.amount))
4545 then throw("Attach Amount must be greater than 0.001 fsTN.")
4646 else [Burn(fsTNAssetID, pmt.amount), IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), 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)]
4747 }
4848
4949
5050 @Verifier(tx)
5151 func verify () = match tx {
5252 case _ =>
5353 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5454 }
5555

github/deemru/w8io/026f985 
26.11 ms