3

I can't execute a send transaction method of my smart contract from the frontend by Alchemy

I am a beginner and I am trying to execute a method from my frontend that sends a transaction to the blockchain but I get an error from alchemy saying that the transaction needs to be signed with my private key but I have no idea how to do this and I did not find anything similar In Internet

Error in the front: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'transactionHash')

Error in Alchemy: Unsupported method: eth_sendTransaction. Alchemy does not hold users' private keys. See available methods at https://docs.alchemy.com/alchemy/documentation/apis

Error in Alchemy: { "jsonrpc": "2.0", "error": { "code": -32600, "message": "Unsupported method: eth_sendTransaction. Alchemy does not hold users' private keys. See available methods at https://docs.alchemy.com/alchemy/documentation/apis" }, "id": 4 }

  • You have no account/signer imported. People might not know the alchemy "frontend" maybe you can specify your problem of importing a signer. – Derawi Aug 01 '22 at 14:43

1 Answers1

0

I solved it thanks to this video https://www.youtube.com/watch?v=IKpUKmPTHjg&lc=UgxIii8MVxKe6XnAK694AaABAg&ab_channel=web3c%C3%A0fe

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 05 '22 at 23:54