Tuple with struct incorrectly parsed - always errors
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- solidity, typescript
- Domain
- blockchain, frontend
Research direction
The payload names no source file; start by reviewing the tuple-related tests referenced in PR #402 and tracing the validation path for nested struct tuples. Reproduce the reported TypeError with the example input, then consider the issue done when the tuple validates successfully and regression coverage exists.
Written by the indexing model from the issue text.
Description
Description
Struct tuple incorrectly parsed, never passes validation:
Example tuple: (whitespace here for legibility)
[
[{ "token": "0xSomeActualAddress", "id": "1000" }],
[{ "token": "0xSomeActualAddress", "id": "4000" }]
]
contract tuple:
StructType {
address token;
uint256 id;
}
function someContractFn(
string memory stringParam,
uint256[] calldata _unit256ArrayParam,
StructType[][] calldata _tupleParam
) external { ... }
Running this on etherscan works fine. I checked the tests written in this PR, which addresses the original issue opened, but I don't see any tests for struct tuples
Environment
- Browser: Brave
- Wallet: Brave wallet
- Safe:
- Environment:
- production (goerli)
Steps to reproduce
For reasons of security on our side I don't want to give our contract, but any other contract requiring a struct tuple as a param will encounter this problem.
Expected result
Passes validation
Obtained result
Invalidated with: format error. details: typeerror: cannot read properties of undefined (reading 'length')
Screenshots
Also hi to the Safe team!
- Dominant language
- TypeScript
- Stars
- 116
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from safe-global/safe-react-apps
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
safe-global/safe-react-apps#863 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
safe-global/safe-react-apps#854 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
safe-global/safe-react-apps#852 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
safe-global/safe-react-apps#839 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
safe-global/safe-react-apps#835 ·
All issues in safe-global/safe-react-apps
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·