LogoLogo
WebsiteGithubCommunity Docs
  • Developer Docs
  • Smart Contracts
    • Bond System
      • Auctioneer
        • Auctioneer Interfaces
        • Sequential Dutch Auctioneer (SDA)
          • Auction Pricing
          • Fixed-Term SDA
          • Fixed-Expiry SDA
        • Fixed Price Auctioneer (FPA)
          • Fixed-Term FPA
          • Fixed-Expiry FPA
        • Oracle-based Auctioneers
          • Oracle Interface
        • Oracle Fixed Discount Auctioneer (OFDA)
          • Fixed-Term OFDA
          • Fixed-Expiry OFDA
        • Oracle Sequential Dutch Auctioneer (OSDA)
          • Fixed-Term OSDA
          • Fixed-Expiry OSDA
      • Teller
        • Teller Interfaces
        • Base Teller
        • Fixed-Expiry Teller
        • Fixed-Term Teller
      • Callback
        • Callback Interface
        • Base Callback
        • Sample Callback Contract
      • Aggregator
        • Aggregator Interface
        • Aggregator Contract
      • Intended User Actions
      • Limit Orders
    • Option System
      • Fixed Strike oTokens
      • Fixed Strike Option Teller
      • Options Liquidity Mining (OLM)
        • Manual Strike OLM
        • Oracle Strike OLM
      • OLM Factories
  • Developers
    • Subgraph
    • Market Calculations
    • Purchases & Redemptions
    • User Balances
    • Options Library
      • Helper Functions
      • Types
  • References
    • Technical Resources
      • Audits
    • Community Resources
    • Brand Assets
    • Contact Us
Powered by GitBook
On this page
  • ChainAddresses
  • ChainAbis
  • OLMPricing
  • Token
  • OTokenData
  1. Developers
  2. Options Library

Types

Custom types used by options-library

ChainAddresses

Contains the addresses of the pre-deployed contracts used by the Option system.

type ChainAddresses = {
  FixedStrikeOptionTeller: `0x${string}`;
  MOLMFactory: `0x${string}`;
  OOLMFactory: `0x${string}`;
};

ChainAbis

Contains the ABIs of the contracts used by the Option system.

type ChainAbis = {
  ERC20: typeof IERC20;
  FixedStrikeOptionTeller: typeof fixedStrikeOptionTeller;
  MOLMFactory: typeof MOLMFactory;
  OOLMFactory: typeof OOLMFactory;
  Allowlist: typeof allowlist;
  FixedStrikeOptionToken: typeof fixedStrikeOptionToken;
  OLM: typeof OLM;
  MOLM: typeof manualStrikeOLM;
  OOLM: typeof oracleStrikeOLM;
  OptionToken: typeof optionToken;
};

OLMPricing

Contains pricing data for an OLM.

type OLMPricing = {
  strikePriceUSD: number;
  impliedValue: number;
  stakedTokenBalance: string;
  rewardRate: string;
  epochRoi: number;
  epochDuration: number;
  epochsPerYear: number;
  apr: number;
};

Token

Contains the basic data for an ERC-20 token.

type Token = {
  address: `0x${string}`;
  name: string;
  symbol: string;
  decimals: number;
};

OTokenData

Contains data for an Option Token which is commonly required by frontend displays.

type OTokenData = {
  optionToken: Token;
  payoutToken: Token;
  quoteToken: Token;
  strikePrice: bigint;
  decimalAdjustedStrike: string;
  eligibleTime: number;
  expiryTime: number;
  call: boolean;
  balance: bigint;
  decimalAdjustedBalance: string;
};
PreviousHelper FunctionsNextTechnical Resources