These are chat archives for Nethereum/Nethereum

26th
Sep 2018
proBeejay141
@proBeejay141
Sep 26 2018 09:31
Token ? or Ether? Token
the etherscan api for internal transfer is not working.
Juan Blanco
@juanfranblanco
Sep 26 2018 09:54
are you asking about internal Eth transfers?
proBeejay141
@proBeejay141
Sep 26 2018 10:06
I want get a list of "ERC20 - Token Transfer Events" by Address
thats exactly what i need
Juan Blanco
@juanfranblanco
Sep 26 2018 13:03
use the workbook i send you as a example
I think that covers most of the scenarios
proBeejay141
@proBeejay141
Sep 26 2018 14:43
how do i read the balance of a token of an address using nethereum
var account = new Account(user.ctbWallet.privateKey , Chain.MainNet);
Console.WriteLine(account.Address);
web3 = new Web3(account,ConfigSettings.eth_rpc);
Logger.LogCritical(string.Format("address {0}",ConfigSettings.eth_token_addr));
var contract = web3.Eth.GetContract(abi, ConfigSettings.eth_token_addr);
var name = contract.Address;
Logger.LogCritical(string.Format("name {0}",contract.Address));
Logger.LogCritical(string.Format("name {0}",contract.ToString()));
var GetBalance = contract.GetFunction("balanceOf");
var balance = await GetBalance.CallAsync<BigInteger>(account.Address);
Logger.LogCritical(string.Format("balance {0}",balance));
i used that and the address it return is different from the contract address and the balance is also wrong.
Juan Blanco
@juanfranblanco
Sep 26 2018 14:52
that is correct
proBeejay141
@proBeejay141
Sep 26 2018 14:52
what could be the problem?
Juan Blanco
@juanfranblanco
Sep 26 2018 14:53
also note that the balance might need to be converted to a valid unit
proBeejay141
@proBeejay141
Sep 26 2018 14:53
contract.Address return address that is different from the contract address
check this as a sample
well if the contract address you are using is different yeah.. then the balance will be different
proBeejay141
@proBeejay141
Sep 26 2018 15:00
my balance of is not a function its a property on the contract, am i suppose to get it like a function?
proBeejay141
@proBeejay141
Sep 26 2018 15:09
thank you juan Blanco, i was passing the wrong parameters
i really appreciate your assistance every time, God bless you sir.
Juan Blanco
@juanfranblanco
Sep 26 2018 15:28
glad you are sorted :)
Schalk Dormehl
@sjalq
Sep 26 2018 16:23
Hey yall
Quick Question:
If I have a TransactionReceipt and I want to decode the Data in the Logs to their ABI representations. What's the implest way to do that, keeping in mind I have to start at the Transaction receipt that I have?
proBeejay141
@proBeejay141
Sep 26 2018 16:36
var filterId = await transferEventHandler.CreateFilterAsync(filterTransferEvents);
its returning 405 exception