# NativeDexFunding.encode

Encodes a native DEX funding request or policy entry.

## Imports

:::code-group
```ts [Named]
import { NativeDexFunding } from 'ox/tempo'
```

```ts [Entrypoint]
import * as NativeDexFunding from 'ox/tempo/NativeDexFunding'
```
:::

## Examples

```ts
import { NativeDexFunding } from 'ox/tempo'

const token =
  '0x20c0000000000000000000000000000000000001' as const
NativeDexFunding.encode({
  tokenIn: token,
  maxAmountIn: 30_000_000n
})
```

## Definition

```ts
function encode(
  request: NativeDexFunding.Request,
): Hex.Hex
```

**Source:** [src/tempo/NativeDexFunding.ts](https://github.com/wevm/ox/blob/main/src/tempo/NativeDexFunding.ts#L33)

## Parameters

### request

* **Type:** [`NativeDexFunding.Request`](/tempo/reference/NativeDexFunding/types#nativedexfundingrequest)

#### request.maxAmountIn

* **Type:** `bigint`
* **Optional**

Input cap in base units. Omission is unlimited; zero permits no input.

#### request.tokenIn

* **Type:** `abitype_Address`

Input token to exchange for the required token.

## Return Type

`Hex.Hex`
