wighawag / hardhat-deploy-ethers

MIT License
70 stars 25 forks source link

`SignerWithAddress._signTypedData()` missing #7

Closed heri16 closed 1 year ago

heri16 commented 3 years ago

SignerWithAddress._signTypedData() is missing.

See: https://github.com/nomiclabs/hardhat/blob/hardhat-ethers-v2.0.2/packages/hardhat-ethers/src/signers.ts#L40-L44

  public _signTypedData(
    ...params: Parameters<ethers.providers.JsonRpcSigner["_signTypedData"]>
  ): Promise<string> {
    return this._signer._signTypedData(...params);
  }

https://github.com/nomiclabs/hardhat/blame/hardhat-ethers-v2.0.2/packages/hardhat-ethers/src/signers.ts#L40-L44

@wighawag Maybe we should be using git submodules to ensure that any updates to @nomiclabs/hardhat-ethers is integrated seamlessly?

wighawag commented 3 years ago

hardhat-deploy-ethers would like to be an extension to hardhat-ethers but this is issue is blocking : https://github.com/nomiclabs/hardhat/issues/1040

I ll see if I can find some time soon to update hardhat-deploy-ethers

heri16 commented 3 years ago

How can I help?

wighawag commented 3 years ago

@heri16 if you could make a PR that incorporate the changes in @nomiclabs/hardhat-ethers that would be great.

heri16 commented 3 years ago

@heri16 if you could make a PR that incorporate the changes in @nomiclabs/hardhat-ethers that would be great.

@wighawag Added PR #8

heri16 commented 3 years ago

Is it accurate to say that this plugin's main goal is to extend the HardhatRuntimeEnvironment?

ethers: {
      getSignerOrNull: (address: string) => Promise<SignerWithAddress | null>;
      getNamedSigners: () => Promise<Record<string, SignerWithAddress>>;
      getNamedSigner: (name: string) => Promise<SignerWithAddress>;
      getNamedSignerOrNull: (name: string) => Promise<SignerWithAddress | null>;
      getUnnamedSigners: () => Promise<SignerWithAddress[]>;

      getContract: <T extends ethers.Contract>(
        name: string,
        signer?: ethers.Signer | string
      ) => Promise<T>;

      getContractOrNull: <T extends ethers.Contract>(
        name: string,
        signer?: ethers.Signer | string
      ) => Promise<T | null>;
}

And also to change hre.artifacts.readArtifact(name) inside hre.ethers.getContractFactory() to hre.deployments.getArtifact(name)?

heri16 commented 3 years ago

Added PRs to upstream:

  1. https://github.com/nomiclabs/hardhat/pull/1514
  2. https://github.com/nomiclabs/hardhat/pull/1516
wighawag commented 1 year ago

hardhat-deploy-ethers@next has been released Please, try it out.

It is now an extension to hardhat-ethers so you need both

But note that that new version do not support external artifact if you were using them