These are chat archives for Nethereum/Nethereum

26th
Feb 2017
Juan Blanco
@juanfranblanco
Feb 26 2017 09:42
@DavidBurela that is a good way to throw a hint
Juan Blanco
@juanfranblanco
Feb 26 2017 09:47
what exactly you need from contract.json ?
I will add overloads to simplify this
David Burela
@DavidBurela
Feb 26 2017 11:42

@juanfranblanco I spent today watching 3 of your YouTube videos.
In Truffle, you use the truffle-contract.js, pass in the contract.json and from that point you have a working proxy class for your contract. It even automatically has the address.

From what I can tell, in Nethereum you need to bring in an ABI, then bring in the address externally.
And I'm not sure if the ABI Nethereum expects, and the output of truffle contract.json is the same.

Ideally, I'd use Truffle for: Writing the solidity contract, running unit tests, having it manage the lifecycle of deployments of the contracts ( truffle migrate ).
Then in Nethereum, I'd simply do something similar as Truffle, just import in the contract.json and write my C# code from there.

Also, with a lot of the calls in Nethereum, you seem to need to specify the <T> a lot. Any way we could have it auto generate off of the ABI/contract.json? Or at least specify it at creation, so simplify calling later?
I figured consuming the contract.json would help with DevOps / CI builds.
Just bring in the latest version automatically
Juan Blanco
@juanfranblanco
Feb 26 2017 12:16
@DavidBurela how could you missed the code generator in vscode solidity :)
of course you use it as an editor and the rest for truffle
jokes aside
David Burela
@DavidBurela
Feb 26 2017 12:17
I've watched the last 5 videos on the channel :P Just saw VS Code with manual code writing in xunit tests
https://www.youtube.com/channel/UCcoNl8LKOnnfNeek-08-Rkw/videos
Juan Blanco
@juanfranblanco
Feb 26 2017 12:18
oh.. I need to do more videos
jeez that is a big photo of me
In vscode you need to compile using F1
using the output json
you can select the file and will autogenerate your service
including typed versions for Events
FunctionDTOs (for multiple outputs)
David Burela
@DavidBurela
Feb 26 2017 12:22
That is cool!
But would that work on a build server? e.g. VSTS
Juan Blanco
@juanfranblanco
Feb 26 2017 12:22
well that is the next step
make the json output the same as truffle
David Burela
@DavidBurela
Feb 26 2017 12:23
:)
Juan Blanco
@juanfranblanco
Feb 26 2017 12:23
so services can be generated using the same json
i don't use unlinked
binaries so need to think about that
David Burela
@DavidBurela
Feb 26 2017 12:24
I'm advising a lot of customers on Blockchain recently. Trying to pre-empt the questions around C# dev, lifecycle, DevOps, etc.
So querying / making suggestions where I can to smooth things out
Juan Blanco
@juanfranblanco
Feb 26 2017 12:24
to me the key for VSTS integration is the address of the contract
so if you drive your integration tests using truffle first
and you can get the address deployed later
and run your .net integration tests using the same address
David Burela
@DavidBurela
Feb 26 2017 12:26
:thumbsup:
Great, you're on the same wavelength as me
Juan Blanco
@juanfranblanco
Feb 26 2017 12:26
i am going to change slightly the code generated service
make it partial, decouple the deployment
and add the TransactionPolling to it so you can just get the receipts

David Burela
@DavidBurela
Feb 26 2017 12:28
TransactionPolling for receipts.
Yes that is something I was wondering about from your demos.
Man, you're addressing everything. Good work.
Sounds like I should just sit back and wait :)
there is one already you just need to added to your services
I tried not to be opinionated.. some people might want to use RX but portability is key
so that might be a sample
Juan Blanco
@juanfranblanco
Feb 26 2017 12:35
@DavidBurela here is the code generator https://github.com/Nethereum/abi-code-gen
David Burela
@DavidBurela
Feb 26 2017 12:38

Thanks for answering all my questions.
I've got a bunch of ideas for using Nethereum. Especially within Azure Functions.

Question: On Azure, do you spin up your own geth node in a VM to act as your node. Or do you always use infura like in your vids?

Juan Blanco
@juanfranblanco
Feb 26 2017 12:38
Yes I use Infura
simpler to have it managed
David Burela
@DavidBurela
Feb 26 2017 12:38
True
Juan Blanco
@juanfranblanco
Feb 26 2017 12:39
David Burela
@DavidBurela
Feb 26 2017 12:39
although thinking about it now. A lot of my work is with customer's private Azure consortiums.
Which means I couldn't use infura.io as they are for the public chain & testnet
Juan Blanco
@juanfranblanco
Feb 26 2017 12:39
i use a vm with geth
to do all the blockchain processing before hand
as i need to be close to Azure Tables
@DavidBurela well for those scenarios Infura can provide the managed services
or of course create your consortium
David Burela
@DavidBurela
Feb 26 2017 12:47

well for the blockchain storage https://github.com/Nethereum/Nethereum.BlockchainStorage

Read through it twice. It "stores the blockchain in Azure storage". But don't get the usecase in the README
Is is so a node doesn't need to store it on its on HDD, it stores in Azure. Then if you shutdown a VM, and boot it up again, it can just continue from Azure storage?

Juan Blanco
@juanfranblanco
Feb 26 2017 12:50
no the use case is to have all the data of the blockchain which can be indexed (Azure Search) all the contracts, etc
mainly a backend for a blockchain explorer
David Burela
@DavidBurela
Feb 26 2017 12:50
ahhhhh gotcha
Sounds similar to what we used BlockApps strato for. Easier searching / lookups of Blockchain data
nice
Juan Blanco
@juanfranblanco
Feb 26 2017 12:51
if you want to use other storage ie.. sql azure just provide the repos