web3.unity
web3.unity copied to clipboard
Added Generic<T> Extension Methods for Contract
Original Call & Send methods of Contract class operate with arrays of object object[], for both input and output values. This leads to a lot of boilerplate code each time you want to interact with a smart-contract.
The extension methods automate most of this work for you.
What if there's more than 3 params that are being passed on? :D
Then there are 2 options:
- Do it using the old ugly way,
- Create your own extension method with 4, 5, 6.. parameters (and ideally post it as PR)
But from my experience so far, 3 arguments are more than enough for 99% of the cases.