Enabled modules currencies

📘

Full code example

https://github.com/lens-protocol/api-examples/blob/master/src/module/enabled-modules-currencies.ts

🚧

This request is protected by authentication

hint: this means it requires an x-access-token header put in the request with your authentication token.

Modules currencies are whitelisted tokens that can be used as the currency for charged modules. All module currencies must be whitelisted by the governance, if you try to use a none whitelisted currency when setting the module it will throw an error.

This query returns to you all the enabled module currencies

API Design

query EnabledModuleCurrencies {
  enabledModuleCurrencies {
    name
    symbol
    decimals
    address
  }
}
{
  "data": {
    "enabledModuleCurrencies": [
      {
        "name": "Currency",
        "symbol": "CRNC",
        "decimals": 18,
        "address": "0xD40282e050723Ae26Aeb0F77022dB14470f4e011"
      }
    ]
  }
}
type Query {
  enabledModuleCurrencies: [Erc20!]!
}
# The erc20 type
type Erc20 {
  # Name of the symbol
  name: String!

  # Symbol for the token
  symbol: String!

  # Decimal places for the token
  decimals: Int!

  # The erc20 address
  address: ContractAddress!
}
  
# Contract address custom scalar type
scalar ContractAddress

Did this page help you?