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

Code snippets / Usage example #450

Open
sakulstra opened this issue May 15, 2024 · 2 comments
Open

Code snippets / Usage example #450

sakulstra opened this issue May 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@sakulstra
Copy link
Collaborator

Would be nice if selecting/hovering an item, would show how to actually use it in code via address-book.
This can be useful especially as imports are wildly different on solc vs js:

js: AaveV3Ethereum.ASSETS.FRAX.A_TOKEN
solc: AaveV3EthereumAssets.FRAX_A_TOKEN
@sakulstra sakulstra added the enhancement New feature or request label May 15, 2024
@pegahcarter
Copy link

It probably would be best to instead normalize naming so that imports are consistent.

@sakulstra
Copy link
Collaborator Author

@pegahcarter it's not really possible in a reasonable way.

In practice accessing Pool.Asset.UNDERLYING(how it is on ts part of the library) would be more comfortable then Pool.Asset_UNDERLYING. Originally we replicated a similar behavior in solidity via Pool.Asset().Underlying(), but this has code-size and compile-time implications which were not worth the tradeoff.
On js side, it's quite nice to be able to just iterate over the objects, so eventually it's a tradeoff we settled on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants