These are chat archives for Nethereum/Nethereum

28th
Nov 2017
Juan Blanco
@juanfranblanco
Nov 28 2017 09:28
@tatigo yes of course
@blgsyrmhnds for Ether you need Nethereum for Bitcoin NBitcoin
@baburajan EstimateGas is a function from Geth / Parity
Art1987
@Art1987
Nov 28 2017 12:23
Hi guys, I am trying to call _web3.Eth.Sign.SendRequestAsync(address, "hello world" ), but I got 405 not allowed
could you please help me out?
Juan Blanco
@juanfranblanco
Nov 28 2017 12:36
if you are connecting to infura
you wont be able to do that
or if your account is locked
Art1987
@Art1987
Nov 28 2017 12:37
account is not locked
Juan Blanco
@juanfranblanco
Nov 28 2017 12:37
you could do it with Nethereum
Art1987
@Art1987
Nov 28 2017 12:37
I am connecting to ropsten.infuro.io
Juan Blanco
@juanfranblanco
Nov 28 2017 12:37
use on of the signer libraries
well that is the reason why
Art1987
@Art1987
Nov 28 2017 12:38
I am trying to create sign for multisig
Juan Blanco
@juanfranblanco
Nov 28 2017 12:38
infura does not have your private key to sign any transaction
Art1987
@Art1987
Nov 28 2017 12:38
is there any other test environment?
Juan Blanco
@juanfranblanco
Nov 28 2017 12:38
or your wallet file
you can create your own testnet if you want to use geth for signing
or you can do it with Nethereum
I think this may help you
Art1987
@Art1987
Nov 28 2017 12:39
could you please give me an code example or documentation?
Art1987
@Art1987
Nov 28 2017 12:40
thank you a lot
first you need to understand what is an account
then you can check the signing unit tests
Art1987
@Art1987
Nov 28 2017 12:41
I want to translate following code

var msg = web3.sha3('Schoolbus')
var signature = web3.eth.sign(web3.eth.accounts[0], msg)

var r = signature.slice(0, 66)
var s = '0x' + signature.slice(66, 130)
var v = '0x' + signature.slice(130, 132)
v = web3.toDecimal(v)

so I could pass my smart contract to sign multisig contract wallet
Juan Blanco
@juanfranblanco
Nov 28 2017 12:42
sure look at the signing tests
plenty stuff there
Art1987
@Art1987
Nov 28 2017 12:43
thanks for info
Juan Blanco
@juanfranblanco
Nov 28 2017 12:43
note that web3 in that scenario is connecting to your local geth
hence it can sign
using the unlocked account
Art1987
@Art1987
Nov 28 2017 12:44
did i understand correctly that Signing will not work using ropsten?
Juan Blanco
@juanfranblanco
Nov 28 2017 12:45
please read the accounts docs
Art1987
@Art1987
Nov 28 2017 12:45
sure, thanks
Juan Blanco
@juanfranblanco
Nov 28 2017 12:46
you need to understand that to sign something
you need your private key
infura does not have your private key
if they did they will have then all your ether
this may work if using web3 + metamask
as metamask intercepts the calls and does the signing for you
Art1987
@Art1987
Nov 28 2017 12:47
I should unlock my account before signing
Juan Blanco
@juanfranblanco
Nov 28 2017 12:47
using your private key stored in metamask
yes
if you call eth_sign yes
Art1987
@Art1987
Nov 28 2017 12:47
using private key or keystore and password
I see
Juan Blanco
@juanfranblanco
Nov 28 2017 12:48
think of the process
you call eth_sign -> geth retrives your private key -> signs it
Art1987
@Art1987
Nov 28 2017 12:49
got it, thanks
Juan Blanco
@juanfranblanco
Nov 28 2017 12:49
for geth to retrieve your private key
you need to unlock it with your password
first
which mainly decrypts your keystore file
and infura does not have that keystore file
and if it did, it would not be very wise to give it the password
hopefully it makes sense now :)
Art1987
@Art1987
Nov 28 2017 12:51
yes, make sense, thanks, I forgot that I should unlock account before doing in request
:D
Juan Blanco
@juanfranblanco
Nov 28 2017 12:51
but also
pointing to infura won't work
Art1987
@Art1987
Nov 28 2017 12:52
that's bad
Juan Blanco
@juanfranblanco
Nov 28 2017 12:53
no is not
:) you dont' want infura to have your private key do you?
Art1987
@Art1987
Nov 28 2017 12:53
no
Juan Blanco
@juanfranblanco
Nov 28 2017 12:53
then it is great that you can do this :)
sign locally submit to a public node
you own your identity
Art1987
@Art1987
Nov 28 2017 12:55
so, I can sign locally and submit to infuro, am I right?
Juan Blanco
@juanfranblanco
Nov 28 2017 12:55
yes
Art1987
@Art1987
Nov 28 2017 12:56
now I fully understood :) sorry if I confuse you
Juan Blanco
@juanfranblanco
Nov 28 2017 12:56
oh it is ok, i was just making sure you understood
Art1987
@Art1987
Nov 28 2017 12:57
I appreciate it
Babu Pillai
@b-pillai
Nov 28 2017 21:44
thanks Juan
Is there a sample project that deploys a contract and interacts with the contract to rinkeby.io test-net.