graphprotocol / graphprotocol/graph-node

CallHandler: Doesn't work for function with tuple[][] arguments

Open
#3,768 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Do you want to request a feature or report a bug?
bug
What is the current behavior?
Failed to generate types for contract ABIs: Failed to generate types for contract ABI: Conversion from 'ethereum' to 'AssemblyScript' for source type 'tuple[][]' is not supported
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

{
			"inputs": [
				{
					"internalType": "bytes32[]",
					"name": "accounts",
					"type": "bytes32[]"
				},
				{
					"components": [
						{
							"internalType": "enum ResourceData.ResourceType",
							"name": "resourceType",
							"type": "uint8"
						},
						{
							"internalType": "uint256[]",
							"name": "amounts",
							"type": "uint256[]"
						}
					],
					"internalType": "struct ResourceData.AmountPayload[][]",
					"name": "payloads",
					"type": "tuple[][]"
				}
			],
			"name": "registerAndDripMult",
			"outputs": [],
			"stateMutability": "nonpayable",
			"type": "function"
		}

run graph codegen with this abi
What is the expected behavior?
should support tuple[][]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running graph codegen with the ABI shown in the issue and reproduce the failure for the tuple[][] argument. Trace the ABI type conversion entry point that reports the unsupported conversion, then verify that code generation succeeds for nested tuple arrays without regressing the existing ABI cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.