Total confirmed Kredits: 1771000 between block 1 and 7765007
┌────┬───────────────┬─────────┐
│ ID │ Name │ Kredits │
├────┼───────────────┼─────────┤
│ 1 │ Bumi │ 260500 │
├────┼───────────────┼─────────┤
│ 2 │ Râu Cao │ 421000 │
├────┼───────────────┼─────────┤
│ 3 │ Manuel │ 204500 │
├────┼───────────────┼─────────┤
│ 4 │ galfert │ 278500 │
├────┼───────────────┼─────────┤
│ 5 │ Greg │ 336500 │
├────┼───────────────┼─────────┤
│ 6 │ Nick │ 252000 │
├────┼───────────────┼─────────┤
│ 7 │ haythem96 │ 13000 │
...
which is different from what I see on kredits-web
I ran this script and it gives me:
```
Total confirmed Kredits: 1771000 between block 1 and 7765007
┌────┬───────────────┬─────────┐
│ ID │ Name │ Kredits │
├────┼───────────────┼─────────┤
│ 1 │ Bumi │ 260500 │
├────┼───────────────┼─────────┤
│ 2 │ Râu Cao │ 421000 │
├────┼───────────────┼─────────┤
│ 3 │ Manuel │ 204500 │
├────┼───────────────┼─────────┤
│ 4 │ galfert │ 278500 │
├────┼───────────────┼─────────┤
│ 5 │ Greg │ 336500 │
├────┼───────────────┼─────────┤
│ 6 │ Nick │ 252000 │
├────┼───────────────┼─────────┤
│ 7 │ haythem96 │ 13000 │
...
```
which is different from what I see on kredits-web
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.
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.
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.
> 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.
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.
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).
> 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.
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).
raucao
(Migrated from github.com)
approved these changes 2021-01-14 14:41:32 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
ifcondition 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.