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

Gracefully handle contracts before starting block #20

Open
0xJem opened this issue Jun 17, 2022 · 0 comments
Open

Gracefully handle contracts before starting block #20

0xJem opened this issue Jun 17, 2022 · 0 comments

Comments

@0xJem
Copy link
Collaborator

0xJem commented Jun 17, 2022

We don't currently have a clean way of handling contracts prior to their starting block:

  • ERC20 contracts have a defined starting block constant, and the ERC20 helper function will return null if prior to that (which prevents further operations). This requires manual configuration, which isn't ideal.
  • Liquidity pairs don't have any such protection

Additionally, there is plenty of code (e.g. getUSDRateUniswapV3) that expects a contract to bind and work after that. Error conditions (such as being before the starting block) should be handled gracefully, instead of throwing an error.

0xJem added a commit that referenced this issue Jun 17, 2022
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

No branches or pull requests

1 participant