diff --git a/libs/ghaction-helper/src/artifacts-helper.ts b/libs/ghaction-helper/src/artifacts-helper.ts index 3cc02ff9b5..315de14e3e 100644 --- a/libs/ghaction-helper/src/artifacts-helper.ts +++ b/libs/ghaction-helper/src/artifacts-helper.ts @@ -13,7 +13,7 @@ export async function getArtifactsByContractName (contractIdentifier: string) { const artifact = await fs.readFile(path.join(global.remixContractArtifactsPath, artifactFile), 'utf-8') const artifactJSON: CompilationResult = JSON.parse(artifact) const contractFullPath = (Object.keys(artifactJSON.contracts!)).find((contractName) => artifactJSON.contracts![contractName] && artifactJSON.contracts![contractName][contractIdentifier]) - + contract = contractFullPath ? artifactJSON.contracts![contractFullPath!][contractIdentifier] : undefined if (contract) break } diff --git a/libs/ghaction-helper/src/ethers.ts b/libs/ghaction-helper/src/ethers.ts index d3941e6dd4..9be004426a 100644 --- a/libs/ghaction-helper/src/ethers.ts +++ b/libs/ghaction-helper/src/ethers.ts @@ -2,7 +2,7 @@ import { ethers } from 'ethers' import * as hhEtherMethods from './methods' -for(const method in hhEtherMethods) Object.defineProperty(ethers, method, { value: hhEtherMethods[method]}) +for (const method in hhEtherMethods) Object.defineProperty(ethers, method, { value: hhEtherMethods[method] }) export * from 'ethers' export { ethers } \ No newline at end of file diff --git a/libs/ghaction-helper/src/methods.ts b/libs/ghaction-helper/src/methods.ts index 9bfa470033..793d904db8 100644 --- a/libs/ghaction-helper/src/methods.ts +++ b/libs/ghaction-helper/src/methods.ts @@ -11,7 +11,7 @@ const providerConfig = { blockNumber: global.blockNumber || null } -const config = { defaultTransactionType: '0x0' } +const config = { defaultTransactionType: '0x0' } global.remixProvider = new Provider(providerConfig) global.remixProvider.init() global.web3Provider = new ethers.providers.Web3Provider(global.remixProvider) @@ -194,9 +194,9 @@ const getContractAt = async (contractNameOrABI: ethers.ContractInterface, addres //@ts-ignore const provider = web3Provider - if(typeof contractNameOrABI === 'string') { + if (typeof contractNameOrABI === 'string') { const result = await getArtifactsByContractName(contractNameOrABI) - + if (result) { return new ethers.Contract(address, result.abi, signer || provider.getSigner()) } else {