Currently, I have a Dapp that cannot rely on the users having their own Metamask accounts or Ethereum nodes. I plan to create a frontend that allows the users to interact with a deployed Ethereum Contract through Infura, but I've run into a snag. I can read from the contract just fine, but I cannot write to it through the frontend, as any attempt to do so results in:

Uncaught Error: invalid address

A spot of research suggests to me that this is because, well, Infura cannot access my Ethereum address. I was also recommended to use ProviderEngine to deal with this, but I am having great difficulty in finding more specific information and examples. Can anyone give me a hand with puzzling out exactly how this should work?



The whole point to using a blockchain contract is to let users cast their votes using either your frontend ( metamask ) or directly using the blockchain, where you as the deploying entity has no ability to censor or manipulate the data.

Your use case might require you to validate users, which is fine. Just setup a portal where people sign up and tie their ethereum wallet address to an entity in your database, then when validated you insert them into a whitelist inside the contract, which then lets them vote.

But in no case you save their vote for them, or hold their private keys for them in order to do so.

The idea is to have their wallet be the one that signs the message to actually vote.

If any of these represent an issue, then you really need to question why you're actually using the blockchain instead of a plain old SQL database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.