-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
hardhat-ethers.SignerWithAddress.signMessage broken on hardhat network #1972
Comments
This issue seems to be some new-ish regression. |
Thanks for reporting this @cytadela8. This seems to be a change introduced in function sign(address: string, data: string) {
return hre.network.provider.send(
"eth_sign",
[address, ethers.utils.hexlify(ethers.utils.toUtf8Bytes('foo'))]
)
}
// ...
const [signer] = await ethers.getSigners()
const signed = await sign(signer.address, 'test') I guess we should implement the |
Thanks for reporting this, @cytadela8. I'll close this issue, as I just opened one more specific. |
* feat: ➕ add in `package.json`: hardhat-deploy community plugin + dotenv Enable to write deployment scripts for specific networks, providing private key in `.env` file * feat: 🔨 add simple UniversalProfile deployment script * chore: 🙈 add deployments/ folder in `.gitignore` * chore: 🔧 change `hardhat.config.ts` with new L14 RPC rpc endpoint * chore: create deployment script for standard contracts * chore: 🔨 add deployment scripts for base contracts (for proxy usage) * chore: edit gasPrice provided to ensure deployment + correct 'standard' tags * fix: 🐛 initialize base contracts to the zero address after deployment * refactor: use fix gasPrice to ensure deployment on L14 * refactor: use "base" flag to deploy base contracts (to be used behind proxies) * build: 📦 add hardhat-deploy + .env dependencies in `package-lock.json` `.env` file required to add private key into and deploy on L14 * build: ➖ remove `dotenv` dependency * ci: 💚 fix failing CI by sticking to ethers < 5.5.0 See this issue: NomicFoundation/hardhat#1972 * ci: 💚 fix MythX failing CI * ci: 💚 fix MythX for tokens contracts paths * refactor: 🚚 use new contracts names in deployment scripts * ci: 💚 update `package-lock` to fix CI test failing * refactor: ⚰️ remove deployment scripts for `LSP7` and `LSP8` this contract are unusable as standalone, and need to be implemented * docs: 📝 add documentation for deployment scripts in `CONTRIBUTING.md` * refactor: 🚚 fix contract paths for MythX CI * docs: 📝 add explanation for tags `standard` and `base` + fix typo * docs: remove `>` (blockquote) to display available `--tags` * refactor: display gasLimit with `_` thousand seperators * docs: create `DEPLOYMENT.md` page with ref from README
attempting to sign messages in test using, ex: signer.signMessage('test') was throwing MethodNotFoundError: Method personal_sign not found rolling back to 5.4.x seems to have removed this error for now. see for reference: NomicFoundation/hardhat#1972
Summary
Calling
signMessage
on a signer returned byethers.getSigners()
when using hardhat network results with following error:Code
Test producing the above error:
Full repository with the test failing: https://github.com/cytadela8/hardhat-issue-sign-failed/
Steps to reproduce
The text was updated successfully, but these errors were encountered: