Hello
Can anyone help me with gasless signatures in a contract?
I have created a poling contract. A person can make a poll and the users can choose any option.
But the process of voting is gas-consuming as it updates storage variables.
I want to implement signatures to make it gasless for the voters.
Haven't worked with signatures before, can't find any way to implement it.
Mar 23, 2023, 5:22 AM
Yes, it is possible to implement gasless signatures in a contract. You can use Ethereum's native signature verification methods, such as ecrecover, to verify a signature and determine the sender of a transaction. I think, you will need to create a function in your contract that takes in the signature and the message that was signed. The function should then use the ecrecover method to verify the signature and get the address of the sender. Once you have the address of the sender, you can update the storage variables according to the vote that was cast.
Mar 23, 2023, 5:28 AM
can I DM you ?
anyone??
Mar 23, 2023, 6:48 AM