These are chat archives for Nethereum/Nethereum

7th
Jul 2018
@juanfranblanco Please download the zip file above to view detail code of solidity and c#
Thank for your supporting
Juan Blanco
@juanfranblanco
Jul 07 2018 05:43
@topnguyen var datas = Event.DecodeAllEvents<MotibikeChangedDataModel>(logs);
that is your problem
Top Nguyễn
@topnguyen
Jul 07 2018 05:43
yes
oops
I'm decode wrong model
:o
Juan Blanco
@juanfranblanco
Jul 07 2018 05:44
yeah :)
Top Nguyễn
@topnguyen
Jul 07 2018 05:44
OMG :D very basic thing, I correct it and try again now :))
Thank for your supporting @juanfranblanco , It work well now.
image.png
Juan Blanco
@juanfranblanco
Jul 07 2018 05:47
glad it helped..
i might put a futher check IsLogForEvent there
Top Nguyễn
@topnguyen
Jul 07 2018 05:48
Yes but the exception message throw when wrong model not make sense, that why I took whole my night but cannot resolve the issue.
Instead of cannot decode for type... It's show "index out of range"
Juan Blanco
@juanfranblanco
Jul 07 2018 05:49
yep
this is mainly backwards support
new Events generated contain
the [Event(name)]
as an attribute
so i can validate if the Event belongs to it
(event passed)
Top Nguyễn
@topnguyen
Jul 07 2018 05:52
Are you have put ".xml" file in the nuget package, I jump to your lib to debug what wrong but cannot.
Juan Blanco
@juanfranblanco
Jul 07 2018 05:53
so it does not decompile?
Top Nguyễn
@topnguyen
Jul 07 2018 05:53
yes, even I use rider but cannot jump into the DecodeAllEvents function
I will check my IDE again, if still cannot jump to the lib I will let you known.
Thank for your supporting again @juanfranblanco
Juan Blanco
@juanfranblanco
Jul 07 2018 05:54
great feedback
on the new version
EventDTOs if extending IEventDTO (and also having the attribute [Event(eventName)]
will provide you all the extensions
Top Nguyễn
@topnguyen
Jul 07 2018 05:56
Sound Great
Top Nguyễn
@topnguyen
Jul 07 2018 06:11
hmm @juanfranblanco about the smart contract, as I understand, each asset/entity map with a smart contract, is it right design?
Juan Blanco
@juanfranblanco
Jul 07 2018 06:12
yes I was actually looking at that in your code
that could be a design pattern but normally they contain lots of other functionality
that might be associated with other entities
Top Nguyễn
@topnguyen
Jul 07 2018 06:16
ok clear for that point, but the smart contract not support "struct" as parameter when deploy.
So normally we pass params object[] (if the entity contain 10 or over 10 properties) it make take time and easy to make some mistake when a developer type each property
Juan Blanco
@juanfranblanco
Jul 07 2018 06:16
what I am moving is to move further on the CQS (command query separation) space
oh in v2 they will support structs
and for that.. you can use a constructorDeployment which is typed
Top Nguyễn
@topnguyen
Jul 07 2018 06:17
ah
great
Juan Blanco
@juanfranblanco
Jul 07 2018 06:17
Nethereum/Nethereum#370
check that issue with the sample
now as things get more interesting (hence the CQS)
you may want to have a class per command / message
which would allow you to have different implementations
which may include multisignature / validation specific / logging etc
Top Nguyễn
@topnguyen
Jul 07 2018 06:19
awesome <3
Juan Blanco
@juanfranblanco
Jul 07 2018 06:21
so the idea at the moment is to provide to all these messages extra capabilities through extensions.. (for decoding, encoding, etc)
but still not coupled to the message (hence the extensions)
have lots of specific commands or queries
which can be overriden or use as part of DI
but still keep the normal layer for easiness if wanted
now Account, TransactionMager and Client remain the same (TransactionManager with more functionality even if is getting busy)
but allowing also for replacement with custom implementations
(hopefully makes sense).. mainly trying it to keep still simple, but if wanted extended, change or even DI, mock etc when needed
Top Nguyễn
@topnguyen
Jul 07 2018 06:45
ois, great idea to keep simple as possible Juan
Esteban Gallardo
@EstebanGameDevelopment
Jul 07 2018 15:51
Hello. I'm developing a resource for the Unity Asset Store wallet in the same way that I did with the Bitcoin (free asset) https://assetstore.unity.com/packages/add-ons/services/billing/your-bitcoin-controller-118493
I was doing good progress being able to create and manage multiple addresses and retrieving the balance until two days ago that I started to try to do a the most basic payment transaction. I don't know how to keep forward, I think my problem is about being able to unlock the account, deploy a contract to get the contract address, but I don't find any way to do it in Unity. Is it even possible? Do I have to create the contract address by other means and then be able to use it for the payment transfer? Thanks for the support.
Juan Blanco
@juanfranblanco
Jul 07 2018 18:16
I don't believe that there are actually paying versions of it ;)
unlock account?
there are samples for the other stuff, check the Unity3d flappy, or the simple Unity3d setup..
this will be made simpler and documented more in the next version, the unity3d simple has some of the latest stuff
Esteban Gallardo
@EstebanGameDevelopment
Jul 07 2018 20:13
I wasn't expecting a response during the weekend, weekends are for resting, except if you are a freelance like me XD
Yes, I have the reference of the Flappy Bird code, still, I started with the whole thing of Ethereum this Tuesday and I'm still in progress to understand it. My main doubt right now is from where the contract code the example of the Flappy Bird code is being calculated.

public class ScoreContractService {

....
private static string contractAddress = "0x32eb97b8ad202b072fd9066c03878892426320ed";
....

}

When I try to follow the documentation I see that you should deploy the contract in order to get the code number, but I don't see any functionality on "UnityRPCRequests.cs" to perform that operations .