Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit 1fcffca

Browse files
committed
contracts eslint fix
1 parent bccb46d commit 1fcffca

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

contracts/bin/deploy.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ const PROVIDER = config.provider || process.env.PROVIDER
1414
class ContractNotFoundError extends Error {}
1515

1616
const addContract = (contracts, contractFilePath) => {
17+
const ctrs = contracts
1718
const fileString = readFileSync(join(contractsDirectory, contractFilePath))
1819
try {
1920
const contract = JSON.parse(fileString)
2021
const name = contract.contractName
2122
console.log(`loaded contract: ${name}`)
22-
contracts[name] = contract
23+
ctrs[name] = contract
2324
return contracts
2425
} catch (err) {
2526
console.error(`Can not parse contract JSON info - path: ${contractFilePath}`)
@@ -55,8 +56,8 @@ const deployContracts = async ({ ctrNames, contracts, defaultAddress, eth }) =>
5556
}
5657

5758
const deploy = () => {
58-
const contracts = contractsFilenames.reduce((contracts, file) => {
59-
return addContract(contracts, file)
59+
const contracts = contractsFilenames.reduce((ctrs, file) => {
60+
return addContract(ctrs, file)
6061
}, {})
6162

6263
;(async () => {
@@ -79,7 +80,8 @@ const deploy = () => {
7980
const contractABIs = await deployContracts({ ctrNames, contracts, defaultAddress, eth })
8081
console.log('Contracts deployed!\n')
8182

82-
const contractAddresses = ctrNames.reduce((infos, contract) => {
83+
const contractAddresses = ctrNames.reduce((ctrInfos, contract) => {
84+
const infos = ctrInfos
8385
const info = contractABIs[contract]
8486
infos[info.name] = info.address
8587
delete contractABIs[contract].address

0 commit comments

Comments
 (0)