abi-code-gen
abi-code-gen copied to clipboard
generateFunctionCall and generateFunctionCallMultipleOutputsDTO generate code without fromAddress
The following C# code is generated:
public Task<bool> StoreDocumentAsyncCall(byte[] key, string name, string description) {
var function = GetFunctionStoreDocument();
return function.CallAsync<bool>(key, name, description);
}
And it would be better if also this code was generated:
public Task<bool> StoreDocumentAsyncCall(string addressFrom, byte[] key, string name, string description, HexBigInteger gas = null, HexBigInteger valueAmount = null) {
var function = GetFunctionStoreDocument();
return function.CallAsync<bool>(addressFrom, gas, valueAmount, key, name, description);
}
A possible solution can be found here: https://github.com/StefH/Solidity-Examples/tree/master/SmartContracts/Common/Solidity/templates
Thanks, I'll have a look over the weekend
Nice stuff, I have started to move code to common templates, you might find that useful. Also, note I am going to start generating more CQS based stuff.
Cool, if you have an update I would like to see that.
Yes I will push something this week, nothing major just starting, I am consolidating ideas to generate UI viewmodels, cqs, etc.. But having common utilities is a must to reduce the copy and paste.