These are chat archives for Nethereum/Nethereum

26th
Feb 2018
orelkabets
@orelkabets
Feb 26 2018 07:02
@juanfranblanco , in my Ethereum full node , i've bunch of accounts , i want to get Events for new transactions and blocks arrived only for those accounts , i tried with : await web3.Eth.Filters.GetFilterChangesForBlockOrTransaction.SendRequestAsync(<Only My Full Node Events(My accounts)>) but can't figure out how to create the proper filter , any help please :-)
Juan Blanco
@juanfranblanco
Feb 26 2018 08:54
if you use Parity
@orelkabets
you have accounts trace filter
orelkabets
@orelkabets
Feb 26 2018 08:56
i'm using geth , it is possible there ?
orelkabets
@orelkabets
Feb 26 2018 09:28
i'm trying to create analog for web3.eth.filter('pending'/'latest' ) any suggestions ? (using Geth)
Juan Blanco
@juanfranblanco
Feb 26 2018 11:59
that filter suggested will be a block filter, using the blockParameter Pending / Latest
orelkabets
@orelkabets
Feb 26 2018 12:12
sorry for bugging you, can you give me an example ? (for creating and using this filter ) . many thanks
Jonathan Smirnoff
@jonathansmirnoff
Feb 26 2018 19:52

@juanfranblanco I'm trying to follow this example:
```var privateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
var senderAddress = "0x12890d2cce102216644c59daE5baed380d84830c";

var web3 = new Web3();
var transactionInterceptor = new TransactionRequestToOfflineSignedTransactionInterceptor(senderAddress, privateKey, web3);
web3.Client.OverridingRequestInterceptor = transactionInterceptor; ```

the problem is that I don't find the function TransactionRequestToOfflineSignedTransactionInterceptor. Where is it? thanks!

Spas Vutov
@Vutov
Feb 26 2018 19:53
Hi, I'm trying to connect to https://ropsten.infura.io/, tried with this - https://nethereum.readthedocs.io/en/latest/Nethereum.Workbooks/docs/nethereum-gettingstarted-infura/#retrieve-the-balance-of-an-account-on-main-net-using-infura , got 405 Method Not Allowed, tried with new Web3("https://ropsten.infura.io/{myKey}"); again 405 Method Not Allowed. Any ideas what might be the problem?
Spas Vutov
@Vutov
Feb 26 2018 20:25
nevermind found the problem - "We do not support the personal API methods because we do not hold private keys. You will need to sign your own transactions."
Jonathan Smirnoff
@jonathansmirnoff
Feb 26 2018 20:27
Basically I want to deploy a contract using the "OfflineTransactionSigner" and then "SendRawTransaction"
Spas Vutov
@Vutov
Feb 26 2018 20:36
@jonathansmirnoff may be something like this - https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Web3.Tests/Signing/TransactionSigningTests.cs ? As it seems I'm trying to do the same thing as you
Jonathan Smirnoff
@jonathansmirnoff
Feb 26 2018 20:41
thanks @Vutov I did that and it worked for me. Now I wanted to something very similar (I think) but I wanted to deploy a contract. First I want to generate the offline transaction (with the contract in it) and then send it.
Spas Vutov
@Vutov
Feb 26 2018 20:44
@jonathansmirnoff I just managed to deploy a contract with - new Web3(new Account(privateKey),node); and then var transactionHash = await this._web3.Eth.DeployContract.SendRequestAsync(contract.GetAbi(), contract.ByteCode, senderAddress, _defaultGas, prms);
Not sure how relevant it is to what you want to achieve. I haven't looked how IAccount is been used but I would assume it is doing offline signing under the hood
Jonathan Smirnoff
@jonathansmirnoff
Feb 26 2018 20:49
thanks! I was thinking about that. I'll try it.
BradenPorter
@BradenPorter
Feb 26 2018 21:07
Found a way to work on contracts without VSCode or Remix, but using VS2017
Download that extension and then open the .vsix archive with winrar or whatever archiver
edit extension.vsixmanifest with notepad and change the wrongly added brackets to square brackets. As below:
<InstallationTarget Version="[14.0,15.0]" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[14.0,15.0]" Id="Microsoft.VisualStudio.Community" />
<InstallationTarget Version="[14.0,15.0]" Id="Microsoft.VisualStudio.Enterprise" />
---------------------------------------------------^^^
Jonathan Smirnoff
@jonathansmirnoff
Feb 26 2018 21:11
@juanfranblanco when I do this: var web3 = new Web3(new Account(privateKey), "https://mainnet.infura.io");. am I using eth_personal?