mirror touchup
This commit is contained in:
@@ -175,15 +175,16 @@ async def main():
|
||||
await asyncio.gather(*txs)
|
||||
log.info('Pools deployed')
|
||||
|
||||
mirror_pools = []
|
||||
mirror_pool_list = []
|
||||
# log.debug(f'Getting pool info {" ".join(pools)}')
|
||||
for pool in pools:
|
||||
mirror_addr, mirror_inverted = await mirrorenv.pools(pool)
|
||||
if mirror_addr == ADDRESS_0:
|
||||
raise ValueError(f'Pool {pool} was not successfully mirrored')
|
||||
log.debug(f'\t{pool} => {mirror_addr} inverted={mirror_inverted}')
|
||||
mirror_pools.append((mirror_addr, mirror_inverted))
|
||||
await write_metadata(pools, mirror_pools)
|
||||
mirror_pool_list.append((mirror_addr, mirror_inverted))
|
||||
await write_metadata(pools, mirror_pool_list)
|
||||
mirror_pools = dict(zip(pools, mirror_pool_list))
|
||||
|
||||
if update_once:
|
||||
log.info(f'Updating pools once')
|
||||
@@ -203,7 +204,8 @@ async def main():
|
||||
tx = await mirrorenv.transact.updatePool(pool, price, gas=1_000_000) # this is a B.S. gas number
|
||||
await tx.wait()
|
||||
last_prices[pool] = price
|
||||
log.debug(f'Mirrored {pool} {price}')
|
||||
addr, inverted = mirror_pools[pool]
|
||||
log.debug(f'Mirrored {addr} {price}')
|
||||
except Exception as x:
|
||||
log.debug(f'Could not update {pool}: {x}')
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user