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
Can't deploy contract #239
Comments
Could you share a bit more context - what are you trying to achieve and if possible the code of the smart contract in a txt format so that we can debug? |
\hedera\node_modules@hethers\logger\lib\index.js:186 Error: transaction 0.0.48162428@1663101679.615115293 failed precheck with status INVALID_SIGNATURE (code=INVALID_SIGNATURE, version=providers/1.2.1) |
We are trying to submit a small smart contract on hedera DLT using hethers. If needed I can share sample index.js for review/comments. |
We suspect that it might be related to the way the wallet was initialized. You could take a look at the docs: https://docs.hedera.com/hethers/application-programming-interface/signers#new-hethers.wallet-less-than-externallyownedaccount-greater-than-provider |
node .\hethers_test.js Error: transaction 0.0.48162428@1663162799.267505558 failed precheck with status INVALID_SIGNATURE (code=INVALID_SIGNATURE, version=providers/1.2.1) |
|
Provisioned wallet with eoaAccount way with account and privatekey ( Note this is on testnet hence sharing keys/account Id). Thanks in advance for your support. |
Hi @yogeshrt I think the privateKey is the issue as it should be without the 0x prefix. Could you try and let us know if this works? |
@Kalina-Todorova I was about to resolve issues with the below notes
Note: This program requires cleanup. But the scenario is successfully tested with it. |
#234 This commit mentioned adding support for ED25519, but not sure why we still require the ECDSA key with hethers. |
I experienced the same issue. Initializing a wallet using a non-ECDSA private key was the issue. Some options now include: const wallet = new hethers.Wallet({
account: accountId,
privateKey: privateKey,
isED25519Type: true,
}); |
Let us will look into it and get back to you |
@bmino Hi, just tried to create new accounts (ECDSA and ED25519) on testnet, and both works fine. Also, tried to pass the private key with and without the 0x prefix, still working. If you still having a issue, I could send a fully working code snippet with contract deployment or you can post yours and I would try to debug it.
const provider = hethers.providers.getDefaultProvider('testnet');
const eoaAccount = {
account: '0.0.28542425',
privateKey: '0x...',
isED25519Type: true
};
// @ts-ignore
const wallet = new hethers.Wallet(eoaAccount, provider);
const provider = hethers.providers.getDefaultProvider('testnet');
const eoaAccount = {
account: '0.0.48647112',
privateKey: '0x...'
};
// @ts-ignore
const wallet = new hethers.Wallet(eoaAccount, provider); |
Note: Not all sections may be relevant, but please be as thorough while remaining concise as possible. Remove this Notice and any sections that don't feel pertinent.
If you are unsure if something is a bug, start a thread in the "discussions" tab above..
Describe the bug
A clear and concise description of what the bug is.
Reproduction steps
Please include code snippets, with console.log output, any contract ABI, contract address, network and the full error.
Environment:
Please include anything that may be useful in diagnosing the issue. Node vs Browser? Geth vs Parity vs Ganache? Third Party tools, like Hardhat? Mobile vs. Desktop?
Search Terms
Often similar issues have come up before. Include any search terms you have tried in this repository's Issues (including closed issues) and "Discussions", so if there are matching issues, we can be sure to add those keywords and link this issue to it, making it easier for people to find in the future.
The text was updated successfully, but these errors were encountered: