Skip to content

Use reusable MDX template to DRY-ify the deployment tables #301

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

Open
PaulRBerg opened this issue Apr 12, 2025 · 0 comments · May be fixed by #308
Open

Use reusable MDX template to DRY-ify the deployment tables #301

PaulRBerg opened this issue Apr 12, 2025 · 0 comments · May be fixed by #308

Comments

@PaulRBerg
Copy link
Member

Problem

Page: https://github.com/sablier-labs/docs/blob/1959c2eeb5e4ca71e2ff65ff530b865ed9ec2c60/docs/guides/lockup/02-deployments.mdx

  • Poor developer experience: the rows in the tables no longer fit on a single line
  • There's a lot of repetition
    • Links like core-v1-2-0 are duplicated 148 times
    • The blockchain explorer is duplicated many times, too
  • The first two issues combined makes this page prone to errors (when errors are made)

Solution

Refactor this:

| Contract            | Address                                                                                                               | Deployment                                                                           |
| :------------------ | :-------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- |
| SablierLockup       | [0x7C01AA3783577E15fD7e272443D44B92d5b21056](https://etherscan.io/address/0x7C01AA3783577E15fD7e272443D44B92d5b21056) | [lockup-v2.0.0](https://github.com/sablier-labs/deployments/blob/main/lockup/v2.0.0) |
| SablierBatchLockup  | [0x3F6E8a8Cffe377c4649aCeB01e6F20c60fAA356c](https://etherscan.io/address/0x3F6E8a8Cffe377c4649aCeB01e6F20c60fAA356c) | [lockup-v2.0.0](https://github.com/sablier-labs/deployments/blob/main/lockup/v2.0.0) |
| LockupNFTDescriptor | [0xA9dC6878C979B5cc1d98a1803F0664ad725A1f56](https://etherscan.io/address/0xA9dC6878C979B5cc1d98a1803F0664ad725A1f56) | [lockup-v2.0.0](https://github.com/sablier-labs/deployments/blob/main/lockup/v2.0.0) |
| Helpers             | [0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc](https://etherscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [lockup-v2.0.0](https://github.com/sablier-labs/deployments/blob/main/lockup/v2.0.0) |
| VestingMath         | [0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d](https://etherscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [lockup-v2.0.0](https://github.com/sablier-labs/deployments/blob/main/lockup/v2.0.0) |

Into something like this:

import DeploymentTable from "@site/src/snippets/DeploymentTable";

<DeploymentTable product="Lockup" version="v2.0.0" chain="ethereum-mainnet"/>

And the DeploymentTable snippet would render the appropriate Markdown table.

If this doesn't work, we might have to build a React component instead of an MDX snippet.

Planning

This task should be implemented AFTER #300.

@PaulRBerg PaulRBerg linked a pull request Apr 22, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant