These are chat archives for Nethereum/Nethereum
I did that, I made a class with the same outputs as the solitidy function and called
but it gives me an error
"IndexOutOfRangeException: Array index is out of range.
System.Numerics.BigInteger..ctor (System.Byte value)
Nethereum.ABI.Decoders.IntTypeDecoder.DecodeBigInteger (System.Byte encoded)
Nethereum.ABI.Decoders.IntTypeDecoder.DecodeInt (System.Byte encoded)
Nethereum.ABI.Decoders.BoolTypeDecoder.Decode (System.Byte encoded, System.Type type)..."
Good evening everyone!
I'm trying to use solidity .net code generator and keep getting this error, though the JSON seems fine:
Error generating code: Unexpected token o in JSON at position 1
Could anyone help me with this?
First file is broken; you can delete that one.
And can you also add the 2 dependency contracts?
@UnimaginaryUnit : Using the
solc compiler directly, I'm able to compile your contract into C# generated code.
See this project here: https://github.com/StefH/Solidity-Examples/tree/master/SmartContracts/Examples/ArtifactOwnership which also includes a simple .NET console app. (Note that I only deployed the contract on my local Ganache and executed 1 function).
And see https://github.com/mstack/bootcamp-blockchain-smartcontracts [specifically Lab 2) for a tutorial on how to use the project template to generate C# service interfaces and classes.