Nxt fees setting

Hi I'm new here in the forum.
I am not new to this world, with little experience and I hope to gain some.

I think I have explored every Nxt Clone file to set the lowest fees but, I can't.
It is clear that I am missing something, can someone help me please?

Fees are hard-coded in the source code. You need to change the code and recompile. You can start by looking into the nxt.Fee interface. This is the base for all fee classes which are then used on the different transaction types. Check also the nxt.TransactionType class.

As an example check this fragment of the above class that defines the fee for setting an account property:

        private final Fee ACCOUNT_PROPERTY_FEE = new Fee.SizeBasedFee(Constants.ONE_NXT, Constants.ONE_NXT, 32) {
            @Override
            public int getSize(TransactionImpl transaction, Appendix appendage) {
                Attachment.MessagingAccountProperty attachment = (Attachment.MessagingAccountProperty) transaction.getAttachment();
                return attachment.getValue().length();
            }
        };

Are they calculated based on weight and that in mb?
At the moment nothing seems to work but if I wanted to lower the fees from 1.00 to 0.001 what should I follow?

I found MonetarySystem.java.

It is located in: NXT / src / java / nxt / MonetarySystem.java

public static final TransactionType CURRENCY_ISSUANCE = new MonetarySystem() {

        private final Fee FIVE_LETTER_CURRENCY_ISSUANCE_FEE = new Fee.ConstantFee(40 * Constants.ONE_NXT);
        private final Fee FOUR_LETTER_CURRENCY_ISSUANCE_FEE = new Fee.ConstantFee(1000 * Constants.ONE_NXT);
        private final Fee THREE_LETTER_CURRENCY_ISSUANCE_FEE = new Fee.ConstantFee(25000 * Constants.ONE_NXT);

There is a clear sign of higher issuance costs for 5-4-3 capital letters.
I set the three lines to 1000. I saved. i wiped restarted from block 0 and cleared the cache.
The changes did not happen.
So I have no choice but to recompile the .class file?
If so, I am self-taught and haven't touched the SDK for at least 2 years, it will be quite a challenge.

Indeed any change on the code would require a recompilation.

Microsoft Windows [Versione 10.0.19042.1320]
(c) Microsoft Corporation. Tutti i diritti sono riservati.

C:\Users\AXA>cd C:\Users\AXA\Desktop\test

C:\Users\AXA\Desktop\test>path %path%;"C:\Program File\Java\jdk-17.0.1\bin

C:\Users\AXA\Desktop\test>javac MonetarySystem.java
MonetarySystem.java:16: error: <identifier> expected
final class null extends MonetarySystem {
           ^
MonetarySystem.java:23: error: illegal start of type
  null() {
  ^
2 errors

C:\Users\AXA\Desktop\test>

This is the error I am getting, what should I do?

We cannot provide support on learning the Java programming language.

There are tons of resources online, I suggest you look for some of them.

Thanks anyway.
I am already doing research and have already taken some steps forward, I just need to dive back into the programming mindset.

Ok, now I know how to recompile and the modification of the fees has been successful.

1 Like