NethermindEth / zksync-remix-plugin

Remix plugin for zkSync
MIT License
12 stars 10 forks source link

Support generic array in constructor input #146

Closed satyambnsal closed 1 month ago

satyambnsal commented 1 month ago

Relevant issue: #41

Changes Summary Support Generic array as input in contract methods and constructor call.

varex83 commented 1 month ago

Satyam, can you make it work not only for constructors?

satyambnsal commented 1 month ago

Satyam, can you make it work not only for constructors?

Yes, I'm going to add support for method as well.

satyambnsal commented 1 month ago

Following changes can be tested with Voting contract https://gist.github.com/satyambnsal/5e8165392e21b3d50d8da1ffad5b906c

Here constructor takes candidate name array and method getCandidates take array of candidate index (ex. [0,1])

varex83 commented 1 month ago

Not working on my side, after deploying with some contructor args I'm getting this:

image image
satyambnsal commented 1 month ago

@varex83 What constructor arguments did you use ?

satyambnsal commented 1 month ago

we need to fix the issue with plugin crashing

Thank you @varex83 for catching this. its fixed now. This was happening due to initial inputs array being set to empty array instead of based on element inputs array length.