These are chat archives for Nethereum/Nethereum

9th
Jul 2018
Top Nguyễn
@topnguyen
Jul 09 2018 02:02
@juanfranblanco Yes, I think smart contract as service or entity storage depend on business. My business/goal of the project is keep tracking data for each asset and product authentic (pharmacy)
My idea is store every asset as entity in block (just main or need tracking data to reduce gas)
Let say if a product sell for 20$ and the cost for tracking it via blockchain is 1$ so it acceptable.
Are you have any concern for my scenario Or any idea/way I can make a contract as service to data tracking?
Juan Blanco
@juanfranblanco
Jul 09 2018 05:07
@topnguyen excellent, not I don't see any major issues (now), later on think about upgradability of the contracts logic, adding extra fields, security etc
also creating your own managed transaction manager it would be better to have it decoupled from your service
Top Nguyễn
@topnguyen
Jul 09 2018 06:19
Thank @juanfranblanco for your suggest and consider about extra fields, logic inside. I think it fine if each contract present for a real asset, so if an asset have more field in future it would be a new asset. I also consider about: a contract is a part of asset, so when we have extra field, easier to link a contract to another.
Contract: Asset1 have property LinkToContractAddress, then we have Asset1ExtraContract for extend data in future.
Juan Blanco
@juanfranblanco
Jul 09 2018 10:59
@topnguyen you should check ethereum/EIPs#930
Stefan Naegeli
@snaegeli
Jul 09 2018 12:14
Hi @juanfranblanco - I have a quick question regarding the DeployContract method. I am using web3.Eth.DeployContract.SendRequestAsync(abi, byteCode, fromAddress, gas, gasprice, value, nonce, ...)
with by a bunch of parameters for my contract creation. When I do this - I get the error "Too many arguments: 8 > 7"
Juan Blanco
@juanfranblanco
Jul 09 2018 12:15
you can use namedparameters
but the easiest thing is to do this... (IMHO)
Stefan Naegeli
@snaegeli
Jul 09 2018 12:15
now technically I think it should match the signature with params object[] values?
Juan Blanco
@juanfranblanco
Jul 09 2018 12:16
Nethereum/Nethereum#370
Mainly use an Deployment object
yeah it should.. but it gets messy sometimes
different overloads and types
Stefan Naegeli
@snaegeli
Jul 09 2018 12:18
I have the contract bytecode external to my system - so I think I can't generate a hardcoded contract message
Juan Blanco
@juanfranblanco
Jul 09 2018 12:18
it can be passed to that object
Stefan Naegeli
@snaegeli
Jul 09 2018 12:18
My VS Code would open the C# class anymore with a constant containing the bytecode :-O
ah
wouldn't open*
Juan Blanco
@juanfranblanco
Jul 09 2018 12:19
so you can set it to blank (if wanted)
mainly it autogenerates a constant that used as the default bytecode
Stefan Naegeli
@snaegeli
Jul 09 2018 12:20
ok - let me try that
Juan Blanco
@juanfranblanco
Jul 09 2018 12:20
public Constructor10Deployment(string byteCode):base(byteCode) { }
but you have that to change it
Stefan Naegeli
@snaegeli
Jul 09 2018 12:20
alright!
Juan Blanco
@juanfranblanco
Jul 09 2018 12:21
for example when using libraries you will need to replace the contract addresses (linked them)
some heads up
this is the structure that is coming
so you can your generated stuff does not conflict with your custom stuff
ie.. you can use your own partial classes
Juan Blanco
@juanfranblanco
Jul 09 2018 13:25
here are some class diagrams if anybody is interested
Rob Aboud
@RobAboud
Jul 09 2018 15:41
is there any reason Nethereum would function via a console app but not via an asp.net web app?
Juan Blanco
@juanfranblanco
Jul 09 2018 15:48
are your marking your methods async?
@RobAboud
Rob Aboud
@RobAboud
Jul 09 2018 15:49
@juanfranblanco yes indeed
Juan Blanco
@juanfranblanco
Jul 09 2018 15:50
then it should be fine (normally the only issue might have been on async)
Rob Aboud
@RobAboud
Jul 09 2018 15:55
That's what I figured, must be something else going on so! Thanks!
Juan Blanco
@juanfranblanco
Jul 09 2018 15:58
send a snippet or something if you have an issue
that i could help
Rob Aboud
@RobAboud
Jul 09 2018 15:59
thanks man, I'll have to look into it a bit more first, not sitting in front of the code right now