These are chat archives for Nethereum/Nethereum

Jan 2018
Tomas Tichy
Jan 14 2018 04:31

Hi @juanfranblanco, I am trying to get historical events via Infura. Looking at previous messages here, looks like GetLogs is the way to go. I used the example from AccountTests.cs, line 16 just to test that out
var result = await web3.Eth.Filters.GetLogs.SendRequestAsync(new RPC.Eth.DTOs.NewFilterInput() { Address = new[] { "0x5c6226801Eef33db1fB807081f183eA75210f62B" } });

after executing that, I get a count of zero.
What am I doing wrong? thanks :)

Jan 14 2018 05:39
@juanfranblanco payable is for detect ETH or Token ?
Jan 14 2018 14:25
@juanfranblanco , running into an issue when deploying my contract using Nethereum
System.ArgumentException : Unknown type: tuple
Stack Trace:
   at Nethereum.ABI.ABIType.CreateABIType(String typeName)
   at Nethereum.ABI.ArrayType.InitialiseElementType(String name)
   at Nethereum.ABI.ArrayType..ctor(String name)
   at Nethereum.ABI.DynamicArrayType..ctor(String name)
   at Nethereum.ABI.ArrayType.CreateABIType(String typeName)
   at Nethereum.ABI.ABIType.CreateABIType(String typeName)
   at Nethereum.ABI.Model.Parameter..ctor(String type, String name, Int32 order, String serpentSignature)
   at Nethereum.ABI.JsonDeserialisation.ABIDeserialiser.BuildFunctionParameters(List`1 inputs)
   at Nethereum.ABI.JsonDeserialisation.ABIDeserialiser.BuildFunction(IDictionary`2 function)
   at Nethereum.ABI.JsonDeserialisation.ABIDeserialiser.DeserialiseContract(String abi)
   at Nethereum.Contracts.DeployContractTransactionBuilder.BuildEncodedData(String abi, String contractByteCode, Object[] values)
   at Nethereum.Contracts.DeployContractTransactionBuilder.BuildTransaction(String abi, String contractByteCode, String from, Object[] values)
   at Nethereum.Contracts.DeployContract.EstimateGasAsync(String abi, String contractByteCode, String from, Object[] values)
This started to happen after I added this function:
function tokensOfOwner(address _owner) external view returns(token[] ownerTokens) {
Jan 14 2018 14:32
I created an issue: Nethereum/Nethereum#233
Jan 14 2018 18:21
i tried using the method SendTransactionAndWaitForReceiptAsync, it worked but it didnt send the amount 1000 i had set but instead 0.000000000000001. Is there a type the amount has to be set in before using it in that function?
or maybe the function itself has changed since writing of the workbook
Jan 14 2018 19:06
also when i check contract balance for the addresss i get result of 1000 while in etherscan its cleary 0.000000000000001
Jan 14 2018 21:08
i think the problem is that i use 18 decimal places in my contract?
is there a way to make nethereum web3 aware of that?
also balanceFunction.CallAsync<int>(newAddress) also fails now because the number returned back by contract is too big ):
Maximilian Weber MWC
Jan 14 2018 22:11
@soend you received the value in WEI, but etherscan shows it in ETH - there is a built-in converter that can convert any value into ETH/WEI - this is an online alternative where you can check the different ethereum units and compare them