I would like to prepare a test code for a smart contract using @openzeppelin/contracts/metatx/ERC2771Forwarder.sol.
I have created a test code referring to the file under the test folder, but an error occurs in the verify method of the forwarder contract. I believe there is a problem with the signature data, but I would like to know if you know of a specific fix.
24 passing (7s)
1 failing
1) Upgradable NFT contract's test
MetaTransaction
Gasless tranfer NFT:
Error: VM Exception while processing transaction: reverted with custom error 'ERC2771ForwarderInvalidSigner("0x6e1B8e2C47a6ae080eEdaA9264055c20cc414744", "0x70997970C51812dc3A010C7d01b50e0d17dc79C8")'
at ERC2771ForwarderMock.executeBatch (@openzeppelin/contracts/metatx/ERC2771Forwarder.sol:182)
at ERC2771ForwarderMock.execute (@openzeppelin/contracts/metatx/ERC2771Forwarder.sol:134)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Why from address & recovered address are not match??
I would like to prepare a test code for a smart contract using
@openzeppelin/contracts/metatx/ERC2771Forwarder.sol
.I have created a test code referring to the file under the test folder, but an error occurs in the verify method of the forwarder contract. I believe there is a problem with the signature data, but I would like to know if you know of a specific fix.
My Forwarder Contract code is here
My Test code is here
helper's code is here
test code's result is here
Why from address & recovered address are not match??