Skip to main content

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.

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

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

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

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

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

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

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

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

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

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

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

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. Use them to properly encode Action arguments when forming EIP-712 hashes. See How to Construct Instruction Activation and Deactivation EIP-712 Hashes for details on how to use these ABIs.