These are chat archives for Nethereum/Nethereum

16th
Apr 2018
Tomas Tichy
@ttichy
Apr 16 2018 01:45

Hi @juanfranblanco , I think I have a mystery on my hands (or I am going crazy)..

There are two functions in solidity. I call them both with function.CallAsync<BigInteger>()

  function getNumPayees() public view returns(uint) {
    return payees.length;
  }

  function getNumberOfPayees() public view returns(uint) {
    return payees.length;
  }

The one named getNumPayees() returns fine. The one named getNumberOfPayees() throws

System.InvalidOperationException: Sequence contains no elements
    at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Nethereum.ABI.Decoders.IntTypeDecoder.DecodeBigInteger(Byte[] encoded)

any ideas?

Matt.Tan
@mtbitcoin
Apr 16 2018 04:14
Can nethereum be used to parse event logs if the abi or event type is known ?
For instance https://etherscan.io/tx/0x0e8587d3305ddc90e07a3dd8c870bddd40de7f6e509c5726a289668625a3ac96#eventlog
with the function Transfer (indexed address from, indexed address to, uint256 value)
Greatsamps
@Greatsamps
Apr 16 2018 04:16
@juanfranblanco Many thanks, i will now allow for this potentially happening :)
Juan Blanco
@juanfranblanco
Apr 16 2018 08:02
@ttichy that is very strange Ill test it
@mtbitcoin hi !!! yes, but you need to declare the type for deserialization
Matt.Tan
@mtbitcoin
Apr 16 2018 08:10
@juanfranblanco got any sample code?
you can run it using Xamarin.Workbooks
Juan Blanco
@juanfranblanco
Apr 16 2018 08:35
@mtbitcoin I have just changed it slightly to provide more information
Matt.Tan
@mtbitcoin
Apr 16 2018 08:38
Thank @juanfranblanco . so basically this requires a custom DTO setup for the specific contract
Juan Blanco
@juanfranblanco
Apr 16 2018 08:39
in a simplistic way yes
as an end user
Juan Blanco
@juanfranblanco
Apr 16 2018 08:49
end users will want to unit test, etc, map to business objects (that was my point)
Matt.Tan
@mtbitcoin
Apr 16 2018 08:51
got it. thanks
shahar603
@shahar603
Apr 16 2018 08:52
Is Nethereum Open Source?
TarrahArshad
@TarrahArshad
Apr 16 2018 09:18
@juanfranblanco can u give me refrence for create contract ?
Juan Blanco
@juanfranblanco
Apr 16 2018 10:58
@mtbitcoin I forgot to mentioned, the vscode soliity extension generates a vb.net project
TarrahArshad
@TarrahArshad
Apr 16 2018 10:59
@juanfranblanco i have contract with function payable . how to call from my nethereum web3 ?
Juan Blanco
@juanfranblanco
Apr 16 2018 10:59
same as any other contract call
transaction
but passing the value if you are sending ether
TarrahArshad
@TarrahArshad
Apr 16 2018 11:00
@juanfranblanco i developed balance , transfer for erc30 token but contract is my first call
Juan Blanco
@juanfranblanco
Apr 16 2018 11:01
check the above for an introduction
and you can try
if you use vs code and solidity
TarrahArshad
@TarrahArshad
Apr 16 2018 11:01
 function buy(address _owner,uint amount) public payable {
        send(_owner,amount);
  }
Juan Blanco
@juanfranblanco
Apr 16 2018 11:01
that can generate your c# project
i am going to a meeting
TarrahArshad
@TarrahArshad
Apr 16 2018 11:02
@juanfranblanco i use remix
Juan Blanco
@juanfranblanco
Apr 16 2018 11:02
talk later
TarrahArshad
@TarrahArshad
Apr 16 2018 11:02
@juanfranblanco when u back ?
MarkusGalant
@MarkusGalant
Apr 16 2018 14:31
hi guys how are you?
TarrahArshad
@TarrahArshad
Apr 16 2018 17:25
@MarkusGalant yes
ShermanMeredith
@ShermanMeredith
Apr 16 2018 21:36
Hey everyone I'm new to Nethereum. I'm trying to use it in Unity and I'm stuck on a bug. Sorry if this is a trivial bug or if it's been solved before.
In my ContractService script, I run the constructor which creates a contract object: this.contract = new Contract(null, ABI, contractAddress);
Then I get the error: JsonReaderException: Invalid property identifier character: ‘. Path '[0]', line 1, position 2.
I've validated the JSON in the ABI and it is valid
The ABI is very long though, over 18000 characters. Maybe Unity has a string max length?
Any help would be really appreciated