Box Common Types

Import frequently used types.

The Box relies on a number of frequently used types. You can use these types within your application by importing it from the library you've installed.

import {YourType} from "@decent.xyz/the-box" // or box-ui, box-hooks, etc.

Available Types

ChainId

export enum ChainId {
  ETHEREUM = 1,
  SEPOLIA = 11155111,
  GOERLI = 5,
  OPTIMISM = 10,
  OPTIMISM_TESTNET = 420,
  POLYGON = 137,
  POLYGON_TESTNET = 80001,
  ARBITRUM = 42161,
  ARBITRUM_TESTNET = 421613,
  BASE = 8453,
  ZORA = 7777777,
  ZORA_GOERLI = 999,
  BASE_TESTNET = 84531,
  MOONBEAM = 1284,
  MOONBEAM_TESTNET = 1287,
  AVALANCHE = 43114,
  AVALANCHE_TESTNET = 43113,
  FANTOM = 250,
  FANTOM_TESTNET = 4002,
  SOLANA_DEVNET = 69420,
  SOLANA_MAINNET = 1399811149,
}

TokenInfo

export interface TokenInfo extends TokenId {
  decimals: number;
  symbol: string;
  name: string;
  isNative: boolean;
  chainId: ChainId;
  logo?: string;
}

UserTokenInfo

export interface UserTokenInfo extends TokenInfo {
  balance: bigint;
  balanceFloat: number;
}

BridgeId

export enum BridgeId {
  DECENT = 'decent',
  STARGATE = 'stargate',
  AXELAR = 'axelar',
  WORMHOLE = 'wormhole',
}

ActionConfig

export type ActionConfig =
  | NftMintConfig
  | NftPreferMintConfig
  | NftFillAskConfig
  | ArbitraryEvmActionConfig
  | SwapActionConfig;

EvmTransaction

export type EvmTransaction = {
  to: EvmAddress;
  data?: Hex;
  value?: bigint;
  gasPrice?: bigint;
  gasLimit?: bigint;
  maxFeePerGas?: bigint;
  maxPriorityFeePerGas?: bigint;
};

What’s Next