These are chat archives for Nethereum/Nethereum

Aug 2018
Armaan B
Aug 21 2018 01:30
Where does the link.xml file go if I want Unity to not strip ddls? When building for webgl that is...
Nevermind i found it. It goes in the Assets folder simply
Schalk Dormehl
Aug 21 2018 08:18
Hey my Nethereum peeps
More questions for you all.
Is there any more "stateless" means of using Nethereum?

Something like

TResult SendTransaction<TResult>(PrivateKey PK, Address TargetAddress, BigInt Value, String ContractFunction, params[] FunctionParams)

I have to do some unnatural feeling things to the Web3 object to get it to work across our networks.

Aug 21 2018 09:45

Is there any more "stateless" means of using Nethereum?

@sjalq - You could sign the transactions as though signing it offline. I did something like this for transactions, but could be extended to contract calls as well:

Dim encodedString = Web3.OfflineTransactionSigner.SignTransaction(privKey.Trim, receiverAddress, transferTotal, txCount.Value, gasPrice, gas)

I could cook up an example in VB doing this, but I need to get to the airport in a few hours and I haven't packed yet! Heh.

@juanfranblanco Hey juan - Is there a way to use sendtransactionasync() to call a function and get a contract fucntions return value

@Cdpopham - As far as I know, nope. You'll need to use a CallAsync for a public variable, or for non-internal constants (View/Pure) functions with returns. Happy to stand corrected if there is something I might be missing.

Aug 21 2018 10:08

then when i do web3.Eth.GasPrice.SendRequestAsync(); I get 100000000000 back as the gas price. Is there another way to set the gas price through nethereum?

GasPrice.SendRequestAsync() calls web.eth.gasprice to get an estimate of the gas price though (median value from historical transactions). If I understood you correctly, you're looking to get to return the value 3000000000 back?

If you're using TransactionManager and send a transaction, you should already be using the DefaultGasPrice as you have specified already.

Maybe I misunderstood, let me know. :)

How do I construct everything to call startAuctionsAndBid - is there any example?

@chitin4 - Ah, I haven't played with Nethereum.ENS yet. Don't think there's a workbook too. I might be able to help but quite a bit later though, need to leave my computer screen to continue packing. :laughing:

Just off the top of my head, sending ethers you should be able to specify a "value" together with your transaction (one of the overrides for SendTransactionAsync), I think setting the bids (startAuctionsAndBid) should be payable to receive ethers. The bids themselves are submitted in a form of a hash (that is why we are required to reminder our bids details for the reveal). I need to personally have a look.

Aug 21 2018 10:19
@juanfranblanco is away for the next couple of days so we are stuck with one another (and also not forgetting Dave!) in the meantime. :))
Abdullah Rangoonwala (Absence)
Aug 21 2018 15:55
Keep getting this error
RpcResponseException: gas required exceeds allowance or always failing transaction
When doing this
                      var transactionMessage = new TransferFunction() {
                        FromAddress = account.Address,
                        To = toAddress,
                        AmountToSend = (BigInteger)amount
                    var transferHandler = w3.Eth.GetContractTransactionHandler<TransferFunction>();
                    var transactionHashTask = transferHandler.SendRequestAsync(transactionMessage, ContractAddress);
Tomas Tichy
Aug 21 2018 16:18
@AbsenceAbdullah_twitter - in my case these usually turn out to be require statements that fail
Sergio Piedrahita
Aug 21 2018 16:57
@EnigmaticUnreal_twitter so if I set the default values at the beginning then there is no need to pass the gas price on the send request call, it would be like the following then? :
var gasEstimate = await contractFunction.EstimateGasAsync(senderAddress, null, null, functionInput);
contractFunction.SendTransactionAndWaitForReceiptAsync(senderAddress, gasEstimate, null, null, null,functionInput);
Aug 21 2018 17:44
@spied001 - Yeap! You are exactly right.
Abdullah Rangoonwala (Absence)
Aug 21 2018 17:56
@ttichy sorry, I dont understand?
how would i send tokens then?
Abdullah Rangoonwala (Absence)
Aug 21 2018 19:14
solved that
but now
        ```        ulong GasPrice = (ulong)Nethereum.Signer.Transaction.DEFAULT_GAS_PRICE;
                var gas = new HexBigInteger(BigInteger.Parse("21000"));```
I have enough to cover this transaction
but it says insufficent balance for gas * price + value
Abdullah Rangoonwala (Absence)
Aug 21 2018 19:19
gasprice is 20,000,000,000
gas is 21000
thats 0.00042 in ETH
and i have 0.19 ETH