redspot
redspot copied to clipboard
[feature request] Add `deploy` functionality
For bigger projects, it would be nice to have deploy
functionality, similar to hardhat.
Basically, instead of writing individual scripts, a developer would write the deploy functions, which would execute synchronously within one API instance (instead of doing for script in ./deploy/*; do npx redspot run "$script" --no-compile; done
, which would in turn connect and disconnect node API).
As far as I know, hardhat doesn't provide a deploy command either, https://hardhat.org/tutorial/deploying-to-a-live-network.html#_7-deploying-to-a-live-network. Did I miss something?
You mean the deploy function? Can't this function work? https://github.com/patractlabs/redspot/blob/master/examples/erc20/scripts/deploy.ts#L24
As far as I know, hardhat doesn't provide a deploy command either, https://hardhat.org/tutorial/deploying-to-a-live-network.html#_7-deploying-to-a-live-network. Did I miss something?
Hardhat indeed does not provide hardhat deploy
command. It is done by hardhat-deploy
plugin. I was curious, if you'd be interested in having such in Redspot.
You mean the deploy function? Can't this function work? https://github.com/patractlabs/redspot/blob/master/examples/erc20/scripts/deploy.ts#L24
This works yeah, but as soon as we get to deploying 15-20 contracts, the deploy file gets convoluted and there is an urge to logically separate the deploys. Obviously, we can do this separation into functions (each function deploys one contract), but that'd mean that we lose dependency management, metadata about each deployment and so on. Please see hardhat-deploy readme.
Well, I think it does look OK. We'll add this in the next version.