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

Dont use get_contract() #17

Open
byteZorvin opened this issue Oct 19, 2024 · 0 comments
Open

Dont use get_contract() #17

byteZorvin opened this issue Oct 19, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@byteZorvin
Copy link
Member

Trying to directly access the contract storage in the component makes the component dependent on the contract, and this is imo an antipattern since components should depend only on other components or abstractions (traits) to support better composability.

We should get away with get_contract() here and use a generic implmentation of the trait to call the function.

Can take a look at here for inspiration.

@byteZorvin byteZorvin added enhancement New feature or request good first issue Good for newcomers labels Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant