Skip to content

Move contract logic to libraries #4800

@Amxx

Description

@Amxx

In #4799, @k06a proposes to move the contract logic to libraries. Using Object orienter programming, the library would include a struct, and operations to interact with it. Presumably this would help for the transition between normal and upgradeable contract, as the logic would remain (mostly) the same and only the data location (and construction?) would need to me modified.

My concern is that this could negativelly affect customisability and overridability of the contracts. For example, if ERC20.transfer relies on a ERC20Lib.transfer "internal" function, how would ERC20Votes (or other) be able to override that internal function ?

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