How to send a transaction using Ethersjs with data parameter from the frontend? #2654
Unanswered
alankrit-01
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to send a transaction from the front end with some data. Ethersjs docs say the
unsignedTransaction.data
should be of the type BytesLike. In the frontend I made the HTML input field as text and converting the value into byteslike usingethers.utils.hexlify()
I am getting this error:What am I doing wrong here?
Solidity Function to be called:
Frontend form in react:
Beta Was this translation helpful? Give feedback.
All reactions