@grimreaper619 are there any resources to code what I'm trying to code?
May 27, 2022, 4:21 PM
Help my dev please ^ 🙏
May 27, 2022, 4:28 PM
Well its pretty straightforward. You already have the v,r,s and transaction data is message in this case
May 27, 2022, 4:30 PM
@grimreaper619
May 27, 2022, 4:30 PM
Transaction data either keccack-ed or abi encoded, not sure about that actually
May 27, 2022, 4:31 PM
@grimreaper619 this is an example of the signed tx
0xf8ed82a8a085028fa6ae018306b6c0945b55f1da66c1eb7253dea4cb22cb5957b44dca0e80b884c9e3b8020000000000000000000000002d2556b5174134c33d819826b3e933a9bf0647fb00000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000004eb33ae215e4c3f8d141534f75f0f891f4887e5e00000000000000000000000000000000000000000000000000000000000000198194a0998a52d52b447db3b944b8a1b87c270f15b8499c0e56f917a3c8ce6e8f2b657da01a7be9fd811c537105fd75a1576150b60fe45e673fb760b0c944e51cf983c530
Need to decode this and get the signer, it has all the data. I put it in ethereum decoder sites and it works
Just need to do it in solidity
May 27, 2022, 4:33 PM
Just think: is the message larger than p. If it is, you can't sign it w/o hashing
May 27, 2022, 4:33 PM
Well yeah, isn't that why we abi encode it?
May 27, 2022, 4:34 PM
Abi encoding does not compress
Hashing compresses it
Abi encoding is just a fancy kind of concatenation
May 27, 2022, 4:35 PM
Oh I wasn't aware of that
But how come metamask identify the message if its hashed?
May 27, 2022, 4:38 PM
When you give a message to metamask, you don't pass the hash. You pass the actual message
Also: that way, the message gets prefixed with the 'ethereum signed message' string (and the messages's length) before it is hashed and signed
This is to prevent web services from tricking users into signing txs
May 27, 2022, 4:41 PM
So metamask hashes the message for us, including the ethereum prefix?
May 27, 2022, 4:42 PM
Yes
It also hashes the tx for you when you're signing a tx via metamask
May 27, 2022, 4:45 PM
Ah makes sense. Thanks for explaining :)
May 27, 2022, 4:45 PM
Legacy
May 27, 2022, 4:47 PM
Afaik then you can check the yellowpaper (not entirely sure). But I'm not near my computer rn so for me it's difficult to point out the right location
May 27, 2022, 4:48 PM