Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Provide a way to auto-generate @external contract functions #40

Open
ericglau opened this issue Aug 15, 2022 · 0 comments
Open

Provide a way to auto-generate @external contract functions #40

ericglau opened this issue Aug 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@ericglau
Copy link
Owner

ericglau commented Aug 15, 2022

According to the extensibility pattern, libraries must implement external functions under a namespace, and the external function name must not start with an underscore.

The pattern also states that contracts should implement @external functions if needed.

For some external library functions, it is reasonable that contracts always implement them. For example, Ownable.owner() is one such function.

User stories:

  1. As a contract developer, I want to be notified if I forgot to expose some external library functions, so that my users will not have missing functionality.
  2. As a contract developer, I want to be able to automatically generate @external functions from external library functions, so that I don't need to manually create them.

Proposed solution:
Provide a way to automate the generation of these functions. This could be in the form of code completions or quick fixes (perhaps with info-level diagnostic highlighting if some external library functions were not exposed).

@ericglau ericglau added the enhancement New feature or request label Aug 15, 2022
@ericglau ericglau changed the title Provide a way to auto-generate external contract functions Provide a way to auto-generate @external contract functions Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant