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

Feature request: GPT integration to shorten function and modifier names #39

Open
PaulRBerg opened this issue Sep 28, 2023 · 1 comment
Labels
Feat New feature or request Uphill Needs research before being implemented

Comments

@PaulRBerg
Copy link
Contributor

Depending upon the contents of the *.tree file, the scaffolded Solidity code can end up somewhat verbose. It would be nice if there were a way to shorten the generated text using a LLM like GPT.

E.g. given this input:

├── when the deposit amount is greater than a specific value
│   └── it should revert
└── when the deposit amount is less than or equal to the specific value
    └── it should do smth

The following function names would be generated:

function test_RevertWhen_DepositAmountGreaterThanSpecificValue {}
function test_DepositAmountLessThanOrEqualToSpecificValue {}

Notice that the "the" and the "is" and the "a" terms have been removed.

Alternatively:

function test_RevertWhen_DepositAmountNotGT {}
function test_DepositAmountLTE {}
@PaulRBerg
Copy link
Contributor Author

Another very interesting application of GPT would be to use it to write the tests themselves - not just scaffold the skeleton Solidity file.

@alexfertel alexfertel added Feat New feature or request Uphill Needs research before being implemented labels Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat New feature or request Uphill Needs research before being implemented
Projects
None yet
Development

No branches or pull requests

2 participants