Skip to content

Size Optimization: Move ERC20 methods out of GovLST (Working thought)) #23

@alexkeating

Description

@alexkeating

Description

  • This spec is one idea for lowering the GovLst contract size.

  • We don't need to inherit ERC20 methods on GovLst. We could instead have a separate rebasing LST that inherits IERC20, IERC20Metadata and IERC20Permit. We would still keep the logic for the methods with permissioning for some of these methods. To make this a little clearer I broke the methods by interface and labelled them as either fully moved or calling a permissioned method.

  • I think this could be pretty lightweight as we don't add any logic and can reuse the current tests.

  • IERC20

    • totalSupply - external call
    • balanceOf - external call
    • transfer - external call
    • allowance - external call
    • approve - external call
    • transferFrom - external call
  • IERC20Metadata

    • name - Move method
    • symbol - Move method
    • decimals - Move method
  • "IERC20Permit"

    • permit: Move method - make sure it can modify underylying approve
    • The rest are neither moved nor externally called

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions