These are chat archives for Nethereum/Nethereum

22nd
Apr 2017
mfamfa
@mfamfa
Apr 22 2017 08:18
@juanfranblanco @DavidBurela Thanks!
Rajasekar Sa
@imraja
Apr 22 2017 15:36
Hello
Juan Blanco
@juanfranblanco
Apr 22 2017 15:37
hi
Rajasekar Sa
@imraja
Apr 22 2017 16:45
I just configured azure BaaS. Now I want to use nethereum to connect the azure RPC and transfer ether but unable to find any tutorials on that. Can you help me?
Juan Blanco
@juanfranblanco
Apr 22 2017 16:46
Raj what BaaS are you using?
you will need to open your rpc port
in azure
8545 is normally the default for geth
Rajasekar Sa
@imraja
Apr 22 2017 16:47
Juan Blanco
@juanfranblanco
Apr 22 2017 16:47
ah cool
Rajasekar Sa
@imraja
Apr 22 2017 16:47
i used MetaMask and i am able to transact
But want to do the same in my dot net cod.
Juan Blanco
@juanfranblanco
Apr 22 2017 16:48
ok so you can connect
Rajasekar Sa
@imraja
Apr 22 2017 16:48
ya
Juan Blanco
@juanfranblanco
Apr 22 2017 16:48
ah cool just check any of the video tutorials or docs
what version of Nethereum are you using?
rc3 or 1.06
Rajasekar Sa
@imraja
Apr 22 2017 16:49
1.0.6
Juan Blanco
@juanfranblanco
Apr 22 2017 16:49
ok
just use then
Rajasekar Sa
@imraja
Apr 22 2017 16:50
Can u share any tutorials link?
Rajasekar Sa
@imraja
Apr 22 2017 16:52
I just came across the above link
Juan Blanco
@juanfranblanco
Apr 22 2017 16:52
yeah
that is mainly for interacting with contracts
Rajasekar Sa
@imraja
Apr 22 2017 16:52
I could see " var web3 = new Web3.Web3();"
Juan Blanco
@juanfranblanco
Apr 22 2017 16:53
if you just want to do a ether transfer
use
two ticks
Rajasekar Sa
@imraja
Apr 22 2017 16:53
Sorry I am not getting you
Juan Blanco
@juanfranblanco
Apr 22 2017 16:54
web3.Eth.Transactions.SendTransaction.SentRequestAsync()
but.. if you are using the latest you could do something like this
Rajasekar Sa
@imraja
Apr 22 2017 16:55
    var transactionHash = await web3.Eth.DeployContract.SendRequestAsync(abi, byteCode, senderAddress, new HexBigInteger(900000), multiplier);
yeah the above deploys a contract
your line of code
(a smart contract)
Rajasekar Sa
@imraja
Apr 22 2017 16:57
ya
I will try the above code
Juan Blanco
@juanfranblanco
Apr 22 2017 16:57
there are 3 types of transactions
1 send Ether
2 deploy a contract
3 execute something in a contract (which can also have some Ether sent to it)
Rajasekar Sa
@imraja
Apr 22 2017 16:58
oh ok
Juan Blanco
@juanfranblanco
Apr 22 2017 16:58
a contract is a program (you creates or a third party) on the chain
Rajasekar Sa
@imraja
Apr 22 2017 17:08
transfers.Add(() =>
web3.Eth.TransactionManager.SendTransactionAsync(new TransactionInput()
{
From = from,
To = to,
Value = new HexBigInteger(amount),
}));
I am getting error in 2nd line.
Juan Blanco
@juanfranblanco
Apr 22 2017 17:10
what error?
Rajasekar Sa
@imraja
Apr 22 2017 17:11
'Eth' does not contain a definition....
I think syntax might changed
Juan Blanco
@juanfranblanco
Apr 22 2017 17:11
ah yeah
if using rc3
Rajasekar Sa
@imraja
Apr 22 2017 17:12
oh
Juan Blanco
@juanfranblanco
Apr 22 2017 17:12
things have changed a little
Rajasekar Sa
@imraja
Apr 22 2017 17:12
Shall i use the same?
Juan Blanco
@juanfranblanco
Apr 22 2017 17:12
not dramatically
yeah
just namespacing
let me check
Rajasekar Sa
@imraja
Apr 22 2017 17:13
ok thanks
Juan Blanco
@juanfranblanco
Apr 22 2017 17:18
just pushed the update
nothing has changed really
Rajasekar Sa
@imraja
Apr 22 2017 17:20
Can i use the code for the version 1.0.6?
Juan Blanco
@juanfranblanco
Apr 22 2017 17:20
no
well most of it yest
just the multiple transactions, etc
wont be there
Rajasekar Sa
@imraja
Apr 22 2017 17:22
what i can do now?
Juan Blanco
@juanfranblanco
Apr 22 2017 17:22
i would use rc3
as it is nearly out 2
only thing I am awaiting is to add documentation
and i might add some small extras
but no breaking changes from now
Rajasekar Sa
@imraja
Apr 22 2017 17:24
ok
Juan Blanco
@juanfranblanco
Apr 22 2017 17:25
2.0.0 is mainly structural changes
so you can still use 1.0.6
but it will be a pain later on to change the namespaces etc
Rajasekar Sa
@imraja
Apr 22 2017 17:26
I have changed to rc3 :smile:
Juan Blanco
@juanfranblanco
Apr 22 2017 17:27
let me know how it goes :)
Rajasekar Sa
@imraja
Apr 22 2017 17:29
        await web3.Miner.Start.SendRequestAsync(6);
