tx · DYuCAupur9cLbjLkjNGkW79WYNX9uYNvgmCcYMRxWwtZ 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY: -0.01400000 Waves 2022.03.02 04:59 [1945716] smart account 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY > SELF 0.00000000 Waves
{ "type": 13, "id": "DYuCAupur9cLbjLkjNGkW79WYNX9uYNvgmCcYMRxWwtZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1646186392721, "version": 2, "chainId": 84, "sender": "3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY", "senderPublicKey": "6w6geQvkvMqffnrYsamvmS9TjKjjePjFPWLY9qDbNddX", "proofs": [ "58PfJXZYq6WTbvs2gANpSPtgJeFiBSwyeRrNH1xAUeX8kfkSe7mF7GgfVRPb5TmN2bwsfhwdwycqpHvKTK45HJ9x" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAACAAAAAAtmc1ROQXNzZXRJRAEAAAAgnvVzUNkaAZFSSO4nPxeRoS4zrUxu6jad0qWebNIZFHoAAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAgAAAAFpAQAAAAlJc3N1ZWZzVE4AAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAMUHJpY2VQZXJmc1ROCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAdmc1ROL1ROBAAAAA5mc1ROQ3VycmVudENhcAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAOZnNUTkN1cnJlb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Jc3N1ZWRfZnNUTjoFAAAAD1RvdGFsSXNzdWVkZnNUTgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAASVG90YWxfQnVybmVkX2ZzVE46BQAAAA9Ub3RhbEJ1cm5lZGZzVE4JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGVRvdGFsX2ZzVE5fUmVzZXJ2ZV9Jbl9UTjoFAAAAEGZzVE5SZXNlcnZlVmFsdWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGGZzVE5fQmFja3VwX1ZhbHVlX0luX1ROOgUAAAAPZnNUTkJhY2t1cFByaWNlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5mc1ROIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAEmNhbGN1bGF0ZWJ1cm52YWx1ZQUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Fk1nIg==", "height": 1945716, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E3KqWZRJtuUAikxV6h3PAfzqh5MntvZevvmmCCnBTvTy Next: 4LGnpPmveuF3Za6XSFuxxxPqctSrjeo5kmzUZ2jrsRXE Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let fsTNAssetID = base58' | |
4 | + | let fsTNAssetID = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX' | |
5 | 5 | ||
6 | 6 | let IssuefsTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
7 | 7 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let fsTNAssetID = base58' | |
4 | + | let fsTNAssetID = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX' | |
5 | 5 | ||
6 | 6 | let IssuefsTNFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
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 fsTNCurrentCap = getIntegerValue(this, "fsTNCurrentCap") | |
14 | 14 | let NewfsTNToUser = fraction(100000, pmt.amount, PricePerfsTN) | |
15 | 15 | let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:") | |
16 | 16 | let txns = getIntegerValue(this, "Totaltxns") | |
17 | 17 | let totaltxns = (txns + 1) | |
18 | 18 | let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser) | |
19 | 19 | let PendingMinting = (fsTNCurrentCap - TotalIssuedfsTN) | |
20 | 20 | let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
21 | 21 | let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount) | |
22 | 22 | let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
23 | 23 | let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN) | |
24 | 24 | let FeesCharged = 100000000 | |
25 | 25 | if (isDefined(pmt.assetId)) | |
26 | 26 | then throw("Incorrect asset attached, please attach TN.") | |
27 | 27 | else if ((200000000 > pmt.amount)) | |
28 | 28 | then throw("Please Attach minimum 2 TN To Issue fsTN Asset.") | |
29 | 29 | else if ((TotalIssuedfsTN > fsTNCurrentCap)) | |
30 | 30 | 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")) | |
31 | 31 | 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)] | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Callable(i) | |
37 | 37 | func Liquidate () = { | |
38 | 38 | let currentKey = toBase58String(i.callerPublicKey) | |
39 | 39 | let pmt = value(i.payments[0]) | |
40 | 40 | let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:") | |
41 | 41 | let PreviousBurnedfsTN = getIntegerValue(this, "Total_Burned_fsTN:") | |
42 | 42 | let TotalIssuedfsTN = (PreviousIssuedfsTN - pmt.amount) | |
43 | 43 | let TotalBurnedfsTN = (PreviousBurnedfsTN + pmt.amount) | |
44 | 44 | let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
45 | 45 | let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
46 | 46 | let calculateburnvalue = fraction(PreviousfsTNBackupPrice, pmt.amount, 100000) | |
47 | 47 | let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue) | |
48 | 48 | let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN) | |
49 | 49 | if ((pmt.assetId != fsTNAssetID)) | |
50 | 50 | then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN).")) | |
51 | 51 | else if ((100000 > pmt.amount)) | |
52 | 52 | then throw("Attach Amount must be greater than 0.001 fsTN.") | |
53 | 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)] | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | @Verifier(tx) | |
58 | 58 | func verify () = match tx { | |
59 | 59 | case _ => | |
60 | 60 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
61 | 61 | } | |
62 | 62 |
github/deemru/w8io/026f985 25.29 ms ◑