Skip to content

Commit

Permalink
chore:Fix the typo and replace 'this' with the class in a static method
Browse files Browse the repository at this point in the history
  • Loading branch information
iosh committed Aug 22, 2024
1 parent c4278b6 commit 4af2558
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ type ContractNameOfContractFuture<ContractFutureT> =

export type AbiOf<ContractDeploymentFutureT> =
ContractDeploymentFutureT extends ContractDeploymentFuture<
infer ContractDepploymentAbiT
infer ContractDeploymentAbi
>
? ContractDepploymentAbiT
? ContractDeploymentAbi
: ContractDeploymentFutureT extends ContractAtFuture<infer ContractAbiT>
? ContractAbiT
: never;
14 changes: 8 additions & 6 deletions packages/hardhat-plugin-viem/src/viem-ignition-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class ViemIgnitionHelper {
Object.entries(ignitionModule.results).map(
async ([name, contractFuture]) => [
name,
await this._getContract(
await ViemIgnitionHelper._getContract(
hre,
contractFuture,
result.contracts[contractFuture.id]
Expand All @@ -199,7 +199,7 @@ export class ViemIgnitionHelper {
);
}

return this._convertContractFutureToViemContract(
return ViemIgnitionHelper._convertContractFutureToViemContract(
hre,
future,
deployedContract
Expand All @@ -215,15 +215,15 @@ export class ViemIgnitionHelper {
case FutureType.NAMED_ARTIFACT_CONTRACT_DEPLOYMENT:
case FutureType.NAMED_ARTIFACT_LIBRARY_DEPLOYMENT:
case FutureType.NAMED_ARTIFACT_CONTRACT_AT:
return this._convertHardhatContractToViemContract(
return ViemIgnitionHelper._convertHardhatContractToViemContract(
hre,
future,
deployedContract
);
case FutureType.CONTRACT_DEPLOYMENT:
case FutureType.LIBRARY_DEPLOYMENT:
case FutureType.CONTRACT_AT:
return this._convertArtifactToViemContract(
return ViemIgnitionHelper._convertArtifactToViemContract(
hre,
future,
deployedContract
Expand All @@ -241,7 +241,7 @@ export class ViemIgnitionHelper {
): Promise<GetContractReturnType> {
return hre.viem.getContractAt(
future.contractName,
this._ensureAddressFormat(deployedContract.address)
ViemIgnitionHelper._ensureAddressFormat(deployedContract.address)
);
}

Expand All @@ -265,7 +265,9 @@ export class ViemIgnitionHelper {

const viem = await import("viem");
const contract = viem.getContract({
address: this._ensureAddressFormat(deployedContract.address),
address: ViemIgnitionHelper._ensureAddressFormat(
deployedContract.address
),
abi: future.artifact.abi,
client: {
public: publicClient,
Expand Down

0 comments on commit 4af2558

Please sign in to comment.