These are chat archives for Nethereum/Nethereum

17th
Apr 2018
Enigmatic
@EnigmaticUnreal_twitter
Apr 17 2018 03:38
waves Hi Matthew! (@mtbitcoin)
Matthew
@ThatSlyGuy
Apr 17 2018 03:40
How can you send Ether to another address using Unity? I've figured out how you can send other tokens and interact with contract functions no problem, but I'm not sure what to do regarding sending Ether. Normally when creating the TransactionInput I use the contract.CreateTransactionInput method which seems to do most of the heavy lifting. Just creating a new TransactionInput gives me some parameters where I'm unsure of how they are dealt with. How should I go about doing this?
Juan Blanco
@juanfranblanco
Apr 17 2018 06:23
@ShermanMeredith the error seems to be at the very beginning of the line.. is there are formatting issue?
@ThatSlyGuy just create your own TransactionInput and set the Value
to the Ether amount you want (after converting it to Wei)
using Web3.Convert.ToWei(EtherAmount)
The rest will be the same
Kevin Small
@KevinSmall
Apr 17 2018 10:33
Hi @juanfranblanco, I occasionally write Unity articles for Ray Wenderlich website (they are best known for iOS tutorials but are now broadening into Unity)
I am writing an article for them on Ethereum and Unity integration, with emphasis on why developers should want to do this. However, I want to end with a practical Unity tutorial without getting bogged down with Solidity and contract creation details.
So - would it be ok for me to re-use the high score contract and some of the code you used in the Flappy Unicorn example? I would give credit of course (and Nethereum is core to the integration also of course).
Juan Blanco
@juanfranblanco
Apr 17 2018 10:34
Of course :)
Kevin Small
@KevinSmall
Apr 17 2018 10:34
ok cool
Juan Blanco
@juanfranblanco
Apr 17 2018 10:34
Yes high score is a rather simple example
Kevin Small
@KevinSmall
Apr 17 2018 10:35
ok thanks
I don't suppose you have the high score contract Solidity code?
Juan Blanco
@juanfranblanco
Apr 17 2018 10:35
if they are interested in iOS they could also look at the UrhoSharp sample
which uses the high score
Kevin Small
@KevinSmall
Apr 17 2018 10:35
does it use same contract?
Juan Blanco
@juanfranblanco
Apr 17 2018 10:35
it changed a little
as I put some signing / recovery etc
that is a bit complex
i guess
but you can remove the check if you want
that mainly validates that the game is sending the request
which you are very welcome to find the key in the flappy bird sample :D
Kevin Small
@KevinSmall
Apr 17 2018 10:41
:) I won't try to change it in case I break it but thank you
I didn't notice the sol file in the github repo, thanks
and is that contract the latest one I see posted here https://rinkeby.etherscan.io/txs?a=0x12890d2cce102216644c59daE5baed380d84830c&p=1
Juan Blanco
@juanfranblanco
Apr 17 2018 10:43
oh i just realised that the flappy eth example is down
with the website change
it should be this one 0x32eb97b8ad202b072fd9066c03878892426320ed
that is the nethereum test account
Kevin Small
@KevinSmall
Apr 17 2018 10:45
on Rinkeby?
Juan Blanco
@juanfranblanco
Apr 17 2018 10:48
that is not the full key
private key
0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7
Kevin Small
@KevinSmall
Apr 17 2018 10:52
ok let me have a play around, thank you
It should be fine now
ShermanMeredith
@ShermanMeredith
Apr 17 2018 16:30
@juanfranblanco thanks for the response... I tried to copy the Flappy Bird Unity example code as close I could:
public static string yourABI = @"[{'constant':false,'inputs':[{'name':'score','type':'int256'},...
public static string myABI = @"[{‘constant’:false,’inputs’:[{‘name’:’_newOwner’,’type’:’address’}],’name’:’transferOwnership’,’outputs’:[],’...
The two lines are structured identically, so I don't know why mine would have an error at the beginning of the line
Juan Blanco
@juanfranblanco
Apr 17 2018 16:32
have you tried to generate the string from vscode?
i know that is very specific to vanilla Nethereum
but it might spot an issue
ShermanMeredith
@ShermanMeredith
Apr 17 2018 16:34
you mean like some kind of JSON.ToString() function?
Juan Blanco
@juanfranblanco
Apr 17 2018 16:34
oh sorry
im recording it :)
Juan Blanco
@juanfranblanco
Apr 17 2018 16:46
codegenerationv3.gif
CryptoAlphaOne
@CryptoAlphaOne
Apr 17 2018 18:02
Hello everyone, what would be the compatible method in NetEtherium for this eth_getTransactionByHash RPC here?
ShermanMeredith
@ShermanMeredith
Apr 17 2018 18:23
@juanfranblanco I figured out the problem. It's SO STUPID. The original ABI I got had double quotes, so I had to convert them to single quotes. I did that in Microsoft Word and it converted the double quotes to ’ instead of '
The apostrophes are different!
CryptoAlphaOne
@CryptoAlphaOne
Apr 17 2018 19:31
@TarrahArshad Yes, there I also could not inform 1, the least accepted is what returns in the GasPrice metóto, if put less, will not.
CryptoAlphaOne
@CryptoAlphaOne
Apr 17 2018 20:15

Main Ethereum Network
https://mainnet.infura.io/xxxxxxxxxxxxx

Test Ethereum Network (Ropsten)
https://ropsten.infura.io/xxxxxxxxxxxxxxx
However, when I use the production URL I'm not successful in sending a transaction, Ropsten's URL already works OK.

https://ropsten.etherscan.io/tx/0x09aaca5f5e4297145db112692496eac9376281a798cae7c5454c2921b4f3ef4c

How can I validate if my key to the MAINNET network is working OK ?!

Sincerely,
Francisco.

CryptoAlphaOne
@CryptoAlphaOne
Apr 17 2018 20:51
@juanfranblanco I have this amount in my wallet 0.050117906411908017 (https://etherscan.io/address/0x4ec218ace96a32c8ef9ae692ec831552d89d4eea) then sending that amount 0.0501179064, however I am getting this error message: System.AggregateException: One or more errors occurred. ---> Nethereum.JsonRpc.Client.RpcResponseException: insufficient funds for gas * price + value
How to solve this?