Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support array params in contract read #164

Closed
uF4No opened this issue Aug 12, 2024 · 3 comments Β· Fixed by #166
Closed

Support array params in contract read #164

uF4No opened this issue Aug 12, 2024 · 3 comments Β· Fixed by #166
Assignees
Labels
bug Something isn't working good first issue Good for newcomers released

Comments

@uF4No
Copy link
Collaborator

uF4No commented Aug 12, 2024

🌟 Feature Request

πŸ“ Description

Support passing arrays as method params using zksync-cli contract read.

πŸ€” Rationale

Currently not supported. Reported here zkSync-Community-Hub/zksync-developers#646

πŸ–ΌοΈ Mockups/Examples

If applicable, provide mockups or examples of how the feature would work.

πŸ“‹ Additional Context

Currently fails with the following error:

$ zksync-cli contract read
? Chain to use zkSync Mainnet
? Contract address 0x8....4
? Contract method to call getPairInfo(address[] path, bool stable) view returns (address tokenA, address tokenB, address pair, uint256 reserveA, 
uint256 reserveB, uint256 fee)
? Provide method arguments:
? [1/2] path (address[]) [0x5...E,0x0...A]
>> Failed to encode provided argument: expected array value (argument="path", 
value="[0x5...E,0x0...A]", code=INVALID_ARGUMENT, version=abi/5.7.0)
@uF4No uF4No added bug Something isn't working good first issue Good for newcomers labels Aug 12, 2024
@sleepyqadir
Copy link

Hey @uF4No , can you assign this to me, I can work on this

@itsacoyote itsacoyote self-assigned this Aug 14, 2024
@itsacoyote
Copy link
Contributor

Hi @sleepyqadir I've got a fix incoming for this very shortly!

Copy link

πŸŽ‰ This issue has been resolved in version 1.9.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants