These are chat archives for Nethereum/Nethereum

Apr 2018
Apr 15 2018 06:06
Hey @juanfranblanco , how does decoding multiple output parameters work with Unity? The example you provide in the documentation uses the regular Nethereum.Web3, but I was wondering if there is a different way which is more compatible with Unity. I haven't been able to get your example working with Unity as of yet.
Juan Blanco
Apr 15 2018 06:20
check the unity3d sample
Apr 15 2018 06:21
Great I'll check that out, thanks a lot!
Perfect I see what I did wrong now. Thanks for the quick help!
Apr 15 2018 06:28
Actually I just realized, what if I needed to get the data from a mapping? In the documentation example you pass in the "key1" as your bytes32 key mapping into the CallDeserializingToObjectAsync method. How would I go about this in Unity? Can I use a Dictionary<key, value> as the FunctionOutput Parameter to represent a mapping(key => value) or would that not work?
Or would the key go into the CallInput parameter and then everything else is the same?
Juan Blanco
Apr 15 2018 06:35
if you check your abi
from a mapping you wil pass as a parameter your key
and it will return some values
in the same way as another function
if you use the code generator
in vscode your output will be generated
although a specific code generator for yielding in Unity3d is going to be created
@Greatsamps interesting.. is this corrected now?
it might have been a temporary fork
Apr 15 2018 06:42
Great, it worked just like you said. Thanks again
Juan Blanco
Apr 15 2018 07:27
@EnigmaticUnreal_twitter at the moment it is assumed that if somebody can access your memory it will be an issue. (Well it will be an issue anyway)
bouncy castle is used for EC and other bits, the bytes are already there floating around. These could be wiped out or use something like ProtectData or SecuredString
which are not yet there fully supported in Linux
Juan Blanco
Apr 15 2018 07:32
so in the future.. an entry point will be only secured strings and / or byte arrays
from secured string to byte array that should be wiped out using random zeros + ones
still an easy point to spot and follow
Juan Blanco
Apr 15 2018 08:02
Apr 15 2018 09:25
so its still happening
i have put wireshark on and traced what is coming back from web3
this is a cut down extract
if you look at the last transaction
you can see that it does not belong on this block
it was actually confirmed on the next block
Apr 15 2018 13:44
@juanfranblanco for transfer SendRequestAsync is better or andwait ?
Juan Blanco
Apr 15 2018 20:30
I have checked with the infura guys, (just in case there something on their end). This is mainly the usual temporary fork, chain reorg
@TarrahArshad depends
on the speed of the chain
and how are your handling it
ie slow chain with an inner thread you can sendAndWaitForReceipt and use a cancellationToken
or an expiration time
Apr 15 2018 22:48
Hey @juanfranblanco, I'm pretty sure I'm using the EthEstimateGasUnityRequest correctly but apparently not.
It's just a regular erc20 mint function I'm trying to estimate the gas for. The EthereumNetwork.CURRENT_NETWORK just points to infura rinkeby and it works fine for any other UnityRequests. The mint function just accepts two parameters, an address, and uint256 amount.
Apr 15 2018 22:54
Weirdly enough I can use this same method to read the estimated gas for any "view" functions, even though they actually cost no gas to execute.
Apr 15 2018 23:05
Nevermind I figured it out. mintFunction.CreateTransactionInput instead of mintFunction.CreateCallInput got the estimated gas no problem.