Add script to count contributions between a certain block timeframe #208
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/count-contributions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think it is broken so far, but maybe a start.
Currently the numbers are not the same as on kredits-web. but I don't know why :)
Which numbers exactly?
I ran this script and it gives me:
which is different from what I see on kredits-web
That's either a logical bug in the contract function for receiving overall kredits per contributor, or a bug in the script.
When I use the filter in Kredits Web to search for all contributions of "haythem96", all contributions amount to 13000 Kredits. That's the same amount as @bumi got with the script. But Kredits Web shows 13500 in the toplist.
That would point to a bug in the contract function then. The toplist is not calculated from the contributions directly, but using a contract function to receive those numbers. My hunch would be that vetoed contributions are counted (or not counted) in some place where they shouldn't be.
How do I run the script against Rinkeby?
I run
truffle exec --network=rinkeby scripts/list-contributions-per-contributor.js
(with local IPFS running)I had a quick look and the only thing I can see is that the
if
condition might ignore parentheses, but it looks correct to me. Maybe a bit too much for one line and such a critical piece of code, even if simple.Logic still dictates that it's a problem with that function, if the numbers don't add up otherwise (and it is confirmed that the added-up numbers are correct).
We confirmed that the script itself is correct in the meantime.