Miner is not exist in web3...?
Juan Blanco
@juanfranblanco
Apr 22 2017 17:29
oh
Rajasekar Sa
@imraja
Apr 22 2017 17:29
:worried:
Juan Blanco
@juanfranblanco
Apr 22 2017 17:30
what BaaS have you deployed?
is it Geth?
Rajasekar Sa
@imraja
Apr 22 2017 17:30
As per your tutorial :smile:
single click deployment to azure
Geth
Juan Blanco
@juanfranblanco
Apr 22 2017 17:30
ah cool
there is also the blockapps
and the quorum
Rajasekar Sa
@imraja
Apr 22 2017 17:31
I knew but not using that
Juan Blanco
@juanfranblanco
Apr 22 2017 17:31
ok in Geth you need to enable miner
actually you need to enable personal to unlock the account
(easier to start)
Rajasekar Sa
@imraja
Apr 22 2017 17:32
sorry i was getting compiler error
'Web3' does not contain a definition for 'Miner'
Juan Blanco
@juanfranblanco
Apr 22 2017 17:33
ah
yeah 2.0.0 does not have Geth included
it is a different library
that breaks the tutorials
Rajasekar Sa
@imraja
Apr 22 2017 17:34
hmm
Juan Blanco
@juanfranblanco
Apr 22 2017 17:34
so to mine you need to add a reference to Nethereum.Geth
every client follows a standard
geth, parity, etc
then each one implements their own extensions
miner is an extension of Nethereum.Geth
sorry Geth.. hence it has been moved to Nethereum.Geth
Rajasekar Sa
@imraja
Apr 22 2017 17:35
ok i am installing it
mainly Web3Geth inherits from Web3 to simplify the transition
just change the name
Rajasekar Sa
@imraja
Apr 22 2017 17:38
ok i need to connect with azure RPC
Juan Blanco
@juanfranblanco
Apr 22 2017 17:38
same as before.. just put the url
and if your ports are open
then it should be fine
also.. just make sure you have the apis open
for miner, personal
Rajasekar Sa
@imraja
Apr 22 2017 17:43
he type 'TransactionReceipt' exists in both 'Nethereum.Portable, Version=1.0.6310.18843, Culture=neutral, PublicKeyToken=null' and 'Nethereum.RPC, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
Juan Blanco
@juanfranblanco
Apr 22 2017 17:43
oh
Rajasekar Sa
@imraja
Apr 22 2017 17:44
Do i need to uninstall Nethereum.Portable?
Juan Blanco
@juanfranblanco
Apr 22 2017 17:44
yeah
or just upgrade Nethereum.Portable to rc
and remove the others
Portable has everything ansd is portable :) the other libraries are separate
and are netstandard 1.1 and net451
so as things moved on portable will become redundant
or just a simple way to include everything
Rajasekar Sa
@imraja
Apr 22 2017 17:47
ok :smile:
I am a doubt
Juan Blanco
@juanfranblanco
Apr 22 2017 17:48
just pick what it works for you
same code base
Rajasekar Sa
@imraja
Apr 22 2017 17:49
        await web3.Personal.UnlockAccount.SendRequestAsync(address, defaultPassword, 60000);
taking too much time
still the line is executing...
Juan Blanco
@juanfranblanco
Apr 22 2017 17:50
hmmm i guess is a connectivity error
can you navigate to your rpc address in a browser?
Rajasekar Sa
@imraja
Apr 22 2017 17:51
{"jsonrpc":"2.0","error":{"code":-32600,"message":"EOF"}}
Juan Blanco
@juanfranblanco
Apr 22 2017 17:51
ah ok
Rajasekar Sa
@imraja
Apr 22 2017 17:51
I am getting this message
Juan Blanco
@juanfranblanco
Apr 22 2017 17:51
then you are ok
you can "see" it
check the params you have started geth
and see if personal is enabled
on the rpcapi
Rajasekar Sa
@imraja
Apr 22 2017 17:52
u mean in azure portal?
Juan Blanco
@juanfranblanco
Apr 22 2017 17:53
yeah
Rajasekar Sa
@imraja
Apr 22 2017 17:54
Can u tell me how?
use those start params
fror the rpcapi
to enable what you want
you will need rpc, miner and personal for this sample
Rajasekar Sa
@imraja
Apr 22 2017 18:05
Hi
whether I need to install geth in local?
because i was searching for the above option in azure but couldnt
Juan Blanco
@juanfranblanco
Apr 22 2017 18:06
i don't know which template you are using
but you will need to ssh to your machine if is running
and restart geth
with the different params
another option is, to run it locally yes
or use testrpc
just use the testchain i posted above
and run the batch file to get started
once you are familiar you can use testrpc which is "fast" for development
and combine it with an azure service for integration
Rajasekar Sa
@imraja
Apr 22 2017 18:11
I thought we can directly connect azure BaaS from our custom web application
Juan Blanco
@juanfranblanco
Apr 22 2017 18:11
oh yeah
you can :)
Rajasekar Sa
@imraja
Apr 22 2017 18:12
But you are telling we need to change params in SSH
Juan Blanco
@juanfranblanco
Apr 22 2017 18:12
well it is the same
as in local
Rajasekar Sa
@imraja
Apr 22 2017 18:12
Can u tell me how we can do that in azure without help of SSH local ?
Juan Blanco
@juanfranblanco
Apr 22 2017 18:13
well you will need to connect to your server
don't you?
hence ssh
let me know which baas template you are using
and I can help you
I used the direct deployment from the above link
Juan Blanco
@juanfranblanco
Apr 22 2017 18:22
ah cool
check at the bottom
and you will see the vm connection
got to go.. speak to you later
Rajasekar Sa
@imraja
Apr 22 2017 18:23
ok thank you very much for the help.
I really appreciate you extensive help :+1:
Juan Blanco
@juanfranblanco
Apr 22 2017 19:16
My pleasure :)