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
  1. Developers

Options Library

Frontend library for interacting with Option contracts

PreviousUser BalancesNextHelper Functions

As we are not currently running a frontend for Option Tokens or Options Liquidity Mining, the Options Library is intended to allow protocols to easily integrate these into their own frontends.

The main benefits of this library are as follows:

  • Helper functions for common frontend tasks such as calculating prices, APRs, requesting commonly used data on Option Tokens etc

  • Getter functions for contract addresses/ABIs on a per chain basis (initially, these will all be identical, and ideally will stay that way. However, past experience with our Bond contracts shows that there is a possibility they may diverge later).

The library uses , and some helper functions require a Viem or (the Viem equivalent of ' and ) to be passed in - this is easiest for frontends using v1+, but we have included an example UI using the legacy Ethers based version of wagmi in order to demonstrate manual setup of a PublicClient and WalletClient.

GitHub
NPM
Viem
PublicClient
WalletClient
Ethers
Provider
Signer
wagmi