melonjs
melonjs copied to clipboard
Standardise order of arguments for transactions
To prevent usage errors, it would be good to standardise the order of the arguments for transactions.
I suggest to always use the sender address first, e.g.
public deposit(from: Address, amount: BigNumber) {}
In addition, if there are more than 2 (?) other arguments, we should pass an object with the arguments, i.e.
public requestInvestment(from: Address, args: RequestInvestmentArguments) {}
This may be used / superseded by #61
We can implement this rule (use Args type for more than 2 parameters) in #61. This is a good rule of thumb for code readability.