Class ConfigSettingContractLedgerCostV0

java.lang.Object
org.stellar.sdk.xdr.ConfigSettingContractLedgerCostV0
All Implemented Interfaces:
XdrElement

public class ConfigSettingContractLedgerCostV0 extends Object implements XdrElement
ConfigSettingContractLedgerCostV0's original definition in the XDR file is:
 struct ConfigSettingContractLedgerCostV0
 {
     // Maximum number of disk entry read operations per ledger
     uint32 ledgerMaxDiskReadEntries;
     // Maximum number of bytes of disk reads that can be performed per ledger
     uint32 ledgerMaxDiskReadBytes;
     // Maximum number of ledger entry write operations per ledger
     uint32 ledgerMaxWriteLedgerEntries;
     // Maximum number of bytes that can be written per ledger
     uint32 ledgerMaxWriteBytes;

     // Maximum number of disk entry read operations per transaction
     uint32 txMaxDiskReadEntries;
     // Maximum number of bytes of disk reads that can be performed per transaction
     uint32 txMaxDiskReadBytes;
     // Maximum number of ledger entry write operations per transaction
     uint32 txMaxWriteLedgerEntries;
     // Maximum number of bytes that can be written per transaction
     uint32 txMaxWriteBytes;

     int64 feeDiskReadLedgerEntry;  // Fee per disk ledger entry read
     int64 feeWriteLedgerEntry;     // Fee per ledger entry write

     int64 feeDiskRead1KB;          // Fee for reading 1KB disk

     // The following parameters determine the write fee per 1KB.
     // Rent fee grows linearly until soroban state reaches this size
     int64 sorobanStateTargetSizeBytes;
     // Fee per 1KB rent when the soroban state is empty
     int64 rentFee1KBSorobanStateSizeLow;
     // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes`
     int64 rentFee1KBSorobanStateSizeHigh;
     // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes`
     uint32 sorobanStateRentFeeGrowthFactor;
 };
 
  • Constructor Details

    • ConfigSettingContractLedgerCostV0

      public ConfigSettingContractLedgerCostV0()
    • ConfigSettingContractLedgerCostV0

      public ConfigSettingContractLedgerCostV0(Uint32 ledgerMaxDiskReadEntries, Uint32 ledgerMaxDiskReadBytes, Uint32 ledgerMaxWriteLedgerEntries, Uint32 ledgerMaxWriteBytes, Uint32 txMaxDiskReadEntries, Uint32 txMaxDiskReadBytes, Uint32 txMaxWriteLedgerEntries, Uint32 txMaxWriteBytes, Int64 feeDiskReadLedgerEntry, Int64 feeWriteLedgerEntry, Int64 feeDiskRead1KB, Int64 sorobanStateTargetSizeBytes, Int64 rentFee1KBSorobanStateSizeLow, Int64 rentFee1KBSorobanStateSizeHigh, Uint32 sorobanStateRentFeeGrowthFactor)
      Creates a new ConfigSettingContractLedgerCostV0 instance.
      Parameters:
      ledgerMaxDiskReadEntries - the ledgerMaxDiskReadEntries field value
      ledgerMaxDiskReadBytes - the ledgerMaxDiskReadBytes field value
      ledgerMaxWriteLedgerEntries - the ledgerMaxWriteLedgerEntries field value
      ledgerMaxWriteBytes - the ledgerMaxWriteBytes field value
      txMaxDiskReadEntries - the txMaxDiskReadEntries field value
      txMaxDiskReadBytes - the txMaxDiskReadBytes field value
      txMaxWriteLedgerEntries - the txMaxWriteLedgerEntries field value
      txMaxWriteBytes - the txMaxWriteBytes field value
      feeDiskReadLedgerEntry - the feeDiskReadLedgerEntry field value
      feeWriteLedgerEntry - the feeWriteLedgerEntry field value
      feeDiskRead1KB - the feeDiskRead1KB field value
      sorobanStateTargetSizeBytes - the sorobanStateTargetSizeBytes field value
      rentFee1KBSorobanStateSizeLow - the rentFee1KBSorobanStateSizeLow field value
      rentFee1KBSorobanStateSizeHigh - the rentFee1KBSorobanStateSizeHigh field value
      sorobanStateRentFeeGrowthFactor - the sorobanStateRentFeeGrowthFactor field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      Parameters:
      stream - the destination XDR output stream
      Throws:
      IOException - if an I/O error occurs while writing the value
    • decode

      public static ConfigSettingContractLedgerCostV0 decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

      Throws:
      IOException
    • fromXdrBase64

      public static ConfigSettingContractLedgerCostV0 fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static ConfigSettingContractLedgerCostV0 fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static ConfigSettingContractLedgerCostV0 fromJson(String json)
    • builder

    • toBuilder

    • getLedgerMaxDiskReadEntries

      public Uint32 getLedgerMaxDiskReadEntries()
      Value of the ledgerMaxDiskReadEntries field.
      Returns:
      the ledgerMaxDiskReadEntries field value
    • getLedgerMaxDiskReadBytes

      public Uint32 getLedgerMaxDiskReadBytes()
      Value of the ledgerMaxDiskReadBytes field.
      Returns:
      the ledgerMaxDiskReadBytes field value
    • getLedgerMaxWriteLedgerEntries

      public Uint32 getLedgerMaxWriteLedgerEntries()
      Value of the ledgerMaxWriteLedgerEntries field.
      Returns:
      the ledgerMaxWriteLedgerEntries field value
    • getLedgerMaxWriteBytes

      public Uint32 getLedgerMaxWriteBytes()
      Value of the ledgerMaxWriteBytes field.
      Returns:
      the ledgerMaxWriteBytes field value
    • getTxMaxDiskReadEntries

      public Uint32 getTxMaxDiskReadEntries()
      Value of the txMaxDiskReadEntries field.
      Returns:
      the txMaxDiskReadEntries field value
    • getTxMaxDiskReadBytes

      public Uint32 getTxMaxDiskReadBytes()
      Value of the txMaxDiskReadBytes field.
      Returns:
      the txMaxDiskReadBytes field value
    • getTxMaxWriteLedgerEntries

      public Uint32 getTxMaxWriteLedgerEntries()
      Value of the txMaxWriteLedgerEntries field.
      Returns:
      the txMaxWriteLedgerEntries field value
    • getTxMaxWriteBytes

      public Uint32 getTxMaxWriteBytes()
      Value of the txMaxWriteBytes field.
      Returns:
      the txMaxWriteBytes field value
    • getFeeDiskReadLedgerEntry

      public Int64 getFeeDiskReadLedgerEntry()
      Value of the feeDiskReadLedgerEntry field.
      Returns:
      the feeDiskReadLedgerEntry field value
    • getFeeWriteLedgerEntry

      public Int64 getFeeWriteLedgerEntry()
      Value of the feeWriteLedgerEntry field.
      Returns:
      the feeWriteLedgerEntry field value
    • getFeeDiskRead1KB

      public Int64 getFeeDiskRead1KB()
      Value of the feeDiskRead1KB field.
      Returns:
      the feeDiskRead1KB field value
    • getSorobanStateTargetSizeBytes

      public Int64 getSorobanStateTargetSizeBytes()
      Value of the sorobanStateTargetSizeBytes field.
      Returns:
      the sorobanStateTargetSizeBytes field value
    • getRentFee1KBSorobanStateSizeLow

      public Int64 getRentFee1KBSorobanStateSizeLow()
      Value of the rentFee1KBSorobanStateSizeLow field.
      Returns:
      the rentFee1KBSorobanStateSizeLow field value
    • getRentFee1KBSorobanStateSizeHigh

      public Int64 getRentFee1KBSorobanStateSizeHigh()
      Value of the rentFee1KBSorobanStateSizeHigh field.
      Returns:
      the rentFee1KBSorobanStateSizeHigh field value
    • getSorobanStateRentFeeGrowthFactor

      public Uint32 getSorobanStateRentFeeGrowthFactor()
      Value of the sorobanStateRentFeeGrowthFactor field.
      Returns:
      the sorobanStateRentFeeGrowthFactor field value
    • setLedgerMaxDiskReadEntries

      public void setLedgerMaxDiskReadEntries(Uint32 ledgerMaxDiskReadEntries)
      Value of the ledgerMaxDiskReadEntries field.
      Parameters:
      ledgerMaxDiskReadEntries - the ledgerMaxDiskReadEntries field value
    • setLedgerMaxDiskReadBytes

      public void setLedgerMaxDiskReadBytes(Uint32 ledgerMaxDiskReadBytes)
      Value of the ledgerMaxDiskReadBytes field.
      Parameters:
      ledgerMaxDiskReadBytes - the ledgerMaxDiskReadBytes field value
    • setLedgerMaxWriteLedgerEntries

      public void setLedgerMaxWriteLedgerEntries(Uint32 ledgerMaxWriteLedgerEntries)
      Value of the ledgerMaxWriteLedgerEntries field.
      Parameters:
      ledgerMaxWriteLedgerEntries - the ledgerMaxWriteLedgerEntries field value
    • setLedgerMaxWriteBytes

      public void setLedgerMaxWriteBytes(Uint32 ledgerMaxWriteBytes)
      Value of the ledgerMaxWriteBytes field.
      Parameters:
      ledgerMaxWriteBytes - the ledgerMaxWriteBytes field value
    • setTxMaxDiskReadEntries

      public void setTxMaxDiskReadEntries(Uint32 txMaxDiskReadEntries)
      Value of the txMaxDiskReadEntries field.
      Parameters:
      txMaxDiskReadEntries - the txMaxDiskReadEntries field value
    • setTxMaxDiskReadBytes

      public void setTxMaxDiskReadBytes(Uint32 txMaxDiskReadBytes)
      Value of the txMaxDiskReadBytes field.
      Parameters:
      txMaxDiskReadBytes - the txMaxDiskReadBytes field value
    • setTxMaxWriteLedgerEntries

      public void setTxMaxWriteLedgerEntries(Uint32 txMaxWriteLedgerEntries)
      Value of the txMaxWriteLedgerEntries field.
      Parameters:
      txMaxWriteLedgerEntries - the txMaxWriteLedgerEntries field value
    • setTxMaxWriteBytes

      public void setTxMaxWriteBytes(Uint32 txMaxWriteBytes)
      Value of the txMaxWriteBytes field.
      Parameters:
      txMaxWriteBytes - the txMaxWriteBytes field value
    • setFeeDiskReadLedgerEntry

      public void setFeeDiskReadLedgerEntry(Int64 feeDiskReadLedgerEntry)
      Value of the feeDiskReadLedgerEntry field.
      Parameters:
      feeDiskReadLedgerEntry - the feeDiskReadLedgerEntry field value
    • setFeeWriteLedgerEntry

      public void setFeeWriteLedgerEntry(Int64 feeWriteLedgerEntry)
      Value of the feeWriteLedgerEntry field.
      Parameters:
      feeWriteLedgerEntry - the feeWriteLedgerEntry field value
    • setFeeDiskRead1KB

      public void setFeeDiskRead1KB(Int64 feeDiskRead1KB)
      Value of the feeDiskRead1KB field.
      Parameters:
      feeDiskRead1KB - the feeDiskRead1KB field value
    • setSorobanStateTargetSizeBytes

      public void setSorobanStateTargetSizeBytes(Int64 sorobanStateTargetSizeBytes)
      Value of the sorobanStateTargetSizeBytes field.
      Parameters:
      sorobanStateTargetSizeBytes - the sorobanStateTargetSizeBytes field value
    • setRentFee1KBSorobanStateSizeLow

      public void setRentFee1KBSorobanStateSizeLow(Int64 rentFee1KBSorobanStateSizeLow)
      Value of the rentFee1KBSorobanStateSizeLow field.
      Parameters:
      rentFee1KBSorobanStateSizeLow - the rentFee1KBSorobanStateSizeLow field value
    • setRentFee1KBSorobanStateSizeHigh

      public void setRentFee1KBSorobanStateSizeHigh(Int64 rentFee1KBSorobanStateSizeHigh)
      Value of the rentFee1KBSorobanStateSizeHigh field.
      Parameters:
      rentFee1KBSorobanStateSizeHigh - the rentFee1KBSorobanStateSizeHigh field value
    • setSorobanStateRentFeeGrowthFactor

      public void setSorobanStateRentFeeGrowthFactor(Uint32 sorobanStateRentFeeGrowthFactor)
      Value of the sorobanStateRentFeeGrowthFactor field.
      Parameters:
      sorobanStateRentFeeGrowthFactor - the sorobanStateRentFeeGrowthFactor field value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object