These are chat archives for Nethereum/Nethereum

27th
Mar 2018
Juan Blanco
@juanfranblanco
Mar 27 2018 07:29
@ryoichirooka_twitter thanks (very strange) Ill repack then
Ryo
@ryoichirooka_twitter
Mar 27 2018 08:09
@juanfranblanco Actually, never mind, you're right. The one in packages does work when referred to in Nethereum.Unity, and doesn't when referred to in the other assemblies -- which should be the supposed behavior. So you don't have to repack.
Juan Blanco
@juanfranblanco
Mar 27 2018 08:10
ah cool thanks :)
Ryo
@ryoichirooka_twitter
Mar 27 2018 08:20
Thank you too! :smile: By the way -- Nethereum.Unity doesn't do account/keystore management, right? As in your WebGL example uses Metamask that's installed in the user's browser. I'm developing for iOS and going to test Web3.swift library as a replacement of it -- do you have any recommendation on other libraries?
Juan Blanco
@juanfranblanco
Mar 27 2018 08:49
you can use the keystore library for that
Ryo
@ryoichirooka_twitter
Mar 27 2018 19:40
Sweet, thanks!
AdamMacDon
@AdamMacDon
Mar 27 2018 23:17
Hello, I'm trying to get my Unity WebGL build working. I exported a regular standalone .exe and the Nethereum plugin works perfectly. However, in WebGL, my Nethereum-dependent code initially wouldn't work at all, until I added some System elements into the link.xml file. Now I'm getting an error message that states "Json Exception: No parameterless constructor defined for Nethereum.Unity.RpcModel.RPCParametersJsonConvertor". This error appears every time I try to use any features in the game that use Nethereum. Has anyone else experienced this? Any ideas? Thanks!
Ryo
@ryoichirooka_twitter
Mar 27 2018 23:19
@AdamMacDon We just discussed that right above there... :D Replace your Newtonsoft.Json assembly in your project with one in packages in Nethereum repo
@juanfranblanco Juan, another confusing factor -- the keystone library doesn't work out with the custom json library in packages. On iOS build it's producing NotSupportedException in KeyStoreService.EncryptAndGenerateDefaultKeyStoreAsJson() saying that dynamic code generation is not supported in IL2CPP -- which is very strange, because the custom json library in use should've resolved this error. Can you actually check if the assembly is up to date?
AdamMacDon
@AdamMacDon
Mar 27 2018 23:27
Cool, I'll try it out, thanks!
Ryo
@ryoichirooka_twitter
Mar 27 2018 23:35
@juanfranblanco I went ahead and replaced the assembly with the latest version in the original repo (SaladLab), and these are what happened:
  1. EthBlockNumberUnityRequest() (and other methods) can't find Newtonsoft.Json.JsonSerializerSettingsas in "defined in an assembly that is not referenced".
  2. KeyStoreService.EncryptAndGenerateDefaultKeyStoreAsJson()works in Unity Editor totally fine. But, on iOS build, it generates a JSON with some properties missing: id, address, version, crypto/cipher, and crypto/kdf -- which makes decrypting the JSON (using KeyStoreService.DecryptKeyStoreFromJson()) fail with an ArgumentNullException because the crypto/kdf property doesn't exist in the JSON.