> ## Documentation Index
> Fetch the complete documentation index at: https://docs.otim.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Action ABI Reference

This document contains the ABI structures for all Actions, taken from their respective `hash` functions. Use these to properly encode Action arguments when forming EIP-712 hashes.

## DeactivateInstruction

```typescript theme={null}
const deactivateInstructionAbi = [
  { name: 'instructionId', type: 'bytes32' },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## Refuel

```typescript theme={null}
const refuelAbi = [
  { name: 'target', type: 'address' },
  { name: 'threshold', type: 'uint256' },
  { name: 'endBalance', type: 'uint256' },
  { name: 'gasLimit', type: 'uint256' },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## RefuelERC20

```typescript theme={null}
const refuelERC20Abi = [
  { name: 'token', type: 'address' },
  { name: 'target', type: 'address' },
  { name: 'threshold', type: 'uint256' },
  { name: 'endBalance', type: 'uint256' },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## Sweep

```typescript theme={null}
const sweepAbi = [
  { name: 'target', type: 'address' },
  { name: 'threshold', type: 'uint256' },
  { name: 'endBalance', type: 'uint256' },
  { name: 'gasLimit', type: 'uint256' },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## SweepCCTP

```typescript theme={null}
const sweepCCTPAbi = [
  { name: 'token', type: 'address' },
  { name: 'destinationDomain', type: 'uint32' },
  { name: 'destinationMintRecipient', type: 'bytes32' },
  { name: 'threshold', type: 'uint256' },
  { name: 'endBalance', type: 'uint256' },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## SweepERC20

```typescript theme={null}
const sweepERC20Abi = [
  { name: 'target', type: 'address' },
  { name: 'token', type: 'address' },
  { name: 'threshold', type: 'uint256' },
  { name: 'endBalance', type: 'uint256' },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## SweepUniswapV3

```typescript theme={null}
const sweepUniswapV3Abi = [
  { name: 'recipient', type: 'address' },
  { name: 'tokenIn', type: 'address' },
  { name: 'tokenOut', type: 'address' },
  { name: 'feeTier', type: 'uint24' },
  { name: 'threshold', type: 'uint256' },
  { name: 'endBalance', type: 'uint256' },
  { name: 'floorAmountOut', type: 'uint256' },
  { name: 'meanPriceLookBack', type: 'uint32' },
  { name: 'maxPriceDeviationBPS', type: 'uint32' },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## Transfer

```typescript theme={null}
const transferAbi = [
  { name: 'target', type: 'address' },
  { name: 'value', type: 'uint256' },
  { name: 'gasLimit', type: 'uint256' },
  { 
    name: 'schedule', 
    type: 'tuple',
    components: [
      { name: 'startAt', type: 'uint256' },
      { name: 'startBy', type: 'uint256' },
      { name: 'interval', type: 'uint256' },
      { name: 'timeout', type: 'uint256' }
    ]
  },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## TransferCCTP

```typescript theme={null}
const transferCCTPAbi = [
  { name: 'token', type: 'address' },
  { name: 'amount', type: 'uint256' },
  { name: 'destinationDomain', type: 'uint32' },
  { name: 'destinationMintRecipient', type: 'bytes32' },
  { 
    name: 'schedule', 
    type: 'tuple',
    components: [
      { name: 'startAt', type: 'uint256' },
      { name: 'startBy', type: 'uint256' },
      { name: 'interval', type: 'uint256' },
      { name: 'timeout', type: 'uint256' }
    ]
  },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## TransferERC20

```typescript theme={null}
const transferERC20Abi = [
  { name: 'token', type: 'address' },
  { name: 'target', type: 'address' },
  { name: 'value', type: 'uint256' },
  { 
    name: 'schedule', 
    type: 'tuple',
    components: [
      { name: 'startAt', type: 'uint256' },
      { name: 'startBy', type: 'uint256' },
      { name: 'interval', type: 'uint256' },
      { name: 'timeout', type: 'uint256' }
    ]
  },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

## UniswapV3ExactInput

```typescript theme={null}
const uniswapV3ExactInputAbi = [
  { name: 'recipient', type: 'address' },
  { name: 'tokenIn', type: 'address' },
  { name: 'tokenOut', type: 'address' },
  { name: 'feeTier', type: 'uint24' },
  { name: 'amountIn', type: 'uint256' },
  { name: 'floorAmountOut', type: 'uint256' },
  { name: 'meanPriceLookBack', type: 'uint32' },
  { name: 'maxPriceDeviationBPS', type: 'uint32' },
  { 
    name: 'schedule', 
    type: 'tuple',
    components: [
      { name: 'startAt', type: 'uint256' },
      { name: 'startBy', type: 'uint256' },
      { name: 'interval', type: 'uint256' },
      { name: 'timeout', type: 'uint256' }
    ]
  },
  { 
    name: 'fee', 
    type: 'tuple',
    components: [
      { name: 'token', type: 'address' },
      { name: 'maxBaseFeePerGas', type: 'uint256' },
      { name: 'maxPriorityFeePerGas', type: 'uint256' },
      { name: 'executionFee', type: 'uint256' }
    ]
  }
] as const
```

These ABIs are taken directly from the `hash` function in each Action's contract found on [GitHub](https://github.com/otimlabs/otim-protocol/tree/main/src/actions). Use them to properly encode Action arguments when forming EIP-712 hashes.

See [How to Construct Instruction Activation and Deactivation EIP-712 Hashes](/docs/resources/appendix/instruction-712-hashes) for details on how to use these ABIs.
