Skip to content

Commit

Permalink
further testing feedback included
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaversaccio committed Nov 4, 2021
1 parent a242750 commit a933136
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 22 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This plugin will help you make easier and safer usage of the [`CREATE2`](https:/
```bash
npm install --save-dev xdeployer @nomiclabs/hardhat-ethers
```
> **Note:** This plugin uses the optional chaining operator (`?.`). Optional chaining is _not_ supported in Node.js v13 and below.
Import the plugin in your `hardhat.config.js`:
```js
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xdeployer",
"version": "1.0.3",
"version": "1.0.4",
"description": "Hardhat plugin to deploy your smart contracts across multiple EVM chains with the same deterministic address.",
"author": "Pascal Marco Caversaccio",
"license": "MIT",
Expand All @@ -20,6 +20,9 @@
"bugs": {
"url": "https://github.com/pcaversaccio/xdeployer/issues"
},
"engines": {
"node": ">=14.0.0"
},
"scripts": {
"prettier:check": "prettier -c src/**/*.{js,ts} test/**/*.{js,ts}",
"prettier:fix": "prettier --write src/**/*.{js,ts} test/**/*.{js,ts}",
Expand Down
28 changes: 8 additions & 20 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ task(
let initcode: any;
const dir = "./deployments";

console.log(
"The deployment is starting... Please bear with me, this may take a minute or two. Anyway, WAGMI!"
);

if (hre.config.xdeploy.constructorArgsPath && hre.config.xdeploy.contract) {
const args = await import(
path.normalize(
Expand Down Expand Up @@ -109,18 +113,10 @@ task(
path.join(
hre.config.paths.root,
"deployments",
`${hre.config.xdeploy.networks[i]}_depoyment.json`
`${hre.config.xdeploy.networks[i]}_deployment.json`
)
);
fs.writeFile(
saveDir,
JSON.stringify(createReceipt[i]),
function (err) {
if (err) {
console.log(err);
}
}
);
fs.writeFileSync(saveDir, JSON.stringify(createReceipt[i]));

console.log(
`${hre.config.xdeploy.networks[i]} deployment successful with hash: ${createReceipt[i].hash}`,
Expand Down Expand Up @@ -155,18 +151,10 @@ task(
path.join(
hre.config.paths.root,
"deployments",
`${hre.config.xdeploy.networks[i]}_depoyment.json`
`${hre.config.xdeploy.networks[i]}_deployment.json`
)
);
fs.writeFile(
saveDir,
JSON.stringify(createReceipt[i]),
function (err) {
if (err) {
console.log(err);
}
}
);
fs.writeFileSync(saveDir, JSON.stringify(createReceipt[i]));

console.log(
`${hre.config.xdeploy.networks[i]} deployment successful with hash: ${createReceipt[i].hash}`,
Expand Down

0 comments on commit a933136

Please sign in to comment.