For the complete documentation index, see llms.txt. This page is also available as Markdown.

StateVariables.with_type()

Adds a filter to get state variables that have the given type.

with_type(variable_type: str) → StateVariables

Query Example

from glider import *


def query():
  state_variables = (
    StateVariables()
    .with_type("mapping(uint256 => uint256)")
    .exec(5)
  )

  print(state_variables[0].source_code())
  print(state_variables[1].source_code())

  return state_variables

Example Output

Last updated