Skip to content
New issue

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

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

Already on GitHub? # to your account

Better typing for fixed length array arguments (ethers v5 target) #273

Closed
zemse opened this issue Aug 15, 2020 · 1 comment · Fixed by #274
Closed

Better typing for fixed length array arguments (ethers v5 target) #273

zemse opened this issue Aug 15, 2020 · 1 comment · Fixed by #274

Comments

@zemse
Copy link
Contributor

zemse commented Aug 15, 2020

function payToTree(uint32[3] _rewardRatio) public;

Current:

_rewardRatio: ethers.BigNumberish[]

Desired:

_rewardRatio: [ethers.BigNumberish, ethers.BigNumberish, ethers.BigNumberish]

I think it would be nice to take into account about the array length (since ethers.js's ABI encoder also takes it into account ethers-io/ethers.js#1004).

I can work on this later this month or may be next month. Though, in case anyone is interested may do it :)

@zemse
Copy link
Contributor Author

zemse commented Aug 15, 2020

Actually, I just went ahead working on my project and realised that really wanted this small feature. So I just had to do it ‎😅

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant