Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 02 13:06

    juanfranblanco on master

    Added nonce to EtherTransferSer… Extended EtherTransactionInputB… Merge pull request #605 from ni… (compare)

  • Nov 29 03:10

    juanfranblanco on master

    test chain updates and nuget (compare)

  • Nov 28 19:44

    juanfranblanco on master

    parity.exe del memory leak fix add finally dis… Merge pull request #603 from ne… (compare)

  • Nov 22 05:20

    juanfranblanco on master

    Parity handling of errors is di… (compare)

  • Nov 22 05:14

    juanfranblanco on master

    Parity handling of Errors rever… (compare)

  • Nov 22 04:41

    juanfranblanco on master

    Generators adding Simple Consol… (compare)

  • Nov 22 04:31

    juanfranblanco on master

    Parity Stable testchain (compare)

  • Nov 22 04:21

    juanfranblanco on master

    Upgrading testchain test clients (compare)

  • Nov 21 17:15

    juanfranblanco on master

    Revert Error message + Decode … (compare)

  • Nov 13 14:40

    juanfranblanco on master

    Websockets adding EndOfMessage … (compare)

  • Nov 13 14:20

    juanfranblanco on master

    Fix Unity chainId Merge branch 'master' of https:… (compare)

  • Nov 08 10:36

    juanfranblanco on master

    fixed UnitConversion on uncommo… Merge pull request #598 from lo… (compare)

  • Nov 08 09:54

    juanfranblanco on master

    Adding support for Chaind to Un… Merge branch 'master' of https:… (compare)

  • Nov 08 09:06

    juanfranblanco on master

    fixed currency rounding for -0.5 use BigInteger.DivRem in roundi… Merge pull request #599 from lo… (compare)

  • Nov 06 17:43

    juanfranblanco on master

    Create Erc20v5.sol (compare)

  • Nov 05 09:54

    juanfranblanco on master

    added BigDecimal.ToString overl… Merge pull request #596 from lo… (compare)

  • Sep 26 14:34

    juanfranblanco on master

    StreamingWebSocketClient.SendRe… Merge pull request #585 from Da… (compare)

  • Sep 12 15:49

    Dave-Whiffin on blk-tx-count

    (compare)

  • Sep 12 15:47

    juanfranblanco on master

    Block.TransactionCount extensio… Removing TransactionCount for B… Merge pull request #580 from Ne… (compare)

  • Sep 12 15:36

    Dave-Whiffin on blk-tx-count

    Removing TransactionCount for B… (compare)

Kevin Small
@KevinSmall
It was a surprise for me to find that every possible Ethereum address already "exists" in the sense that someone might have it's private key. Maybe they've got that private key but not used it yet, so there are no transactions.
I found this website very educational https://keys.lol, it lists the private keys for all Ethereum addresses. This isn't a prank site, it is real and impresses how many addresses there actually are.
Matthias Lukaseder
@GhostTyper

@KevinSmall Well, I already knew that one could calculate the external account address to the(/any) private key. What I indeed didn't or don't really know is that external accounts and contract accounts are different or at least what the difference in a cryptographical and/or technical manner is.

It's also a new information from @Dave-Whiffin for me that a transaction can result in multiple transfers. I think I will order this Mastering Ethereum book.

However, my mission now looks like this:

  • Find all ERC20 Token Contracts ans save them to a DB with: Token Symbol, Token Point.
  • Find all External Accounts Transfers and their belonging Token Contracts.
  • Find all Created Tokens due to Contracts. (Or should I avoid the enlisting of contract accounts?!)
  • Find all created ETH due to Mining.

Is there another way that Tokens get assigned to a external account?

Juan Blanco
@juanfranblanco
You can assign an account some balance on initialisation, without raising an event (for example)
On an ERC20 constructor
Every smart contract even if they implement the interface, the internal can do many thind
For example assign a fee on each transfer to an account / smart contract without raising an event too.
Then you may have DEX which they will also charge you a fee on buy / sell.
Juan Blanco
@juanfranblanco
So your quest may vary depending on the transactions
The best thing is to check the balance of those accounts once you know them.
Juan Blanco
@juanfranblanco
Not forgetting tokens / ether locked in defi, like Maker CDPs (Eth, Bat, Peth, Weth)
Or Dai locked in compound or recently chai earning interest rates
Also not forgetting that even if you create CDPs (for example) you can transfer them to another account, so tracking the initial transfer will not be a simple good target.
Then you have non fungible tokens
Juan Blanco
@juanfranblanco
Also you may tokens using side chains or state channels like the xDai
Some links
Hopefully that helps, but as things get more complex it is slightly more difficult to track ownership in some situations
Juan Blanco
@juanfranblanco
Also Ether transfer can happen between contracts in a transaction
The best thing is to use parity trace filter, in
Nethereum you have the Nethereum.Parity nuget if you want
Matthias Lukaseder
@GhostTyper
Sadly I'm using a geth node.
This sounds like there is nothing remotly like a generic way of implementing this.
Just tracking the balance, when "I know an account" is not enough.
Matthias Lukaseder
@GhostTyper
Because I want to be able to print this "statement of account" for every address for every given timespan for all ERC20 tokens + ETH itself.
My plan of doing this without some kind of database (just with communicating with the node) would be:
  • sum up all ERC20 tokens + ETH before the start of the "statement of account" view. Print all those sums.
  • Print all the transfers of all ERC20 tokens + ETH from start until end of the given time span.
  • sum up all ERC20 tokens + ETH at the end of the time span and also print those.
Matthias Lukaseder
@GhostTyper

So, with all you said I would additionally have to somehow query the balance of a detected ERC20 Token + ETH for each block in the time span to recognize balance changes not happened by a transfer. (Question: Is this even possible? Or can the balance only be queried for the latest block?)

With this I could at least show that the balance changed without a transfer.

Matthias Lukaseder
@GhostTyper
Maybe it's possible with web3.Eth.GetBalance.BuildRequest("address", new BlockParameter(9000000), /*Whats this for?*/);?
Dave Whiffin
@Dave-Whiffin
@GhostTyper You can query the balance retrospectively (like most things on the chain it's dependent on the node/client, nethereum is really proxying these requests to the node)
            var blockParameter = new Nethereum.RPC.Eth.DTOs.BlockParameter(new Nethereum.Hex.HexTypes.HexBigInteger(1000));
            var balance = await  web3.Eth.GetBalance.SendRequestAsync("<address>", blockParameter);
Matthias Lukaseder
@GhostTyper
@Dave-Whiffin Uhm, am I wrong or will this only give me the ETH balance? Don't I need to call getBalance on the smart contract for an address to get the balance of that smart contract? And can this also be evaluated historically?
(And as always: Thank you for your help.)
Juan Blanco
@juanfranblanco
if you used typed smart contracts check this document
and the section of Querying previous state of the smart contract
Matthias Lukaseder
@GhostTyper
I want to be able to query all ERC20 tokens on an address historically.
Ah, yes?
Juan Blanco
@juanfranblanco
as per Daves comment depends on the node you are querying you will get this information or not
Matthias Lukaseder
@GhostTyper
I've setup an archive node.
Juan Blanco
@juanfranblanco
ah then you are ok :)
Matthias Lukaseder
@GhostTyper
But how can I call getBalance on a smart contract for previous blocks?
Juan Blanco
@juanfranblanco
var balance = await balanceHandler.QueryDeserializingToObjectAsync<BalanceOfOutputDTO>( balanceOfFunctionMessage, contractAddress, new Nethereum.RPC.Eth.DTOs.BlockParameter(transactionReceipt.BlockNumber));
in is in that document
in here i am querying the balance of a previous transaction blocknumber
you can check this playground sample http://playground.nethereum.com/csharp/id/1007
in line 207 you will see that example
Juan Blanco
@juanfranblanco
edit!!! 240 @GhostTyper
Matthias Lukaseder
@GhostTyper
Thank you. It will take me some time.