# Sample Policy Rule with Advanced ABI Check

This page provides an example Policy rule that uses Fordefi's [advanced ABI check capabilities](https://docs.fordefi.com/user-guide/policies/policy-rules-conditions-and-actions#abi) to check the calldata of an EVM contract call. The example demonstrates how to enforce a swap pair when swapping on Uniswap V4.

For more general information about ABI checks, see [Setting ABI Conditions](https://docs.fordefi.com/user-guide/policies/policy-rules-conditions-and-actions#abi).

## General settings

- **Transaction type**: "Contract call"
- **Recipient**: Uniswap's [Universal Router on Arbitrum](https://arbiscan.io/address/0x8B844f885672f333Bc0042cB669255f93a4C1E6b#code)
- **ABI**: the Universal Router's `execute (0x3593564c)` function with 2 extra parameters



## ABI extra parameters

### First condition

- **Path**: `[1][1]`: Both conditions use the same path `[1][1]` because the [SWAP_EXACT_IN action](https://github.com/Uniswap/v4-periphery/blob/363226d9e1e2180b67bf6857023dbaad751010c5/src/interfaces/IV4Router.sol#L38) encodes both the input and output tokens in a single bytes field. Each condition is a Contains check, so together they assert that this encoded swap involves both USDT0 and USDC.
- **Type**: Bytes
- **Operator**: Contains
- **Value**: `0x000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9`, which is the address of the [USDT0 token contract](https://arbiscan.io/address/0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9) on Arbitrum, left-padded to 32 bytes (with the 0x prefix).


### Second condition

- **Path**: `[1][1]`, for the same reason as explained above.
- **Type**: Bytes
- **Operator**: Contains
- **Value**: `0x000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831`, which is the address of the [USDC token contract](https://arbiscan.io/address/0xaf88d065e77c8cc2239327c5edb3a432268e5831) on Arbitrum, left-padded to 32 bytes (with the 0x prefix).

  - The Policy rule above will NOT match any allowance or permit transactions; these would need to be handled by separate rules in your Policy.
  - The Policy rule above is designed to match a swap on Uniswap V4 and might not work for other versions.
  - The `Contains bytes` checks used in the rule above match the pair regardless of direction: both a USDC→USDT0 swap and a USDT0→USDC swap would match.
  - Always use the contract's `abi.json` as the source of truth to understand a function's signature.