These are chat archives for Nethereum/Nethereum

17th
Dec 2018
Juan Blanco
@juanfranblanco
Dec 17 2018 05:51
@brdtpro asnswering your email too
create a TransactionInput and set the data value
and pass that to the TransactionManager
if is a string you should do something like
transactionInput.Data = Encoding.UTF8.GetBytes((string) value).ToHex()
where value is your input message
and ToHex() is an extension method from the namespace
using Nethereum.Hex.HexConvertors.Extensions;
MANOJKUMARCH
@MANOJKUMARCH
Dec 17 2018 09:15
Hi, how can I send string array as an input to solidity function. I know that we cannot directly have string array as an input parameter for solidity function, but can we change it to some bytes value and send it?
in my scenario, I want to send an ethereum signature, which is greater than 32 bytes, and hence I am unable to send using bytes32.
Could some one please help me here
Kevin Small
@KevinSmall
Dec 17 2018 10:00
hi @MANOJKUMARCH are you working purely in solidity here? If so, could you store the signature as type bytes and pass that around in functions as input and output
MANOJKUMARCH
@MANOJKUMARCH
Dec 17 2018 10:05
Hi @KevinSmall, my case is this, I need to send few signatures to the contract as part of the constructor while deploying the contract and need to verify them in the functions.
Also, just now my requirement is updated that I need to send an array of email ids as well into contract and save them. Hence as, the email ids will not be in 32 bytes, I am not sure on how to do it
Kevin Small
@KevinSmall
Dec 17 2018 10:18
how about an array of fixed length bytes? uint constant MAX_LENGTH = 254; byte[MAX_LENGTH][] emailList;
there is a library to serialise/deserialise arbitrary inputs for functions here https://hackernoon.com/serializing-string-arrays-in-solidity-db4b6037e520, although I have not used it, it might be helpful
MANOJKUMARCH
@MANOJKUMARCH
Dec 17 2018 11:49
@KevinSmall , I think it will not work out in my case, I am trying to get all the values as a comma separated string and then will split them into array in the solidity code.
Will update if this works for me
RJ Catalano
@VoR0220
Dec 17 2018 15:16
Hey @juanfranblanco I'm currently running into some problems with the Generator tool for smart contracts. The documentation says to use command generate and then a bunch of subcommands like from-abi and from-truffle and such. But when I log for help in my Generator function I get the following instead:
> Nethereum.Generator.Console --help


Usage:  [options] [command]

Options:
  -h | -? | --help  Show help information

Commands:
  gen-fromabi      Generates a Nethereum (c#) code based based on the abi
  gen-fromproject  Generates a Nethereum (c#) code based based on the abi

Use " [command] --help" for more information about a command.
Looking at the source code this doesn't appear to correspond correctly. What am I doing wrong in installation? Was an artifact not deployed?
Dave Whiffin
@Dave-Whiffin
Dec 17 2018 15:18
@VoR0220 Sounds like you're running the older version.
RJ Catalano
@VoR0220
Dec 17 2018 15:18
I was worried about that.
I copy/pasted directly from the installation instructions.
for PreRelease instructions
RJ Catalano
@VoR0220
Dec 17 2018 15:24
I'm running various ways of installation but still getting version 1.0.1
> dotnet tool install Nethereum.Generator.Console -g --version 3.0.0-rc1
error NU1102: Unable to find package nethereum.generator.console with version (>= 3.0.0-rc1)
error NU1102:   - Found 2 version(s) in nuget.org [ Nearest version: 1.0.1 ]
error NU1102:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error NU1102:   - Found 0 version(s) in C:\Program Files\dotnet\sdk\NuGetFallbackFolder
The tool package could not be restored.
Tool 'nethereum.generator.console' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
> dotnet tool install Nethereum.Generator.Console -g --version 3.0.0
error NU1102: Unable to find package nethereum.generator.console with version (>= 3.0.0)
error NU1102:   - Found 2 version(s) in nuget.org [ Nearest version: 1.0.1 ]
error NU1102:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error NU1102:   - Found 0 version(s) in C:\Program Files\dotnet\sdk\NuGetFallbackFolder
The tool package could not be restored.
Tool 'nethereum.generator.console' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
Dave Whiffin
@Dave-Whiffin
Dec 17 2018 15:32

@VoR0220 Apologies - it looks we'll need to fix this documentation.

Try this:

dotnet tool uninstall -g Nethereum.Generator.Console
dotnet tool install -g --version "1.0.2-CI-20181217-101623" --add-source "https://www.myget.org/F/nethereum/api/v3/index.json" Nethereum.Generator.Console
RJ Catalano
@VoR0220
Dec 17 2018 15:33
That worked! Thank you!
Dave Whiffin
@Dave-Whiffin
Dec 17 2018 15:43

@VoR0220 Sorry for confusion. Without the explicit version declaration the package was being retrieved from Nuget instead of MyGet. Unfortunately Nuget only has the old version at present.

I'll get on to that ASAP.