Skip to content

Commit

Permalink
add check-deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Oct 18, 2022
1 parent 21da70a commit 533d00f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -24,7 +24,8 @@
"test": "hardhat test",
"prettier": "prettier --write 'contracts/**/*.sol' '**/*.ts' '**/*.js'",
"solhint": "solhint contracts/**/*.sol",
"release": "GITHUB_TOKEN=$(grep GITHUB_TOKEN .env | cut -d '=' -f2) release-it"
"release": "GITHUB_TOKEN=$(grep GITHUB_TOKEN .env | cut -d '=' -f2) release-it",
"check-deployment:goerli": "hardhat run --network goerli src/check-deployment.ts"
},
"dependencies": {
"ethers": "^5.6.9"
Expand Down
24 changes: 24 additions & 0 deletions src/check-deployment.ts
@@ -0,0 +1,24 @@
/* eslint-disable no-console */
import '@nomiclabs/hardhat-ethers';
import { ethers } from 'hardhat';

/**
* main function
*/
async function main() {
const [owner] = await ethers.getSigners();
const chainId = await owner.getChainId();

console.log('==============================================================================');
console.log(`Account address: ${owner.address}`);
console.log(`ChainId: ${chainId}`);

console.log('');
}

main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});

0 comments on commit 533d00f

Please sign in to comment.