These are chat archives for Nethereum/Nethereum

13th
Aug 2018
Juan Blanco
@juanfranblanco
Aug 13 2018 05:48
@Cdpopham no, you could use events and get the data from the TransactionReceipt
@rickzan_twitter what is a "fe"
you can use the generator to create the api..
in Nethereum.. you could create the UI in winforms / xamarin / avalonia / blazor (but yes each one require its level of skill)
@EnigmaticUnreal_twitter How did you fail the entrance test!!
you know everything :)
Enigmatic
@EnigmaticUnreal_twitter
Aug 13 2018 08:13

@rickzan_twitter what is a "fe"

Front end. :D

Enigmatic
@EnigmaticUnreal_twitter
Aug 13 2018 08:19

you know everything :)

Ah.... Actually I am just an ok-ok only programmer, especially in comparison to many of you all. Plus the entrance questions didn't accept anything in VB, so I was hacking together my answers in JS which wasn't my forte. grins

But shortly after that I came to know about Nethereum, so I am really happy now.
Plenty more to learn.
Levin
@levin9
Aug 13 2018 10:03
I want to get erc20 token Balance, There's a exception with "RpcResponseException: invalid argument 0: json: cannot unmarshal hex string of odd length into Go struct field CallArgs.to of type common.Address"
      var web3 = new Web3(this.txtUrl.Text.Trim());
        var contract = web3.Eth.GetContract(contractABI, this.txtContractAddress.Text);

        var balanceOfFunctionMessage = new BalanceOfFunction
        {
            Owner = this.txtTransferRecAddress.Text,
            FromAddress = this.txtTransferSenderAddress.Text
        };
        var balanceHandler = web3.Eth.GetContractQueryHandler<BalanceOfFunction>();
        var balanceFirstTransaction = Task.Run<BigInteger>(async () => {
                        return await balanceHandler.QueryAsync<int>(balanceOfFunctionMessage, this.txtContractAddress.Text); }).Result;            

        MessageBox.Show(balanceFirstTransaction.ToString());
Juan Blanco
@juanfranblanco
Aug 13 2018 10:16
@EnigmaticUnreal_twitter doh Front End
plenty front ends in .net :D..
Plenty more to learn
always.. :) that is the fun and sometimes the desperation
@levin9 it seems your address is not valid
we don't do any validation on address
(might be in the future..)
Levin
@levin9
Aug 13 2018 10:24
This address can be transferred by program, but in the mist, it is invalid. I will try another address.
Levin
@levin9
Aug 13 2018 10:33
I did not process the address, just like "0x12890d2cce102216644c59daE5baed380d84830c"
Juan Blanco
@juanfranblanco
Aug 13 2018 10:35
but you are assigning the address FromAddress that might be "blank" or have some text
hence the issue
(my guess :))
Levin
@levin9
Aug 13 2018 10:38
I confirm that the addresses are correct.
Both the contract address and the balance address are correct.
Pavel D
@paveldz
Aug 13 2018 18:01

Hello everyone!
Could someone help with this issue?

Nethereum/Nethereum#406

Enigmatic
@EnigmaticUnreal_twitter
Aug 13 2018 18:27
Hmm. Which Nethereum version are you using?
Enigmatic
@EnigmaticUnreal_twitter
Aug 13 2018 18:44
Ah scrap that. Tested with the release candidate and still having a problem, looks like the bytes are being forced into a smaller byte array.
Will have a better look later this the morning. 2:45AM now, and I need to go for an interview later.
In the meantime try converting the hex to bytearray.
        Dim test = tokencontract.GetFunction("callMe").GetData("0x1c", "0xff29aa3ea57175b424c6c43a112f563f3323bc9666470f229fe20187e78f1021".HexToByteArray, "0x196037633d3370138af8fca56baf229c4d52411567ea36ebd0add89075f83d83".HexToByteArray)
I am thinking if it was a string and therefore it was complaining.
Sergio Piedrahita
@spied001
Aug 13 2018 21:03
can some one point me to an example for estimating gas before sending a transaction
an example that uses the following method: public Task<HexBigInteger> EstimateGasAsync(string from, HexBigInteger gas, HexBigInteger value, params object[] functionInput);
I keep getting : (InnerException {"gas required exceeds allowance or always failing transaction"} System.Exception {Nethereum.JsonRpc.Client.RpcResponseException} ) when I call
public Task<HexBigInteger> EstimateGasAsync(params object[] functionInput);