Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignerWithAddress._signTypedData() missing #7

Closed
heri16 opened this issue Jun 4, 2021 · 7 comments
Closed

SignerWithAddress._signTypedData() missing #7

heri16 opened this issue Jun 4, 2021 · 7 comments

Comments

@heri16
Copy link

heri16 commented Jun 4, 2021

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
Copy link
Owner

wighawag commented Jun 4, 2021

hardhat-deploy-ethers would like to be an extension to hardhat-ethers but this is issue is blocking : NomicFoundation/hardhat#1040

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

@heri16
Copy link
Author

heri16 commented Jun 5, 2021

How can I help?

@wighawag
Copy link
Owner

wighawag commented Jun 5, 2021

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

@heri16
Copy link
Author

heri16 commented Jun 7, 2021

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

@wighawag Added PR #8

@heri16
Copy link
Author

heri16 commented Jun 7, 2021

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)?

@wighawag
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants