Struct.fields

Returns the fields of the struct.

property fields : APIList[StructField]

Query Example

from glider import *

def query():
  contracts = Contracts().exec(1, 26)

  for struct in contracts[0].structs().exec():
    for struct_field in struct.fields:
      print(struct_field.name)

  return []

Example Output

[
  {
    "print_output": [
      "amount",
      "rewardDebt",
      "registrated"
    ]
  }
]

Last updated