Skip to content

Commit

Permalink
read deployed smart contract addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Oct 18, 2022
1 parent 533d00f commit 2ba5046
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/check-deployment.ts
@@ -1,6 +1,6 @@
/* eslint-disable no-console */
import '@nomiclabs/hardhat-ethers';
import { ethers } from 'hardhat';
import { deployments, ethers } from 'hardhat';

/**
* main function
Expand All @@ -9,11 +9,27 @@ async function main() {
const [owner] = await ethers.getSigners();
const chainId = await owner.getChainId();

const masaDeployed = await deployments.get("MASA");
const soulboundIdentityDeployed = await deployments.get("SoulboundIdentity");
const soulboundCreditReportDeployed = await deployments.get("SoulboundCreditReport");
const soulNameDeployed = await deployments.get("SoulName");
const soulStoreDeployed = await deployments.get("SoulStore");
const soulLinkerDeployed = await deployments.get("SoulLinker");

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

console.log('');

console.log(`MASA address: ${masaDeployed.address}`);
console.log(`SoulboundIdentity address: ${soulboundIdentityDeployed.address}`);
console.log(`SoulboundCreditReport address: ${soulboundCreditReportDeployed.address}`);
console.log(`SoulName address: ${soulNameDeployed.address}`);
console.log(`SoulStore address: ${soulStoreDeployed.address}`);
console.log(`SoulLinker address: ${soulLinkerDeployed.address}`);

console.log('==============================================================================');
}

main()
Expand Down

0 comments on commit 2ba5046

Please sign in to comment.