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: remove static interface and use emitted instead [RFC] #395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sakulstra
Copy link
Collaborator

tl;dr;
remove statically typed interfaces as they do more harm than help

I've spend quite some time today fighting with types, and in the end it turned out the inaccurate types come from here.

In utilities we define interfaces which are implemented in classes.
(In my eyes) this only makes sense when the interfaces are reused and multiple classes implement the same interface.
In this case though each interface is only implemented once and in some cases they are incomplete.

This imo is a bit unreasonable and a self created maintenance burden.
Instead of using the PoolInterface you can just use the emitted Pool type and instead of specifying the return type you can infer it.

setUsageAsCollateral for example does not always return a promise, but can return a promise<extendedTxn[]> or extendedTxn[].
Wdyt? Should we drop the manually maintained interfaces?

@github-actions
Copy link

❌ Something went wrong with canary release
Please see logs at https://github.com/aave/aave-utilities/actions/runs/2748289776

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.

1 participant