# AmountCalculator

A helper contract for calculations related to order amounts

## Functions[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#functions) <a href="#functions" id="functions"></a>

### getMakingAmount[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#getmakingamount) <a href="#getmakingamount" id="getmakingamount"></a>

```javascript
function getMakingAmount(
  uint256 orderMakerAmount,
  uint256 orderTakerAmount,
  uint256 swapTakerAmount
) public returns (uint256)
```

Calculates maker amount

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#parameters)

| Name               | Type    | Description |
| ------------------ | ------- | ----------- |
| `orderMakerAmount` | uint256 |             |
| `orderTakerAmount` | uint256 |             |
| `swapTakerAmount`  | uint256 |             |

**Return Values:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#return-values)

| Name     | Type    | Description          |
| -------- | ------- | -------------------- |
| `Result` | uint256 | Floored maker amount |

### getTakingAmount[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#gettakingamount) <a href="#gettakingamount" id="gettakingamount"></a>

```javascript
function getTakingAmount(
  uint256 orderMakerAmount,
  uint256 orderTakerAmount,
  uint256 swapMakerAmount
) public returns (uint256)
```

Calculates taker amount

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#parameters-1)

| Name               | Type    | Description |
| ------------------ | ------- | ----------- |
| `orderMakerAmount` | uint256 |             |
| `orderTakerAmount` | uint256 |             |
| `swapMakerAmount`  | uint256 |             |

**Return Values:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#return-values-1)

| Name     | Type    | Description         |
| -------- | ------- | ------------------- |
| `Result` | uint256 | Ceiled taker amount |

### arbitraryStaticCall[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#arbitrarystaticcall) <a href="#arbitrarystaticcall" id="arbitrarystaticcall"></a>

```javascript
function arbitraryStaticCall(
  address target,
  bytes data
) external returns (uint256)
```

Performs an arbitrary call to target with data

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#parameters-2)

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| `target` | address |             |
| `data`   | bytes   |             |

**Return Values:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/AmountCalculator#return-values-2)

| Name     | Type    | Description                 |
| -------- | ------- | --------------------------- |
| `Result` | uint256 | Bytes transmuted to uint256 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vulpefi.com/aggregation-protocol/limit-order-protocol/smart-contracts/helpers/amountcalculator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
