Documentation
    Preparing search index...

    Class MarginManagerContract

    MarginManagerContract class for managing MarginManager operations.

    Index

    Constructors

    Methods

    • Parameters

      • managerKey: string

        The key to identify the manager

      • amount: number

        The amount to borrow

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Borrow base from a margin manager

    • Parameters

      • managerKey: string

        The key to identify the manager

      • amount: number

        The amount to borrow

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Borrow quote from a margin manager

    • Parameters

      • managerKey: string

        The key to identify the manager

      • amount: number

        The amount to deposit

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Deposit base into a margin manager

    • Parameters

      • managerKey: string

        The key to identify the manager

      • amount: number

        The amount to deposit

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Deposit deep into a margin manager

    • Parameters

      • managerKey: string

        The key to identify the manager

      • amount: number

        The amount to deposit

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Deposit quote into a margin manager

    • Parameters

      • managerAddress: string

        The address of the manager to liquidate

      • poolKey: string

        The key to identify the pool

      • debtIsBase: boolean

        Whether the debt is in base

      • repayCoin: TransactionArgument

        The coin to repay

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Liquidate a margin manager

    • Parameters

      • poolKey: string

        The key to identify the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Create a new margin manager

    • Parameters

      • poolKey: string

        The key to identify the pool

      Returns (
          tx: Transaction,
      ) => {
          initializer: { $kind: "NestedResult"; NestedResult: [number, number] };
          manager: { $kind: "NestedResult"; NestedResult: [number, number] };
      }

      A function that takes a Transaction object

      Create a new margin manager with an initializer

    • Parameters

      • managerKey: string

        The key to identify the manager

      • Optionalamount: number

        The amount to repay

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Repay base from a margin manager

    • Parameters

      • managerKey: string

        The key to identify the manager

      • Optionalamount: number

        The amount to repay

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Repay quote from a margin manager

    • Parameters

      • poolKey: string

        The key to identify the pool

      • manager: TransactionArgument

        The margin manager to share

      • initializer: TransactionArgument

        The initializer for the manager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Share a margin manager

    • Parameters

      • managerKey: string

        The key to identify the manager

      • amount: number

        The amount to withdraw

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Withdraw base from a margin manager

    • Parameters

      • managerKey: string

        The key to identify the manager

      • amount: number

        The amount to withdraw

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Withdraw deep from a margin manager

    • Parameters

      • managerKey: string

        The key to identify the manager

      • amount: number

        The amount to withdraw

      Returns (tx: Transaction) => TransactionResult

      A function that takes a Transaction object

      Withdraw quote from a margin manager