These are chat archives for Nethereum/Nethereum

5th
Oct 2018
Juan Blanco
@juanfranblanco
Oct 05 2018 06:29 UTC
@spied001 ah excellent, there is not limitation in Nethereum apart the HttpClient limitations, also you are just querying the state at the moment.
Is this load testing a single contract?
Dave Whiffin
@Dave-Whiffin
Oct 05 2018 09:29 UTC
@hawthornetr Sorry for the delay. I’ll take a look this morning. Are you running a private chain or against rinkeby, ropsten etc?
hawthornetr
@hawthornetr
Oct 05 2018 12:54 UTC
This is all against geth, im writing a transaction indexer by address and some other info like tokens/symbols etc.
so you should be able to use that contract addr, it's public.
hell any contract addr I pull shows junk.
honestly looks like unicode ;)
Juan Blanco
@juanfranblanco
Oct 05 2018 12:56 UTC
are those contracts for a token?
hawthornetr
@hawthornetr
Oct 05 2018 12:57 UTC
So...
Juan Blanco
@juanfranblanco
Oct 05 2018 12:57 UTC
in erc20 contracts
hawthornetr
@hawthornetr
Oct 05 2018 12:57 UTC
RestClient client2 = helper.GetNewClient();
client2.postData = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\":[\"" + thisTxID + "\"],\"id\":1}";
var rpc2 = client2.Process().FromJson<dynamic>();
if (rpc2.result.contractAddress != null)
I get a tx receipte for a txid, if that contract address is not null I assume its a contract and try to get token info
So really thats a good question, im trying to scan for all tokens, to find them, dont know of a better way
Juan Blanco
@juanfranblanco
Oct 05 2018 12:58 UTC
there are many contracts
not just
token contracts
hawthornetr
@hawthornetr
Oct 05 2018 12:58 UTC
I see.
Juan Blanco
@juanfranblanco
Oct 05 2018 12:58 UTC
when a receipt contains a contract address
hawthornetr
@hawthornetr
Oct 05 2018 12:58 UTC
Is there a better way for me to qualify which contract address is a token?
Juan Blanco
@juanfranblanco
Oct 05 2018 12:59 UTC
it is the result of a deployment
hawthornetr
@hawthornetr
Oct 05 2018 12:59 UTC
I am trying to scan the blockchain and build a list of all tokens
that's the goal
Juan Blanco
@juanfranblanco
Oct 05 2018 12:59 UTC
well the standard are the interface one
you can check the totalSupply()
method
hawthornetr
@hawthornetr
Oct 05 2018 13:00 UTC
If that > 0 = token?
Juan Blanco
@juanfranblanco
Oct 05 2018 13:00 UTC
well it is a good guess :)
hawthornetr
@hawthornetr
Oct 05 2018 13:00 UTC
hehe
yea its all a guess so to speak it seems ;)
there's nothing that says 100% hey im token!
Juan Blanco
@juanfranblanco
Oct 05 2018 13:00 UTC
mainly the ERC20 has an interface
and totalSupply is the only that is not related to a specific address
hawthornetr
@hawthornetr
Oct 05 2018 13:01 UTC
I am the CTO for bullpay.com we write indexers, we use neth for all our ETH stuff, so let me say I really appreciate your hard work.
Juan Blanco
@juanfranblanco
Oct 05 2018 13:01 UTC
then you can check the Name, Symbol
Decimals
hawthornetr
@hawthornetr
Oct 05 2018 13:02 UTC
good deal, that's what I am looking for
Juan Blanco
@juanfranblanco
Oct 05 2018 13:02 UTC
but that is optional, not part of the standard
im glad you like it
hawthornetr
@hawthornetr
Oct 05 2018 13:02 UTC
that will be me closer than what I am doing, right now im looking for a symbol but you can get back garbage, so that's no good.
Juan Blanco
@juanfranblanco
Oct 05 2018 13:02 UTC
now back to the name symbol
historically there were no string types
so this was a bytes32
that is encoded differently
than a string
hawthornetr
@hawthornetr
Oct 05 2018 13:03 UTC
yea, it looked funky ;)
Juan Blanco
@juanfranblanco
Oct 05 2018 13:03 UTC
but people now use strings
so that caters for both string and bytes32
hawthornetr
@hawthornetr
Oct 05 2018 13:03 UTC
ahhh
Juan Blanco
@juanfranblanco
Oct 05 2018 13:03 UTC
an example is the dai test
public async void ShouldGetTheDaiFromMainnet()
{
var web3 = new Web3.Web3("https://mainnet.infura.io");
var contractHandler = web3.Eth.GetContractHandler("0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359");
var stringBytes32Decoder = new StringBytes32Decoder();
var symbol = await contractHandler.QueryRawAsync<SymbolFunction, StringBytes32Decoder, string>();
var token = await contractHandler.QueryRawAsync<NameFunction, StringBytes32Decoder, string>();
    }
hawthornetr
@hawthornetr
Oct 05 2018 13:04 UTC
cool
I will start c hecking total supply then hit the others
Thanks for taking the time and being responsive. I appreciate your help greatly.
Juan Blanco
@juanfranblanco
Oct 05 2018 13:05 UTC
but if you look at the EIP20 service
that covers all the stuff
hawthornetr
@hawthornetr
Oct 05 2018 13:05 UTC
Folks like you are what makes this world a better place. I've been coding since 1978, so I value guys like you ;')
i have just refactored to make it easier
ha ha thanks
that covers all those scenarios
from deployment to getting info etc
hawthornetr
@hawthornetr
Oct 05 2018 13:07 UTC
Very cool, looks like I may make some progress today ;)
cesarsld
@cesarsld
Oct 05 2018 16:57 UTC
Is it possible to get ether price in nethereum?
Sergio Piedrahita
@spied001
Oct 05 2018 17:12 UTC
@juanfranblanco yes we are trying to see how many transactions can be submitted at "once". One question, I think this one is not related to nethereum but maybe you know got the answer, would you happen to know what would be the impact on security by increasing the gas limit? we know that this change allow us to pack more transactions per block
Sergio Piedrahita
@spied001
Oct 05 2018 18:49 UTC
@juanfranblanco this is the exception I get when I do
functionCallResult = await contractFunction.SendTransactionAsync(sendingAddress, gasEstimate, null, functionInput);
image.png
@juanfranblanco this is the inner exception:
image.png
@juanfranblanco the exception is thrown after a lot of transactions are submitted