Skip to content

Round of enhancements for repo.sourcify.dev #1997

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

Closed
18 tasks done
kuzdogan opened this issue Mar 13, 2025 · 2 comments
Closed
18 tasks done

Round of enhancements for repo.sourcify.dev #1997

kuzdogan opened this issue Mar 13, 2025 · 2 comments
Assignees
Labels

Comments

@kuzdogan
Copy link
Member

kuzdogan commented Mar 13, 2025

After shipping the MVP of the new repo, gathering what to ship next here:

Must have:

  • Improve the homepage
  • Enhance design to make the look and feel more Sourcify
  • Handle deprecated chain contracts https://repo.staging.sourcify.dev/5/0x1e196CCb77138f85389da6704e0577cF67f435D7
  • Add "View in Remix" button to source code
  • Fix fonts to Sourcify fonts (IBM Plex)
  • In the new repo.sourcify.dev show file tree with the source sode editor #2098
    • Moving this to it's own issue, potentially from an external contributor.
  • Add explorer links to the deployment transaction, if provided in /chains response
    • Not really necessary and will require us to look for other explorers on other chains
  • Make each item collapsible
    • Decided against this as it would be difficult to make sense of items if all is collapsed and there is no visual clue
  • Visualize transformations directly on the bytecode
    • Here double check if the "normalized" version is correct, ie. the library placeholders and not zeros
      • Edit: Yes we are normalizing it to zeros:
        // Use the transformations array to normalize the library transformations in both runtime and creation recompiled bytecodes
        // Normalization for recompiled bytecodes means:
        // Runtime bytecode:
        // 1. Replace library address placeholders ("__$53aea86b7d70b31448b230b20ae141a537$__") with zeros
        // 2. Immutables are already set to zeros
        // Creation bytecode:
        // 1. Replace library address placeholders ("__$53aea86b7d70b31448b230b20ae141a537$__") with zeros
        // 2. Immutables are already set to zeros
        export function normalizeRecompiledBytecodes(verification: VerificationExport) {
        let normalizedRuntimeBytecode = verification.compilation.runtimeBytecode;
        let normalizedCreationBytecode = verification.compilation.creationBytecode;
        const PLACEHOLDER_LENGTH = 40;
        // Runtime bytecode normalzations
        verification.transformations.runtime.list.forEach((transformation) => {
        if (transformation.reason === "library" && normalizedRuntimeBytecode) {
        We can switch it back to non-normalized here and in the api but can someone remind we why we are normalizing? IMO we should not normalize. Technically if the user fetches the recompiled bytecode from the APIv2 it's a different bytecode than what the compiler returns.
  • Diff view to check onchain vs recompiled (maybe link to diffchecker.com?)
    • Diff view is actually the transformations view above
  • Separate section for all libraries, instead of just transformations and show if there are unverified libraries
  • IPFS link for the metadata file
  • Copy and download buttons for editors
  • Handle the case when creationMatch: null but creation bytecode is present Discuss: APIv2 returns the creation bytecode even if creationMatch is null #1979
  • Separate tracking scripts for staging vs prod vs local
  • Show runtimeMatch and creationMatch
  • Warning around creation and runtime bytecode sections if it is not a runtime/creation match
  • Next's default cache limit is 2MB which is smaller than some of the v2 responses e.g. https://sourcify.dev/server/v2/contract/1/0x5E723B39CA597AE3B08A6FA6836B3C605F37C3F3?fields=all
    • Won't try to raise the limit or workaround as most of the contracts are expected to be <2MB but we'll keep this in mind.
    • Generally these 4 fields are the largest portion:
stdJsonOutput: 0.68MB (717677 bytes)
metadata: 0.51MB (532466 bytes)
stdJsonInput: 0.48MB (503980 bytes)
sources: 0.48MB (503549 bytes)
@marcocastignoli
Copy link
Member

marcocastignoli commented Mar 17, 2025

  • Improve padding of sections' title (now it's 0)
  • Favicon is showed with green tick even if contract doesn't exist
  • Fix editor's bug when a big value is displayed

Image

@marcocastignoli
Copy link
Member

marcocastignoli commented Mar 19, 2025

  • "Download all" button, to download all the files needed to recompile the contract
  • No deprecated chains available

@manuelwedler manuelwedler moved this from Backlog to Sprint - Up Next in Sourcify Public Mar 31, 2025
@kuzdogan kuzdogan moved this from Sprint - Up Next to Sprint - In Progress in Sourcify Public Apr 21, 2025
@kuzdogan kuzdogan moved this from Sprint - In Progress to Sprint - Done in Sourcify Public Apr 24, 2025
@kuzdogan kuzdogan moved this from Sprint - Done to Sprint - Needs Review in Sourcify Public Apr 24, 2025
@github-project-automation github-project-automation bot moved this from Sprint - Needs Review to Sprint - Done in Sourcify Public Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Sprint - Done
Development

No branches or pull requests

3 participants