Skip to content

Commit 7d55c31

Browse files
committed
Update liquidator w/ mainnet values
1 parent ae0f6a6 commit 7d55c31

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

scripts/liquidator.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,15 @@ def get_contract(name, addr):
173173
)
174174
elif args.testnet:
175175
print("Configured for Oxen testnet")
176-
sent_addr, snrewards_addr = (
176+
sesh_addr, snrewards_addr = (
177177
"0xA5E28A879F464438Bb300903464382feA62828D0",
178178
"0x0B5C58A27A41D5fE3FF83d74060d761D7dDDc1D2",
179179
)
180180
else:
181-
print(f"This script does not support Session {netname} yet!", file=sys.stderr)
182-
sys.exit(1)
181+
sesh_addr, snrewards_addr = (
182+
"0x10Ea9E5303670331Bdddfa66A4cEA47dae4fcF3b",
183+
"0xC2B9fC251aC068763EbDfdecc792E3352E351c00",
184+
)
183185

184186

185187
SESH = get_contract("SESH.sol:SESH", sesh_addr).functions
@@ -281,7 +283,7 @@ def lookup_error(selector):
281283

282284
for sn in r:
283285
pk = sn["service_node_pubkey"]
284-
bls = sn["info"]["bls_public_key"]
286+
bls = sn["info"]["pubkey_bls"]
285287
if pk in liquidated:
286288
verbose(f"Already liquidated {pk}")
287289
elif bls not in contract_nodes:
@@ -300,11 +302,13 @@ def lookup_error(selector):
300302
print(f"oxend liquidation list request failed: {e}", file=sys.stderr)
301303
continue
302304

305+
if len(liquidate) > 0:
306+
print(f"Proceeding to liquidate {len(liquidate)} eligible nodes")
303307
for sn in liquidate:
304308
try:
305309
pk = sn["service_node_pubkey"]
306310
info = sn["info"]
307-
print(f"\nLiquidating SN {pk}\n BLS: {info['bls_public_key']}")
311+
print(f"\nLiquidating SN {pk}\n BLS: {info['pubkey_bls']}")
308312

309313
r = requests.post(
310314
oxen_rpc,

0 commit comments

Comments
 (0)