-
-
Save banteg/3da133768ca83af5c9aca6bbdf586957 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
edgewareAddr | eth | effectiveEth | |
---|---|---|---|
ba2bafc3..d5dbfbab | 40791 | 89740.2 | |
c06cb0ab..9d2ad81f | 28123 | 61870.6 | |
4c95c3f9..27f679ab | 20000 | 44000.0 | |
3e5d5ef6..c229aadb | 11000 | 24200.0 | |
00162f49..f624eb92 | 10000 | 22000.0 | |
e2087a86..87a8d089 | 8570 | 18854.0 | |
1ae87d9e..3902246e | 4000 | 8800.0 | |
30a99c03..77c3c81d | 3000.2 | 6600.44 | |
96c9b6ff..98258bc9 | 2000.5 | 4401.10 | |
acae1876..7fb5d840 | 1000 | 2200.0 | |
b26a3d0c..589b8162 | 722 | 1564.4 | |
8888c18c..e589c5f1 | 1500 | 1500 | |
301346e7..3fbcb3d4 | 601 | 1322.2 | |
0ce3b437..0c37ed83 | 500 | 1100.0 | |
44fe7489..ff6a0351 | 480 | 1056.0 | |
98bbbee6..369403a8 | 300 | 660.0 | |
4467d177..f51bce82 | 430 | 559.0 | |
fa030d48..a37b406e | 250 | 550.0 | |
eab6a65f..00876c55 | 250 | 550.0 | |
9674ad9a..3ab3ac7e | 516 | 516 | |
3efd8879..5e2a3f77 | 228 | 501.6 | |
36979efd..66dd7e60 | 200 | 440.0 | |
9c2baaac..f207a058 | 161 | 354.2 | |
dc2b5e39..99dc936e | 100 | 220.0 | |
8ef21333..801236b4 | 99.99 | 219.978 | |
16fb6072..1886507c | 93.85 | 206.470 | |
e2107008..c190ef03 | 76 | 167.2 | |
98dba10e..1491a8bb | 60 | 132.0 | |
dee3a977..c7098aa0 | 70 | 118.0 | |
5c18b148..1653e6d6 | 50 | 110.0 | |
f64dc1e3..0408035f | 45 | 99.0 | |
823f186f..d6c17d11 | 98.19 | 98.19 | |
a2288864..1f9a2fb5 | 32 | 70.4 | |
b4a4773e..514f7225 | 63.8 | 63.8 | |
40746905..37bf0bd9 | 25 | 55.0 | |
d42e4782..f0b3ac3f | 25 | 55.0 | |
a4fa91aa..b3cafa01 | 25 | 55.0 | |
e20bc322..0fa5f148 | 50 | 50 | |
0495e800..9517ec33 | 30 | 45.0 | |
6a6b13e3..5c224ce4 | 38 | 38 | |
3294f5fa..822e7775 | 17 | 37.4 | |
e84b404d..e82241f3 | 32 | 36.2 | |
5000cdf2..6bec560d | 32.99 | 32.99 | |
7cab4fc5..7e6c2ffa | 12 | 26.4 | |
8646d846..b116adbb | 12 | 26.4 | |
2cd3773e..399ce8ba | 20 | 26.0 | |
68d2fc76..2b6e60dc | 10 | 22.0 | |
9ab060d9..22ea5fe7 | 10 | 22.0 | |
00000d7e..b8b18649 | 10 | 22.0 | |
a843370e..7a70821b | 10 | 22.0 | |
326f93a5..6dcaabfe | 16 | 16 | |
8a960304..dc23d3fd | 15 | 15 | |
ecd69660..fe86fabc | 12.65 | 12.65 | |
109c931c..24aafe11 | 5.5 | 12.10 | |
4e6d37f5..8c9b8390 | 5.3 | 11.66 | |
0c803696..fe6c17a6 | 5.28 | 11.616 | |
285ff386..c00cf54a | 5.28 | 11.616 | |
ce9f16e6..d27151a3 | 5.28 | 11.616 | |
38d1bb01..4f8f2359 | 5.28 | 11.616 | |
aa063d96..615ba63b | 5.28 | 11.616 | |
447dafb0..dfb18f8d | 5.28 | 11.616 | |
78f1e52c..055af8ed | 5.28 | 11.616 | |
20e376fa..66b9ada0 | 5.28 | 11.616 | |
d2c76aea..f5a5d073 | 5.28 | 11.616 | |
746de8ae..1b762edd | 5 | 11.0 | |
a03082d1..a857bdcd | 5 | 11.0 | |
bcd7a3c6..f06adc2d | 5 | 11.0 | |
7ced6cf5..7483f47e | 6.28 | 10.216 | |
bcaf4fe5..4e4641a1 | 4 | 8.8 | |
0892fc36..c9e13466 | 7 | 7 | |
f876459a..c052bc2b | 5 | 6.5 | |
2cf62f82..8264a976 | 2 | 4.4 | |
54df75b3..dd5757b4 | 1 | 2.2 | |
46fe393c..4587a5d2 | 0.9997 | 2.19934 | |
5c587559..9af662f8 | 0.9994 | 2.19868 | |
d02be09b..23e5779b | 1.5 | 1.95 | |
9c048585..3ae8667c | 1 | 1.3 | |
025f8a24..b3095754 | 1.1 | 1.1 | |
aae52959..ec2be40a | 1 | 1 | |
10b7ca93..70403637 | 0.0005 | 0.0005 | |
c4331db2..91454053 | 0 | 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
from decimal import Decimal | |
from web3.auto import w3 | |
term_multiplier = {0: Decimal('1'), 1: Decimal('1.3'), 2: Decimal('2.2')} | |
edgeware_lockdrop = '0x1b75B90e60070d37CfA9d87AFfD124bB345bf70a' | |
edgeware_block = 7759240 | |
abi = [ | |
{ | |
'anonymous': False, | |
'inputs': [ | |
{'indexed': True, 'name': 'owner', 'type': 'address'}, | |
{'indexed': False, 'name': 'eth', 'type': 'uint256'}, | |
{'indexed': False, 'name': 'lockAddr', 'type': 'address'}, | |
{'indexed': False, 'name': 'term', 'type': 'uint8'}, | |
{'indexed': False, 'name': 'edgewareAddr', 'type': 'bytes'}, | |
{'indexed': False, 'name': 'isValidator', 'type': 'bool'}, | |
{'indexed': False, 'name': 'time', 'type': 'uint256'}, | |
], | |
'name': 'Locked', | |
'type': 'event', | |
} | |
] | |
edgeware = w3.eth.contract(edgeware_lockdrop, abi=abi) | |
logs = edgeware.events.Locked().getLogs(fromBlock=edgeware_block) | |
locked = Counter() | |
effective = Counter() | |
for log in logs: | |
if not log.args.isValidator: | |
continue | |
addr = log.args.edgewareAddr | |
eth = w3.fromWei(log.args.eth, 'ether') | |
locked[addr] += eth | |
effective[addr] += eth * term_multiplier[log.args.term] | |
print('edgewareAddr', 'eth', 'effectiveEth', sep=',') | |
for addr, eth in effective.most_common(): | |
print(f'{addr.hex()[:8]}..{addr.hex()[-8:]},{locked[addr]},{eth}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment