Skip to content

Dont use get_contract() #17

@byteZorvin

Description

@byteZorvin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions