These are chat archives for Nethereum/Nethereum

26th
Aug 2017
Alexander Yarushin
@aayarushin
Aug 26 2017 07:32 UTC
it is definitely coming @kaista82_twitter
I sincerely hope that it would be much less of a revolution and more of sustainable change. Because revolution is leap that leaves current stakeholders on a curb and they do not like that. And unfortunately their lifespan is not anough to harvest the responsibility for their actions aiming to defend their stake.
Juan Blanco
@juanfranblanco
Aug 26 2017 08:48 UTC
I love the mix of ideas from yesterday. I think the mixing of AI for decision making makes lots of sense, combined with blockchain for both reputation and permanent storage. This disserves another forum, to build on that.
kai
@kaista82_twitter
Aug 26 2017 11:21 UTC
Lets set one up and maybe a trello to lay it out
Alexander Yarushin
@aayarushin
Aug 26 2017 12:29 UTC
Agree :)
Alexander Yarushin
@aayarushin
Aug 26 2017 13:47 UTC
I am getting a null pointer when deploying contract. Code generated by Solidity extension from json contract "meta data". Smart contract does not have any constructor.
@juanfranblanco
It works for the multiplier example, because it has constructor
System.NullReferenceException : Object reference not set to an instance of an object.
at Nethereum.Web3.DeployContract.BuildEncodedData(String abi, String contractByteCode, Object[] values)
at Nethereum.Web3.DeployContract.BuildTransaction(String abi, String contractByteCode, String from, HexBigInteger gas, HexBigInteger value, Object[] values)
at Nethereum.Web3.DeployContract.SendRequestAsync(String abi, String contractByteCode, String from, HexBigInteger gas, HexBigInteger value, Object[] values)
at WR.Service.CatFactoryService.DeployContractAsync(Web3 web3, String addressFrom, HexBigInteger gas, HexBigInteger valueAmount) in F:\Projects\Blockchain\WR\WR\Service\CatFactory.cs:line 18
Alexander Yarushin
@aayarushin
Aug 26 2017 14:01 UTC
It works if I add constructor to the smartcontract!...:) Is it implied that I have to use constructor in smart contracts even though I do not need it?
jaibhavani
@jaibhavani
Aug 26 2017 20:12 UTC
i am still getting '0x' as the code from web3.Eth.GetCode.SendRequestAsync(contractAddress); I have block number for the contract deployment transaction. I have provided 10000000 as gas
kai
@kaista82_twitter
Aug 26 2017 20:14 UTC
That much gas on the deploy? What contract are you deploying
Are you passing parameters to this contract?
jaibhavani
@jaibhavani
Aug 26 2017 20:14 UTC
multiply contract from the tutorial
kai
@kaista82_twitter
Aug 26 2017 20:15 UTC
Can i see the deply code?
jaibhavani
@jaibhavani
Aug 26 2017 20:15 UTC
var transactionHash = await web3.Eth.DeployContract.SendRequestAsync(
abi, bytecode, sendAddress, new HexBigInteger(10000000),multiplier);
kai
@kaista82_twitter
Aug 26 2017 20:16 UTC
What type is multiplier?
jaibhavani
@jaibhavani
Aug 26 2017 20:16 UTC
var multiplier = 7;
kai
@kaista82_twitter
Aug 26 2017 20:16 UTC
So implicit typed to int
jaibhavani
@jaibhavani
Aug 26 2017 20:17 UTC
yes
kai
@kaista82_twitter
Aug 26 2017 20:17 UTC
Sendaddress is your public address?
Right click the deplycontract call and goto definition, does it show the correct overload you were expecting?
jaibhavani
@jaibhavani
Aug 26 2017 20:21 UTC
yes
With the deployment transaction returned, i get to see the block number when i execute eth.getTransaction
on geth console
javascript console
kai
@kaista82_twitter
Aug 26 2017 20:23 UTC
Yeah, but getcode("transactionhash") returns 0x right
Oh no sorry
jaibhavani
@jaibhavani
Aug 26 2017 20:23 UTC
var code = await web3.Eth.GetCode.SendRequestAsync(contractAddress);
this returns 0X
kai
@kaista82_twitter
Aug 26 2017 20:24 UTC
Transactionreceipt.contractaddress
So when you get the receipt there is valid contractaddress within it?
Is that what you are using
jaibhavani
@jaibhavani
Aug 26 2017 20:24 UTC
yes
I am getting valid contract address.
kai
@kaista82_twitter
Aug 26 2017 20:25 UTC
Ok so it thinks it mined it, everything sounds correct so far hmm
That and the block number coming back
So the abi and byte code are exactly as the example? No copy paste issues
Sounds like you've got it all right very strange
jaibhavani
@jaibhavani
Aug 26 2017 20:27 UTC
Nope. I copied that from the Visual Studio code generated abi
Which is similar to what is there is the tutorial
kai
@kaista82_twitter
Aug 26 2017 20:28 UTC
Similar or exact?
I would copy from the read the docs io example just yo make sure if they are not exact
Just as a test to make sure
jaibhavani
@jaibhavani
Aug 26 2017 20:29 UTC
there is payable = false attribute
kai
@kaista82_twitter
Aug 26 2017 20:29 UTC
Can yoy copy from the example just as a test?
Then you will know for sure its not that
jaibhavani
@jaibhavani
Aug 26 2017 20:30 UTC
and the bytecode as well from the example correct?
kai
@kaista82_twitter
Aug 26 2017 20:30 UTC
Yes both
Exactly the same just to make sure
Then we can decide based on outcomr
jaibhavani
@jaibhavani
Aug 26 2017 20:31 UTC
ok. I will try it out and let u know the outcome
kai
@kaista82_twitter
Aug 26 2017 20:31 UTC
Ok cool
jaibhavani
@jaibhavani
Aug 26 2017 20:39 UTC
it worked. It was my abi. The abi with payable=false was the issue
kai
@kaista82_twitter
Aug 26 2017 22:10 UTC
Oh good, all sorted! Glad to hear it