Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: log wallet address as string #806

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Conversation

wakamex
Copy link
Contributor

@wakamex wakamex commented Aug 8, 2023

error was:

  File "/home/mihai/.pyenv/versions/3.10.11/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: must be real number, not HexBytes
Call stack:
  File "/code/mihaipy/lib/agent0/bin/run_hyperdrive_agents.py", line 73, in <module>
    main()
...
  File "/code/mihaipy/lib/agent0/agent0/hyperdrive/agents/hyperdrive_wallet.py", line 54, in _update_longs
    logging.debug(
Message: 'agent #%g trade longs, maturity_time = %g\npre-trade amount = %s\ntrade delta = %s'
Arguments: (HexBytes('0x7eea1f9ac718dcc9fb13d66ed76845dc46abac65'), FixedPoint("1692136800.0"), {}, Long(balance=FixedPoint("349.030040954063607256")))
agent #b'~\xea\x1f\x9a\xc7\x18\xdc\xc9\xfb\x13\xd6n\xd7hE\xdcF\xab\xace' withdraw_shares pre-trade = 0.003

wallet address is now a string, but it used to be an int:
https://github.com/delvtech/elf-simulations/blob/61d023ec168faa433b7ecb7279843d701c36e675/lib/elfpy/elfpy/agents/agent.py#L28

@vercel
Copy link

vercel bot commented Aug 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elf-simulations ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 9, 2023 5:21pm

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Remaining rate limit: 4978 🚀

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Remaining rate limit: 4992 🚀

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Remaining rate limit: 4971 🚀

Copy link
Member

@dpaiton dpaiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! hopefully testing will catch this stuff in the future.

@wakamex wakamex merged commit 8bbf29d into main Aug 9, 2023
4 checks passed
@wakamex wakamex deleted the log_wallet_address_as_string branch August 9, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants