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

Integrate sphinx for deployment #840

Merged
merged 7 commits into from
Mar 20, 2024

Conversation

smol-ninja
Copy link
Member

@smol-ninja smol-ninja commented Mar 7, 2024

  • Adds runBroadcast and runSphinx to support deployments via both forge script and sphinx plugin.
  • Sphinx Deployment command has been updated on Warp drive under "Deploy via Sphinx" folder.
  • Rename env ETH_FROM to EOA in line with Sphinx configurations.

@smol-ninja smol-ninja force-pushed the build/integrate-sphinx-for-deployments branch from c6a4ad2 to 398d01c Compare March 7, 2024 19:29
@smol-ninja smol-ninja changed the title [wip] Integrate sphinx for deployment Integrate sphinx for deployment Mar 7, 2024
@smol-ninja smol-ninja force-pushed the build/integrate-sphinx-for-deployments branch from 398d01c to 0298d8b Compare March 8, 2024 12:34
@smol-ninja smol-ninja requested a review from andreivladbrg March 8, 2024 12:46
@smol-ninja smol-ninja force-pushed the build/integrate-sphinx-for-deployments branch 3 times, most recently from 06cb780 to 41897d0 Compare March 14, 2024 12:29
@smol-ninja
Copy link
Member Author

@andreivladbrg can you please review this PR?

Copy link
Member

@andreivladbrg andreivladbrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally looks good

what if we keep the broadcast modifier, and support both types of deployments?

Deploy Core script example
function runSphinx(address initialAdmin)
        public
        virtual
        sphinx
        returns (
            SablierV2LockupDynamic lockupDynamic,
            SablierV2LockupLinear lockupLinear,
            SablierV2LockupTranched lockupTranched,
            SablierV2NFTDescriptor nftDescriptor
        )
    {
        (lockupDynamic, lockupLinear, lockupTranched, nftDescriptor) = _run(initialAdmin);
    }

    function runBroadcast(address initialAdmin)
        public
        virtual
        broadcast
        returns (
            SablierV2LockupDynamic lockupDynamic,
            SablierV2LockupLinear lockupLinear,
            SablierV2LockupTranched lockupTranched,
            SablierV2NFTDescriptor nftDescriptor
        )
    {
        (lockupDynamic, lockupLinear, lockupTranched, nftDescriptor) = _run(initialAdmin);
    }

    function _run(address initialAdmin)
        internal
        returns (
            SablierV2LockupDynamic lockupDynamic,
            SablierV2LockupLinear lockupLinear,
            SablierV2LockupTranched lockupTranched,
            SablierV2NFTDescriptor nftDescriptor
        )
    {
        nftDescriptor = new SablierV2NFTDescriptor();
        lockupDynamic = new SablierV2LockupDynamic(initialAdmin, nftDescriptor, maxCount);
        lockupLinear = new SablierV2LockupLinear(initialAdmin, nftDescriptor);
        lockupTranched = new SablierV2LockupTranched(initialAdmin, nftDescriptor, maxCount);
    }

so we run the CLIs:

  • forge script script/DeployCore.s.sol --rpc-url sepolia --sig "runBroadcast(address)" $ADMIN
  • bun sphinx propose script/DeployCore.s.sol --networks testnets --sig "runSphinx(address)" $ADMIN

script/Base.s.sol Show resolved Hide resolved
@smol-ninja smol-ninja force-pushed the build/integrate-sphinx-for-deployments branch from 2019b34 to d4a3f9f Compare March 17, 2024 13:44
Copy link
Member

@andreivladbrg andreivladbrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: we should update warp drive accordingly

@smol-ninja
Copy link
Member Author

@andreivladbrg can you please have a final look at the latest commit? If good, I will merge it.

@smol-ninja smol-ninja force-pushed the build/integrate-sphinx-for-deployments branch from 3c16269 to f4187a4 Compare March 20, 2024 15:59
@smol-ninja smol-ninja merged commit 638b3b4 into staging Mar 20, 2024
8 of 9 checks passed
@smol-ninja smol-ninja deleted the build/integrate-sphinx-for-deployments branch March 20, 2024 16:32
@PaulRBerg
Copy link
Member

just came here to say that I love the fact that Warp Drive gets mentioned in our GitHub PRs

Such a useful feature!

andreivladbrg added a commit that referenced this pull request Jul 3, 2024
* build: integrate sphinx for deployment

* build: bump sphinx

* build: add runSphinx and runBroadcast in scripts

* docs: use dev natspec tag

* build: add sphinxProjectName

* chore: add SPHINX_PROJECT_NAME in .env.example

* docs: include SPHINX_PROJECT_NAME in constructor natspec

---------

Co-authored-by: andreivladbrg <andreivladbrg@gmail.com>
andreivladbrg added a commit that referenced this pull request Jul 3, 2024
* build: integrate sphinx for deployment

* build: bump sphinx

* build: add runSphinx and runBroadcast in scripts

* docs: use dev natspec tag

* build: add sphinxProjectName

* chore: add SPHINX_PROJECT_NAME in .env.example

* docs: include SPHINX_PROJECT_NAME in constructor natspec

---------

Co-authored-by: andreivladbrg <andreivladbrg@gmail.com>
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 this pull request may close these issues.

3 participants