-
Notifications
You must be signed in to change notification settings - Fork 48
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
Conversation
c6a4ad2
to
398d01c
Compare
398d01c
to
0298d8b
Compare
06cb780
to
41897d0
Compare
@andreivladbrg can you please review this PR? |
There was a problem hiding this 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
2019b34
to
d4a3f9f
Compare
There was a problem hiding this 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
@andreivladbrg can you please have a final look at the latest commit? If good, I will merge it. |
3c16269
to
f4187a4
Compare
just came here to say that I love the fact that Warp Drive gets mentioned in our GitHub PRs Such a useful feature! |
* 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>
* 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>
runBroadcast
andrunSphinx
to support deployments via both forge script and sphinx plugin.ETH_FROM
toEOA
in line with Sphinx configurations.