> For the complete documentation index, see [llms.txt](https://docs.vulpefi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vulpefi.com/aggregation-protocol/limit-order-protocol/smart-contracts/helpers/amountcalculator.md).

# 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 |
