OpenZeppelin / OpenZeppelin/contracts-wizard

Highlight differences when changing features

Open
#219 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
TypeScript
Stars
294
Forks
186
Avg merge
6h 46m
Merged PRs (30d)
22

Description

When adding or removing a selected feature, it may not be obvious what parts of the resulting code has changed. This is especially the case for Cairo because there is a lot of code that requires scrolling to view.

Enhance the UI so that differences are visibly highlighted when changing a feature.

For example, if the user starts with:
Screen Shot 2023-01-12 at 4 56 55 PM
then enables Mintable like the below:
Screen Shot 2023-01-12 at 4 57 48 PM
, this should cause the following sections to be highlighted:

import "@openzeppelin/contracts/access/Ownable.sol";

and

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the feature toggle in the contracts wizard UI and compare the generated code before and after enabling Mintable. The work is done when sections added or removed by a feature, such as the Ownable import and mint function, are visibly highlighted.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.