These are chat archives for Nethereum/Nethereum

24th
Sep 2018
junbest
@junbest
Sep 24 2018 07:56
Is this library works in Windows 7 service pack 1, cause I tried its get error, only windows 10 works fine
JEN
@chukwuemekanweke
Sep 24 2018 09:23
@juanfranblanco Goodday. Awesome work you're doing here. So In an app we built using NEthereum. We usually log the transaction hash of every transaction and then get the transaction receipts for them later on. But for some reason we have two different transactions with the same transaction hash within a time interval of 30 seconds.
But on Etherscan there's just one transaction with that hash
JEN
@chukwuemekanweke
Sep 24 2018 09:31
var estimatedGasLimit = decimal.Parse(transactionEstimateForSendingEthers.EstimatedGasLimit.ToString());
string transactionhash = await ethereumTransactionService.SendEthers(transactionDetailsForSendingEtherstoSwitchWallet, estimatedGasLimit, transactionEstimateForSendingEthers.AverageGwei);
if (string.IsNullOrWhiteSpace(transactionhash))
{
    throw new Exception("Unable To Purchase xxxCoin, Please Retry");
}
else
{
    decimal baronCoinAmountToSendToUser = await GetBaronCoinEquivalentOfCurrency(model.amount, model.currency);
    CryptoAccountFundingModel cryptoAccountFundingModel = new CryptoAccountFundingModel
    {
        DateCreated = DateTime.UtcNow,
        DateUpdated = DateTime.UtcNow,
        MerchantClientId = merchantClient.Id,
        ReceiveAmount = xxxCoinAmountToSendToUser,
        SendAmount = model.amount,
        SendTransactionHash = transactionhash,
        ReceiveTransactionHash = transactionhash
}
}
Juan Blanco
@juanfranblanco
Sep 24 2018 11:52
@chukwuemekanweke the transaction has is created using the transaction itself, so they are unique (they all have a unique nonce, account, plus other data)
so you should not get more than one transaction with the same transactionhash
So you may be creating a transaction for the same account using the same nonce? which that will fail to be included on the chain
@junbest what version of the .net framework you are using?
what error you get?
@dimonkov thanks that is outdated
junbest
@junbest
Sep 24 2018 11:55
Hi, I use 4.6.1 framework and I install my wallet in windows 7 SP1 thrown error mscorlib etc. then it close the wallet
Juan Blanco
@juanfranblanco
Sep 24 2018 11:57
which wallet?
your development wallet?
junbest
@junbest
Sep 24 2018 11:57
personal wallet made this nethereum c#
Yes
Juan Blanco
@juanfranblanco
Sep 24 2018 11:57
ah cool :) what are you targeting?
as in what ui framework you are using
junbest
@junbest
Sep 24 2018 11:58
Windows 7-10, 4.6.1 .net framework
it works fine in windows 10
Juan Blanco
@juanfranblanco
Sep 24 2018 11:58
is it a console application?
junbest
@junbest
Sep 24 2018 11:58
Windows Form
Juan Blanco
@juanfranblanco
Sep 24 2018 11:59
Ah ok, you should not have any issues..
what version of Nethereum are you using?
Nethereum.Web3? i assume … not portable
Did you use the WindowsForms wallet as the basis?
junbest
@junbest
Sep 24 2018 12:00
version 3.0.0.0, it is portable
yes I download windows form as basis
so this one :)
junbest
@junbest
Sep 24 2018 12:01
Yes
JEN
@chukwuemekanweke
Sep 24 2018 12:02
@juanfranblanco . That's the content of my TransactionInput object. I just pass that into the SendTransactionAsync() method provided by NEthereum
TransactionInput input = new TransactionInput();
input.Gas = new HexBigInteger( new BigInteger(estimatedGasLimit));
input.From = details.Sender;
input.To = details.Receiver;
input.Value = new HexBigInteger(UnitConversion.Convert.ToWei(details.AmountExchanged));
input.GasPrice = new HexBigInteger(UnitConversion.Convert.ToWei(SelectedGwei, EthUnit.Gwei));
string transactionHash = await transactionManager.EthTransactionManager.SendTransactionAsync(input);
Juan Blanco
@juanfranblanco
Sep 24 2018 12:02
So have you tried to move from Nethereum.Portable to Nethereum.Web3?
junbest
@junbest
Sep 24 2018 12:02
No, how?
Juan Blanco
@juanfranblanco
Sep 24 2018 12:03
oh.. so if you haven't it means that you are still using Nethereum.Web3 and all the other dependencies
junbest
@junbest
Sep 24 2018 12:04
Yes
Juan Blanco
@juanfranblanco
Sep 24 2018 12:04
you should not have any issue (although I haven't tested with Windows 7 for a while.. i haven't got a vm / machine at hand)
JEN
@chukwuemekanweke
Sep 24 2018 12:04
Is there anyway i can generate the nonce to ensure it doesn't get repeated. cause the two transactions in my case had same values for both transaction input. the user carried out the transaction with the same amount twice
Juan Blanco
@juanfranblanco
Sep 24 2018 12:04
I am waiting to migrate the sample as I want to target netcore 3.0 and the new UI Desktop
junbest
@junbest
Sep 24 2018 12:05
Can you please confirm, Im really appreciate if it will work in windows 7, or else Ill switch javascript web3
Juan Blanco
@juanfranblanco
Sep 24 2018 12:05
it does work in windows 7 :)
but I cannot test it at the moment
junbest
@junbest
Sep 24 2018 12:05
Okay
Juan Blanco
@juanfranblanco
Sep 24 2018 12:06
if you want to use javascript web3 and feel better about it
junbest
@junbest
Sep 24 2018 12:06
Thank you for having time
Okay sort it out
Juan Blanco
@juanfranblanco
Sep 24 2018 12:06
And back to my point .. the new netcore 3.0 will be supporting windows forms
junbest
@junbest
Sep 24 2018 12:07
Yeah okay
Juan Blanco
@juanfranblanco
Sep 24 2018 12:07
so i will be migrating the sample for that.. also will create a new target for netcore 30
just some heads up.. on future..
junbest
@junbest
Sep 24 2018 12:07
Okay, thanks
Juan Blanco
@juanfranblanco
Sep 24 2018 12:08
if you want to target cross platform you can use the Avalonia sample
or Blazor
or Xamarin.Forms with WPF
plus the rest
junbest
@junbest
Sep 24 2018 12:08
Okay
or like you said Javascript
also Blazor is rather good with Electron, I am yet to release a sample :)
@chukwuemekanweke sorry back to you
If you use the main Account with Web3 there is InMemoryNonceService
Juan Blanco
@juanfranblanco
Sep 24 2018 12:14
@junbest have you installed the right version of the .net framework runtime?
in your windows7 machine?
junbest
@junbest
Sep 24 2018 12:15
Yes, it is 4.6.1 that is why I update to windows SP1
Juan Blanco
@juanfranblanco
Sep 24 2018 12:15
ok some passing thought
Juan Blanco
@juanfranblanco
Sep 24 2018 12:57
image.png
image.png
@junbest yes it works
1st shot sending some ether, obviously balance, etc
2nd shot confirmation of ether sent from the transaction receipt
@chukwuemekanweke that is created by default and the nonce is managed for you
(continuing …)
@junbest you may have done some changes that are incompatible? this is a fresh Azure Windows 7 VM
Juan Blanco
@juanfranblanco
Sep 24 2018 13:07
@proBeejay141 creating the transaction defers from sending it, are you using the correct nonce? It might think it is trying to be replaced..
proBeejay141
@proBeejay141
Sep 24 2018 22:36
Got it to work somehow.... But I want to implement the same thing for my
Token
I want to check for new transaction on a wallet address and use it to give user virtual balance...
Has anybody here use etherscan internal transfer api?