Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Reference: sushi/evm Types

The EVM types module exports reusable domain shapes for contracts, Sushi pool data, and Sushi position data.

Exports

TypePurpose
Contractviem contract parameter shape without functionName or args.
EvmIDEVM currency ID type.
PoolIdMinimal Sushi pool identity.
PoolBaseBase Sushi pool data.
PoolV2, isPoolV2SushiSwap V2 pool type and guard.
PoolV3, isPoolV3SushiSwap V3 pool type and guard.
MaybeNestedPool, unnestPoolNested pool shape and unwrapping helper.
PoolHistory, PoolHistory1D, PoolHistory1W, PoolHistory1MPool history data shapes.
PoolSwapFeePool swap fee field shape.
PoolWithAprs, PoolWithIncentiveApr, PoolWithFeeAprs, PoolWithTotalAprsAPR-augmented pool shapes.
PoolWithBuckets, PoolBucketBucketed pool data shapes.
PoolWithIncentives, PoolIfIncentivized, Incentive, RewarderType, ChefTypeIncentive and reward data shapes.
PoolHasSteerVaults, PoolWithSteerVaults, SteerVaultIdSteer vault pool shapes.
SushiSwapProtocol, SushiSwapV2Protocol, SushiSwapV3Protocol, BladeProtocolProtocol constants and types.
SushiPositionBase, SushiPositionStaked, SushiPositionWithPoolSushi position data shapes.
import { isPoolV2, isPoolV3, type PoolId } from 'sushi/evm'
 
function poolType(pool: PoolId) {
  if (isPoolV2(pool)) {
    return 'v2'
  }
 
  if (isPoolV3(pool)) {
    return 'v3'
  }
 
  return 'unknown'
}