These are chat archives for Nethereum/Nethereum

30th
Nov 2017
Devedse
@devedse
Nov 30 2017 00:11
One more quick question, I'm creating quite a few transactions. However when I restart my client it seems that if there are for example 10 transactions still in the transaction pool I get the following exception 10 times: replacement transaction underpriced
The 11th transaction works fine again
But it looks like that if there's still old transactions in the transaction pool that still have to be mined which have been created before I restarted the application this happens
(My current hypothesis)
Any ideas :)?
nikhilsingh8
@nikhilsingh8
Nov 30 2017 07:54
Hi ,This side Nikhil Singh .I want implement Ethereum using Asp.Net C# .Any one given some refrences
Juan Blanco
@juanfranblanco
Nov 30 2017 09:38
@devedse this is due to nonces
if you use the same instance of web3 it will track your nonces
i will end up changing it to use the pending transactions (or by configuration)
@nikhilsingh8 check the faucet sample
Juan Blanco
@juanfranblanco
Nov 30 2017 09:56
@b-pillai to connect to rinkeby you can do the following : var web3 = new Web3(account, "https://rinkeby.infura.io");
Devedse
@devedse
Nov 30 2017 10:33
@juanfranblanco , ok :), let me know if you have fixed that :)
And also, does anyone know hot to obtain pending transactions?
Roy Pun
@roypun
Nov 30 2017 10:38
Hey Juan,
Just want to check will you fix Nethereum/Nethereum#153 ?
Will be great to trace transaction with this module
Juan Blanco
@juanfranblanco
Nov 30 2017 12:30
@devedse it is not a fix as such :) you mainly now need to have only one instance of web3
or maintain a nonce counter yourself
you could interlocked.Add
in a multithreading environment
@roypun i will be adding that functionality as soon as I am done changing the rpc backend
on that note if anyone is interested on some metrics ^
abhishek
@triston_abhi_twitter
Nov 30 2017 12:54
@juanfranblanco
When I am sending 10 transaction request to my contract function in 2 seconds from https://ropsten.infura.io
As all transactions send as async I got all transactions transaction Id.
But when I check in https://ropsten.etherscan.io/
among 10 , 3 to 4's transaction not displayed in above link
Juan Blanco
@juanfranblanco
Nov 30 2017 13:00
they won't be mined yet
they might be in pending transactions?
or they may have had an error?
abhishek
@triston_abhi_twitter
Nov 30 2017 13:02
I already checked after 1 day also but same issue
No pending transaction
I can't find transaction with transactionId that I got from response
Juan Blanco
@juanfranblanco
Nov 30 2017 13:06
have you checked not in etherscan
but on chain?
but getting the txnid?
have you confirmed it was mined?
ie did you get a receipt?
it may not have been included for any reason (rejected)
how did you submit the transactions?
abhishek
@triston_abhi_twitter
Nov 30 2017 13:12
var account = new Account(txPrivateKey.Text.Trim());
var web3 = new Web3Geth(account, "https://ropsten.infura.io");
Contract con = web3.Eth.GetContract(txAbi.Text.Trim(), txContractAddress.Text.Trim());
HexBigInteger estimategas = await con.GetFunction("function").EstimateGasAsync("infomration");
web3.TransactionManager.DefaultGas = 50000;
web3.TransactionManager.DefaultGasPrice = Nethereum.Signer.Transaction.DEFAULT_GAS_PRICE;
txTransactionId.Text = await con.GetFunction("function").SendTransactionAsync(account.Address, "infomration");
This is the code to submit the transaction
Juan Blanco
@juanfranblanco
Nov 30 2017 13:14
you don't need to estimate the gas if you don't use it
do you check for a receipt?
abhishek
@triston_abhi_twitter
Nov 30 2017 13:14
Not checking for receipt
Juan Blanco
@juanfranblanco
Nov 30 2017 13:15
well until is "mined" is not part of the blockchain
so a receipt is important
abhishek
@triston_abhi_twitter
Nov 30 2017 13:16
Ok How I can get receipt any code for that?
Juan Blanco
@juanfranblanco
Nov 30 2017 13:16
you may have got an error, and that is why is not included
abhishek
@triston_abhi_twitter
Nov 30 2017 13:16
But I got trasanction Id
Juan Blanco
@juanfranblanco
Nov 30 2017 13:17
the txnid is the unique id of the transaction
this may or not may be included in the chain
abhishek
@triston_abhi_twitter
Nov 30 2017 13:17
Yes so let's say I got transaction Id then this should be mined?
ok
So for that I need to check for receipt?
Juan Blanco
@juanfranblanco
Nov 30 2017 13:17
yes when you have the receipt
it has been included on the chain
now..
your transaction may have some error on the smart contract
so it does not mean it is going to be the call successful on the smart contract
same as deploying a contract
abhishek
@triston_abhi_twitter
Nov 30 2017 13:19
Can you give me any link how I can get receipt?
Juan Blanco
@juanfranblanco
Nov 30 2017 13:19
it is in all the docs
abhishek
@triston_abhi_twitter
Nov 30 2017 13:19
Ok I think I can get it from deploy contract
Juan Blanco
@juanfranblanco
Nov 30 2017 13:19
same
call
abhishek
@triston_abhi_twitter
Nov 30 2017 13:19
Yes got it.
So I think this will not matter in 1 sec how many transaction I am sending
abhishek
@triston_abhi_twitter
Nov 30 2017 13:21
Wether that may be 10 or more then 10 but If I got receipt then I can say that transaction will be in block chain
Juan Blanco
@juanfranblanco
Nov 30 2017 13:21
yes
well some might get queued
and included on another block
there are block limits
abhishek
@triston_abhi_twitter
Nov 30 2017 13:27
Yes
I am creating and deploying contract from mist wallet.
But let's say I want to do it with code then how Can i get
abi and bytecode?
As I have only solidity functions
Juan Blanco
@juanfranblanco
Nov 30 2017 19:06
@triston_abhi_twitter use remix, vscode, truffle to compile it