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
  • Methods
Edit on GitHub
Export as PDF
  1. Smart Contracts

Account NFT

The Account NFT Contract returns all Credit Account NFT infos and handles the minting and burning of Credit Accounts via the Credit Manager.

Last updated 25 days ago

Deployments

Neutron:

Osmosis:


Types

The types of the Account NFT Contract can be found .

For reference on the Queries and Methods:

Base Types
type Binary = string
type Uint128 = string
type Expiration =
  | {
      at_height: number
    }
  | {
      at_time: Timestamp
    }
  | {
      never: {}
    }

Queries

all_nft_info

Returns all NFT related infos for a the provided token_id.

Query message
{
    all_nft_info: {
        include_expired?: boolean | null
        token_id: string
    }
}
Return output
{
    data: {
        access: {
            approvals: [
                {
                      expires: Expiration
                      spender: string
                },
                ...
            ]
            owner: string
        }
        info: {
            extension: [k: string]: unknown
            token_uri?: string | null
        }
    }
}

all_operators

Query message
{
    all_operators: {
        include_expired?: boolean | null
        limit?: number | null
        owner: string
        start_after?: string | null
    }
}
Return output
{
    data: {
        operators: [
            {
                expires: Expiration
                spender: string
            },
            ...
        ]
    }
}

all_tokens

Query message
{
    all_tokens: {
        limit?: number | null
        start_after?: string | null
    }
}
Return output
{
    data: {
        tokens: string[]
    }
}

approvals

Query message
{
    approvals: {
        include_expired?: boolean | null
        token_id: string
    }
}
Return output
{
    data: {
        approvals: [
            {
                expires: Expiration
                spender: string
            },
            ...
        ]
    }
}

config

Query message
{
    config: {}
}
Return output
{
    data: {
        credit_manager_contract_addr?: string | null
        health_contract_addr?: string | null
        max_value_for_burn: Uint128
    }
}

contract_info

Query message
{
    contract_info: {}
}
Return output
{
    data: {
        name: string
        symbol: string
    }
}

minter

Query message
{
    minter: {}
}
Return output
{
    data: {
        minter: string
    }
}

next_id

Query message
{
    next_id: {}
}
Return output
{
    data: Uint128
}

nft_info

Query message
{
    nft_info: {
        token_id: string
    }
}
Return output
{
    data: {
        extension: [k: string]: unknown
        token_uri?: string | null
    }
}

num_tokens

Query message
{
    num_tokens: {}
}
Return output
{
    data: {
        count: number
    }
}

owner_of

Query message
{
    owner_of: {
        include_expired?: boolean | null
        token_id: string
    }
}
Return output
{
    data: {
        approvals: [
            {
                expires: Expiration
                spender: string
            },
            ...
        ]         
        owner: string
    }
}

ownership

Query message
{
    ownership: {}
}
Return output
{
    data: {
        owner: string
        pending_owner: Expiration | null
        pending_expiry: Addr | null
    }
}

tokens

Query message
{
    tokens: {
        limit?: number | null
        owner: string
        start_after?: string | null
    }
}
Return output
{
    data: {
        tokens: string[]
    }
}

Methods

The Account NFT methods can only be executed by the . The methods are therefore not a part of the documentation.

neutron184kvu96rqtetmunkkmhu5hru8yaqg7qfhd8ldu5avjnamdqu69squrh3f5
osmo1450hrg6dv2l58c0rvdwx8ec2a0r6dd50hn4frk370tpvqjhy8khqw7sw09
here
Credit Manager