get_erc1155_tokens
Query ERC1155 tokens like runes, charms, and accessories in Axie Infinity, with options to filter by owner and token type for inventory management.
Instructions
Get ERC1155 tokens such as runes, charms, accessories, ingredients, and other in-game items, optionally filtered by owner.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | No | Filter by owner Ronin address (ronin:xxxx or 0x...). | |
| tokenType | Yes | The type of ERC1155 token to query. | |
| from | No | Pagination offset. Default 0. | |
| size | No | Number of results to return. Default 10. |
Implementation Reference
- src/index.ts:781-800 (handler)The handler implementation for the 'get_erc1155_tokens' tool, which defines the input schema, parses arguments, executes the GraphQL query using the client, and returns the result.
case "get_erc1155_tokens": { const schema = z.object({ owner: RoninAddress.optional(), tokenType: Erc1155TypeEnum, from: z.coerce.number().int().min(0).default(0), size: z.coerce.number().int().min(1).max(100).default(10), }); const parsed = schema.parse(args); const variables: Record<string, unknown> = { tokenType: parsed.tokenType, from: parsed.from, size: parsed.size, }; if (parsed.owner) variables.owner = parsed.owner; const data = await client.query<{ erc1155Tokens: unknown }>( queries.GET_ERC1155_TOKENS, variables ); return jsonContent(data.erc1155Tokens); }