tx · 4YNL9wwUjKXdFZqjs5S7jfA4GRwjMqD1hDAh3hpMJmgq 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY: -0.01400000 Waves 2022.03.02 05:22 [1945744] smart account 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY > SELF 0.00000000 Waves
{ "type": 13, "id": "4YNL9wwUjKXdFZqjs5S7jfA4GRwjMqD1hDAh3hpMJmgq", "fee": 1400000, "feeAssetId": null, "timestamp": 1646187755132, "version": 2, "chainId": 84, "sender": "3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY", "senderPublicKey": "6w6geQvkvMqffnrYsamvmS9TjKjjePjFPWLY9qDbNddX", "proofs": [ "3MAyF6ssmyw161eBmNECZKtYwuKvXnWeqT5uArovnco8q3q5eyvgzA28dc2hAYYwpmdwDTxeyNe4tfYryRWUyLQM" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAtmc1ROQXNzZXRJRAEAAAAgnvVzUNkaAZFSSO4nPxeRoS4zrUxu6jad0qWebNIZFHoAAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAAR0eG5zBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMCAAAACVRvdGFsdHhucwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAAAAAAl0b3RhbHR4bnMJAABkAAAAAgUAAAAEdHhucwAAAAAAAAAAAQAAAAIAAAABaQEAAAAJSXNzdWVmc1ROAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYW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R4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleahUYac=", "height": 1945744, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FZuV51HFpoRQxuFjbHgQCwVrn4gq8YRy4AQQ2dhxkinB Next: none Diff:
Old | New | Differences | |
---|---|---|---|
25 | 25 | let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser) | |
26 | 26 | let PendingMinting = (fsTNCurrentCap - TotalIssuedfsTN) | |
27 | 27 | let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
28 | + | let fee = match getInteger(this, "Total_Fee_Collected") { | |
29 | + | case a: Int => | |
30 | + | a | |
31 | + | case _ => | |
32 | + | 0 | |
33 | + | } | |
34 | + | let FeesCharged = (fee + 100000000) | |
28 | 35 | let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount) | |
29 | 36 | let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
30 | 37 | let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN) | |
31 | - | let FeesCharged = 100000000 | |
32 | 38 | if (isDefined(pmt.assetId)) | |
33 | 39 | then throw("Incorrect asset attached, please attach TN.") | |
34 | 40 | else if ((200000000 > pmt.amount)) | |
35 | 41 | then throw("Please Attach minimum 2 TN To Issue fsTN Asset.") | |
36 | 42 | else if ((TotalIssuedfsTN > fsTNCurrentCap)) | |
37 | 43 | 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")) | |
38 | - | 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)] | |
44 | + | 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("Total_Fee_Collected", FeesCharged), 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)] | |
39 | 45 | } | |
40 | 46 | ||
41 | 47 |
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'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
7 | 7 | ||
8 | 8 | let txns = match getInteger(this, "Totaltxns") { | |
9 | 9 | case a: Int => | |
10 | 10 | a | |
11 | 11 | case _ => | |
12 | 12 | 0 | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let totaltxns = (txns + 1) | |
16 | 16 | ||
17 | 17 | @Callable(i) | |
18 | 18 | func IssuefsTN () = { | |
19 | 19 | let pmt = value(i.payments[0]) | |
20 | 20 | let currentKey = toBase58String(i.caller.bytes) | |
21 | 21 | let PricePerfsTN = getIntegerValue(this, "fsTN/TN") | |
22 | 22 | let fsTNCurrentCap = getIntegerValue(this, "fsTNCurrentCap") | |
23 | 23 | let NewfsTNToUser = fraction(100000, pmt.amount, PricePerfsTN) | |
24 | 24 | let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:") | |
25 | 25 | let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser) | |
26 | 26 | let PendingMinting = (fsTNCurrentCap - TotalIssuedfsTN) | |
27 | 27 | let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
28 | + | let fee = match getInteger(this, "Total_Fee_Collected") { | |
29 | + | case a: Int => | |
30 | + | a | |
31 | + | case _ => | |
32 | + | 0 | |
33 | + | } | |
34 | + | let FeesCharged = (fee + 100000000) | |
28 | 35 | let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount) | |
29 | 36 | let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
30 | 37 | let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN) | |
31 | - | let FeesCharged = 100000000 | |
32 | 38 | if (isDefined(pmt.assetId)) | |
33 | 39 | then throw("Incorrect asset attached, please attach TN.") | |
34 | 40 | else if ((200000000 > pmt.amount)) | |
35 | 41 | then throw("Please Attach minimum 2 TN To Issue fsTN Asset.") | |
36 | 42 | else if ((TotalIssuedfsTN > fsTNCurrentCap)) | |
37 | 43 | 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")) | |
38 | - | 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)] | |
44 | + | 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("Total_Fee_Collected", FeesCharged), 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)] | |
39 | 45 | } | |
40 | 46 | ||
41 | 47 | ||
42 | 48 | ||
43 | 49 | @Callable(i) | |
44 | 50 | func Liquidate () = { | |
45 | 51 | let currentKey = toBase58String(i.callerPublicKey) | |
46 | 52 | let pmt = value(i.payments[0]) | |
47 | 53 | let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:") | |
48 | 54 | let PreviousBurnedfsTN = getIntegerValue(this, "Total_Burned_fsTN:") | |
49 | 55 | let TotalIssuedfsTN = (PreviousIssuedfsTN - pmt.amount) | |
50 | 56 | let TotalBurnedfsTN = (PreviousBurnedfsTN + pmt.amount) | |
51 | 57 | let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:") | |
52 | 58 | let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:") | |
53 | 59 | let calculateburnvalue = fraction(PreviousfsTNBackupPrice, pmt.amount, 100000) | |
54 | 60 | let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue) | |
55 | 61 | let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN) | |
56 | 62 | if ((pmt.assetId != fsTNAssetID)) | |
57 | 63 | then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN).")) | |
58 | 64 | else if ((100000 > pmt.amount)) | |
59 | 65 | then throw("Attach Amount must be greater than 0.001 fsTN.") | |
60 | 66 | 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)] | |
61 | 67 | } | |
62 | 68 | ||
63 | 69 | ||
64 | 70 | @Verifier(tx) | |
65 | 71 | func verify () = match tx { | |
66 | 72 | case _ => | |
67 | 73 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
68 | 74 | } | |
69 | 75 |
github/deemru/w8io/026f985 40.97 ms ◑