Skip to content

Commit c47f662

Browse files
authored
refactor(getContractAbi): remove stringify of the ABI (#242)
* refactor(getContractAbi): remove stringify of the ABI * format: address comment from the PR
1 parent 90337ce commit c47f662

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

deployments/getContractAddress.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,15 @@ export const getNetworkName = (network: ethers.providers.Networkish) => {
4444
};
4545

4646
// ts-prune-ignore-next
47-
export const getContractAbi = (contractTag: string, network: ethers.providers.Networkish): string => {
47+
export const getContractAbi = (contractTag: string, network: ethers.providers.Networkish) => {
4848
try {
4949
const fileName = getContractPath(contractTag, network);
5050
const contractJSON = fs.readFileSync(fileName).toString();
51-
const abi = JSON.parse(contractJSON).abi
52-
return JSON.stringify(abi)
51+
return JSON.parse(contractJSON).abi;
5352
} catch (err) {
5453
console.log(err);
5554
}
56-
57-
return '0x0'
55+
return {};
5856
};
5957

6058
const getContractAddress = (

0 commit comments

Comments
 (0)