Skip to content

Commit 52caf40

Browse files
committed
Extra checks to make sure migration and release lists are consistent
1 parent d884cda commit 52caf40

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scripts/mainnet/migration_list.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def main():
7575
t_stakers = []
7676
dune_data = json.load(f)
7777
for row in dune_data["result"]["rows"]:
78-
t_staker = row["stakingProvider"]
78+
t_staker = row["stakingProvider"].lower()
7979
t_stakers.append(t_staker)
8080

8181
print(f"Number of stakers in T staking: {len(t_stakers)}")
@@ -147,6 +147,14 @@ def main():
147147
# Normal staker --> Migrate
148148
print(f"Staker {s}: Authorized == staked: {t_tokens(auth_amount)}")
149149
migrated.append(s)
150+
151+
# Make sure lists are consistent
152+
assert len(set(migrated)) == len(migrated), "There are duplicated addresses in the migrated list!"
153+
assert len(set(released)) == len(released), "There are duplicated addresses in the released list!"
154+
assert len(set(beta_included)) == len(beta_included), "There are duplicated addresses in the beta included list!"
155+
assert len(set(beta_excluded)) == len(beta_excluded), "There are duplicated addresses in the beta excluded list!"
156+
assert set(beta_included).isdisjoint(set(beta_excluded)), "There are addresses in both beta included and beta excluded lists!"
157+
assert set(migrated).isdisjoint(set(released)), "There are addresses in both migrated and released lists!"
150158

151159
# Final Summary
152160
print(f"Total authorized stake (includes wrong data from Beta stakers): {t_tokens(total_authorized_stake)}")

0 commit comments

Comments
 (0)