Documentation
SocialsStatisticsLaunch App
  • Welcome to Mars Protocol
  • Getting Started
    • How to set up a Wallet
    • Connect your wallet
    • Using a Credit Account
  • Credit Accounts
  • Perpetual Futures (Perps)
    • Perps Vault (Counterparty Vault)
    • Funding Rate Mechanism
    • Price Impact
    • Open Interest Caps
    • Vault Solvency Protection
    • Health Factor
    • Liquidations
  • Spot & Margin Trading
  • Lending & Borrowing
  • Leveraged Yield Farming
  • High Leverage Strategies
  • Managed Vaults
    • Creating a Vault
      • How to Resume Vault Creation After Failed Transaction
    • Managing a Vault
    • Depositing into Vault
  • Risk Methodology
    • Asset Listing
    • Protocol Risk Framework
    • Perps Risk Framework
      • Maximum Leverage & LTVs
      • SkewScale
      • Open Interest Caps
      • Maximum Funding Velocity
      • Mitigating Risks of Static Parameters
    • Deposit Caps Risk Framework
  • Governance
    • MARS Token
  • Smart Contracts
    • Address Provider
    • Account NFT
    • Credit Manager
    • Health
    • Incentives
    • Oracle
    • Params
    • Red Bank
    • Rewards Collector
    • Swapper
    • Zapper
    • Perps
  • Brand kit
    • The Mars Brand
  • Legal
    • Mars FUD Bible
    • Terms of Service
    • Privacy Policy
    • Cookie Policy
Powered by GitBook
On this page
  • Deployments
  • Types
  • Queries
Edit on GitHub
Export as PDF
  1. Smart Contracts

Address Provider

The Address Provider Contract provides the addresses of all most recent and currently used contracts of the Mars Protocol's set of Smart Contracts.

Last updated 18 days ago

Deployments

Neutron:

Osmosis:


Types

The types of the Address Provider Contract can be found .

For reference on the Queries and Methods:

Base Types
type MarsAddressType =
  | 'incentives' 
  | 'oracle' 
  | 'red_bank' 
  | 'rewards_collector' 
  | 'params' 
  | 'credit_manager'
  | 'protocol_admin'
  | 'fee_collector'
  | 'safety_fund'
  | 'swapper'
  | 'astroport_incentives'
  | 'perps'
  | 'revenue_share'

Queries

address

Provides the address of a certain contract type.

Query message
{
    address: MarsAddressType
}
Return output
{
    data: {
        address: string
        address_type: MarsAddressType
    }
}

addresses

Provides an array of addresses for provided contract types.

Query message
{
    addresses: MarsAddressType[]
}
Return output
{
    data: [
        {
            address: string
            address_type: MarsAddressType
        },
        ...
    ]
}

all_addresses

Returns all stored addresses with pagination.

Query message
{
    all_addresses: {}
}
Return output
{
    data: [
        {
            address: string
            address_type: MarsAddressType
        },
        ...
    ]
}

config

Returns the contracts config.

Query message
{
    config: {}
}
Return output
{
    data: {
        owner?: string | null
        prefix: string
        proposed_new_owner?: string | null
    }
}

neutron17yehp4x7n79zq9dlw4g7xmnrvwdjjj2yecq26844sg8yu74knlxqfx5vqv
osmo1g677w7mfvn78eeudzwylxzlyz69fsgumqrscj6tekhdvs8fye3asufmvxr
here