StateVariables.with_all_properties()

Adds a filter to get state variables that have all given properties.

with_all_properties(properties: List[StateVariableProp]) β†’ StateVariables

Query Example

from glider import *
def query():
	state_vars = StateVariables().with_all_properties([StateVariableProp.IMMUTABLE, StateVariableProp.PUBLIC]).exec(1)
	for state_var in state_vars:
		print(state_var.name())
		print(state_var.properties())
	return []

Output

"root":{1 item
"print_output":[2 items
0:string"uniswapV2Router"
1:string"['public', 'immutable']"
]
}

Last updated