com.jelurida.ardor.contracts

## Class ChildToParentExchange.CoinExchangeOrders

- java.lang.Object
- - com.jelurida.ardor.contracts.ChildToParentExchange.CoinExchangeOrders

- Enclosing class:
    ChildToParentExchange

      public static class ChildToParentExchange.CoinExchangeOrders
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CoinExchangeOrders(AbstractContractContext context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getReturnAmountNQT()`
    `ChainWrapper` | `getReturnChain()`
    `ChildToParentExchange.CoinExchangeOrders` | `invoke(ChainWrapper chain, long amountNQT, long maxAmountNXT)` Given amount and child chain look at existing coin exchange orders to calculate amount to return in Ardor

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CoinExchangeOrders

          public CoinExchangeOrders(AbstractContractContext context)

  - ### Method Detail

    - #### getReturnAmountNQT

          public long getReturnAmountNQT()

    - #### getReturnChain

          public ChainWrapper getReturnChain()

    - #### invoke

          public ChildToParentExchange.CoinExchangeOrders invoke(ChainWrapper chain,
                                                                 long amountNQT,
                                                                 long maxAmountNXT)

      Given amount and child chain look at existing coin exchange orders to calculate amount to return in Ardor
      Parameters:
        `chain` - the child chain
        `amountNQT` - received amount
        `maxAmountNXT` - do not exchange more than this amount (this contract is designed to handle small amounts)
      Returns:
        object holding the returned amount and chain