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:AAIEAAAAAAAAAAYIAhIAEgAAAAACAAAAAAtmc1ROQXNzZXRJRAEAAAAgnvVzUNkaAZFSSO4nPxeRoS4zrUxu6jad0qWebNIZFHoAAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAAAAAgAAAAFpAQAAAAlJc3N1ZWZzVE4AAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAMUHJpY2VQZXJmc1ROCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAdmc1ROL1ROBAAAAA1OZXdmc1ROVG9Vc2VyCQAAawAAAAMAAAAAAAABhqAIBQAAAANwbXQAAAAGYW1vdW50BQAAAAxQcmljZVBlcmZzVE4EAAAAElBy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AACCQEAAAAEQnVybgAAAAIFAAAAC2ZzVE5Bc3NldElECAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAASVG90YWxfSXNzdWVkX2ZzVE46BQAAAA9Ub3RhbElzc3VlZGZzVE4JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGVRvdGFsX2ZzVE5fUmVzZXJ2ZV9Jbl9UTjoFAAAAEGZzVE5SZXNlcnZlVmFsdWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGGZzVE5fQmFja3VwX1ZhbHVlX0luX1ROOgUAAAAPZnNUTkJhY2t1cFByaWNlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5mc1ROIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAEmNhbGN1bGF0ZWJ1cm52YWx1ZQUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5r8YbQg==", "height": 1836697, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 53dtX7UbXw9kMW5VvVMStrmjTLa3V8Tk1hgibF6SJeCg Next: C8pTU5ToujsuEratAAbT5NQc6qFiHByYGyWg7nc42KUk Diff:
Old | New | Differences | |
---|---|---|---|
40 | 40 | let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue) | |
41 | 41 | let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN) | |
42 | 42 | if ((pmt.assetId != fsTNAssetID)) | |
43 | - | then throw("Kindly Deposit Only | |
43 | + | then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN).")) | |
44 | 44 | else if ((100000 > pmt.amount)) | |
45 | 45 | then throw("Attach Amount must be greater than 0.001 fsTN.") | |
46 | 46 | 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)] |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let fsTNAssetID = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX' | |
5 | 5 | ||
6 | 6 | let IssuefsTNFeeAddress = addressFromPublicKey(base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr') | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func IssuefsTN () = { | |
10 | 10 | let pmt = value(i.payments[0]) | |
11 | 11 | let currentKey = toBase58String(i.caller.bytes) | |
12 | 12 | let PricePerfsTN = getIntegerValue(this, "fsTN/TN") | |
13 | 13 | let NewfsTNToUser = fraction(100000, pmt.amount, PricePerfsTN) | |
14 | 14 | let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:") | |
15 | 15 | let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser) | |
16 | 16 | let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
17 | 17 | let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount) | |
18 | 18 | let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
19 | 19 | let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN) | |
20 | 20 | let FeePercentage = 1 | |
21 | 21 | let BalanceTokensReturnedToUser = (100 - FeePercentage) | |
22 | 22 | if (isDefined(pmt.assetId)) | |
23 | 23 | then throw("Incorrect asset attached, please attach TN.") | |
24 | 24 | else if ((5000000 > pmt.amount)) | |
25 | 25 | then throw("Please Attach minimum 0.05 TN To Issue fsTN Asset.") | |
26 | 26 | 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)] | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(i) | |
32 | 32 | func Liquidate () = { | |
33 | 33 | let currentKey = toBase58String(i.callerPublicKey) | |
34 | 34 | let pmt = value(i.payments[0]) | |
35 | 35 | let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:") | |
36 | 36 | let TotalIssuedfsTN = (PreviousIssuedfsTN - pmt.amount) | |
37 | 37 | let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
38 | 38 | let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
39 | 39 | let calculateburnvalue = fraction(PreviousfsTNBackupPrice, pmt.amount, 100000) | |
40 | 40 | let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue) | |
41 | 41 | let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN) | |
42 | 42 | if ((pmt.assetId != fsTNAssetID)) | |
43 | - | then throw("Kindly Deposit Only | |
43 | + | then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN).")) | |
44 | 44 | else if ((100000 > pmt.amount)) | |
45 | 45 | then throw("Attach Amount must be greater than 0.001 fsTN.") | |
46 | 46 | 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)] | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | @Verifier(tx) | |
51 | 51 | func verify () = match tx { | |
52 | 52 | case _ => | |
53 | 53 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
54 | 54 | } | |
55 | 55 |
github/deemru/w8io/026f985 26.11 ms ◑