These are chat archives for Nethereum/Nethereum

24th
Oct 2017
kai
@kaista82_twitter
Oct 24 2017 08:14
is there a super clever way to verify an address is genuine within neth, or is it just a length check
Juan Blanco
@juanfranblanco
Oct 24 2017 09:51
well it is just a length check
you can use the Checksum format
but that is a visual aid
kai
@kaista82_twitter
Oct 24 2017 11:56
so 42 or use the checksum functions
or mix the both if they are different lengths
can you remind me how I get my private key from the keystore again i forgot
Juan Blanco
@juanfranblanco
Oct 24 2017 11:57
well the checksum is a visual check
it is not particularly safe proof
kai
@kaista82_twitter
Oct 24 2017 11:57
gotcha
Juan Blanco
@juanfranblanco
Oct 24 2017 11:57
mainly formatting
the keystore private key..
kai
@kaista82_twitter
Oct 24 2017 11:57
ill do 42 length string check for now I think then look into checksum
kai
@kaista82_twitter
Oct 24 2017 11:58
privateKey = service.DecryptKeyStoreFromJson(keyStorePassword, json).ToHex();
thats the cookie
<3
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 24 2017 13:33

Hello, could anyone help me with events?
I have a contract with tokens, in ethereum wallet(mist) I can see events about who buy tokens(and how much tokens),
but in code I can't get this information, I tried something like that

var tokenPurchaseEvent = contract.GetEvent("TokenTransferEvent");
var param1 = new BlockParameter(0); // from first block
var param2 = new BlockParameter();  // to latest block
var filter = tokenPurchaseEvent.CreateFilterInput(param1, param2);
var events = await tokenPurchaseEvent.GetAllChanges<TokenPurchaseData>(filter); // here I got exception because logs are really different form TokenPurchaseData model

//also I tried
var tokenPurchaseEvent = contract.GetEvent("TokenTransferEvent");
var filter = await tokenPurchaseEvent.CreateFilterAsync();
var logs = await tokenPurchaseEvent.GetAllChanges<TokenPurchaseData>(filter); // empty result
var logs = await tokenPurchaseEvent.GetFilterChanges<TokenPurchaseData>(filter); // empty result

When I tried through CreateFilterInput-way I got correct count of events, but data was really "low-level" (fields -address, topics, data, blockNumber, transactionHash, transactionIndex, blockHash, logIndex, removed).
I'm expecting fields - investor, value, tokens.
What I'm doing wrong?

Juan Blanco
@juanfranblanco
Oct 24 2017 13:35
you need to sync the chain
@usernameisalreadytaken1236428934
not using fast sync
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 24 2017 13:36
wow, interesting, I will try, thanks
Juan Blanco
@juanfranblanco
Oct 24 2017 13:37
somebody asked the same question the other day, hence I assume that is your problem
let me know how it goes
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 24 2017 13:40
sure, after syncing I will check and write here
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 24 2017 14:32
I launched get without --fast parameter and it not helped me, also Mist working with the same local node, Mist see events, code - no...
Juan Blanco
@juanfranblanco
Oct 24 2017 14:34
are you connecting to live? local?
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 24 2017 14:37
rinkeby network
Juan Blanco
@juanfranblanco
Oct 24 2017 14:42
so you are fully sync
usernameisalreadytaken1236428934
@usernameisalreadytaken1236428934
Oct 24 2017 17:28
yes, look like, I removed all data, and launch without --fast, current size - 1.27 GB
how can I check is this full synced data?