Add placeholder for price commands

This commit is contained in:
Luke Van Seters 2021-11-17 21:59:12 -05:00
parent 5756cb15a5
commit 053c29cf20
3 changed files with 23 additions and 0 deletions

6
cli.py
View File

@ -79,6 +79,12 @@ async def inspect_many_blocks_command(
)
@cli.command()
@coro
async def fetch_all_prices():
print("fetching")
def get_rpc_url() -> str:
return os.environ["RPC_URL"]

16
mev
View File

@ -56,6 +56,22 @@ case "$1" in
echo "Fetching block $block_number"
kubectl exec -ti deploy/mev-inspect -- poetry run fetch-block $block_number
;;
prices)
shift
case "$1" in
fetch-latest)
echo "running fetch-latest"
;;
fetch-all)
echo "running fetch-all"
kubectl exec -ti deploy/mev-inspect -- \
poetry run fetch-all-prices
;;
*)
echo "prices usage: "$1" {fetch-latest|fetch-all}"
exit 1
esac
;;
exec)
shift
kubectl exec -ti deploy/mev-inspect -- $@

View File

@ -34,6 +34,7 @@ build-backend = "poetry.core.masonry.api"
inspect-block = 'cli:inspect_block_command'
inspect-many-blocks = 'cli:inspect_many_blocks_command'
fetch-block = 'cli:fetch_block_command'
fetch-all-prices = 'cli:fetch_all_prices'
[tool.black]
exclude = '''