BalanceOfFunctionOutput unit256 should convert to BigInteger instead of long
public class BalanceOfFunctionOutput : IFunctionOutputDTO
{
[Parameter("uint256", 1)]
public BigInteger Balance { get; set; }
}
BalanceOfAsync() should allow to pass in an Account with only PublicKey. There is no reason we need to have access to PrivateKey just to query for the balance. Look into the code and you should notices that the PrivateKey passed in is not used at all.
and since #1 had been changed to BigInteger, the following line in BalanceOfAsync() shall change to
// var balance = Convert.ToDecimal(result.Balance);
var balance = (decimal)result.Balance;
The following code won't compile without explicitly cast the result to (byte)
BalanceOfFunctionOutput unit256 should convert to BigInteger instead of long
public class BalanceOfFunctionOutput : IFunctionOutputDTO { [Parameter("uint256", 1)] public BigInteger Balance { get; set; } }
BalanceOfAsync() should allow to pass in an Account with only PublicKey. There is no reason we need to have access to PrivateKey just to query for the balance. Look into the code and you should notices that the PrivateKey passed in is not used at all.
and since #1 had been changed to BigInteger, the following line in BalanceOfAsync() shall change to
// var balance = Convert.ToDecimal(result.Balance); var balance = (decimal)result.Balance;
The following code won't compile without explicitly cast the result to (byte)