hardhat-ethernal icon indicating copy to clipboard operation
hardhat-ethernal copied to clipboard

FR: provide a Hardhat task "ethernal:push"

Open aspiers opened this issue 2 years ago • 2 comments

The docs explain that hardhat deploy scripts can be extended to push newly deployed artifacts to Ethernal:

await hre.ethernal.push({
    name: 'Greeter',
    address: greeter.address
});

However this requires tedious and repetitive modification of all deploy scripts. It would be awesome if as an alternative, the plugin also provided a new task so that you could just type

hardhat ethernal:push Greeter1 Greeter2 ...

to push artifacts for one or more contracts, or even omit the contract list altogether to push all known artifacts:

hardhat ethernal:push

I'm guessing this would require integration with wighawag/hardhat-deploy in order to retrieve the persisted artifacts and deployed addresses, since that plugin would allow hardhat-ethernal to automate things like:

const contract = hre.ethers.getContract('Greeter');
await hre.ethernal.push({
    name: contract.name
    address: contract.address
});

aspiers avatar Mar 16 '22 18:03 aspiers

See my issue #31 friend!

olivmath avatar Sep 16 '22 02:09 olivmath

@olivmath, I think he meant a way of pushing multiple contracts at once and through the CLI :)

antoinedc avatar Sep 16 '22 06:09 antoinedc