I am working on the Hedera network.
We are currently trying to test and verify that your wonderful library works on our environment.
SO now I am currently working on the [ERC2771] setup.
Trying to test the setup with Hardhat/Ethers.
I have a [Forwarder] -> (.../OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/metatx/ERC2771Forwarder.sol) contract instance and a [Context] -> (.../OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/metatx/ERC2771Context.sol) contract instance deployed.
Here are some steps that I have done so far:
I am creating a transaction object using the populateTransaction api on the contract. with the method I want to call with my Meta transaction
Signing it with the ethers function for signing typed transactions: _signTypedData
Adding the signature to the transaction object
Seding it to the verify function form the Forwarder.sol
The verify function returns the wrong address.
Not the address of wallet2 in the GIST.
As a side question ...can you please satisfy my curiosity.
How are we expecting to verify the address from the Request object ... when you guys are adding some additional fields (some of them static) to the ABI encode here :
How are we expecting to verify the address from the Request object ... when you guys are adding some additional fields (some of them static) to the ABI encode here
Hey @Stefan_Stefanov, I think this issue in Github will provide you better context on why the typehash differs from the actual ForwardRequestData type
If you need some ethers.js reference for verifying a signature, please refer to the tests (although not merged yet) or their Solidity version