Many errors in 25-defender-metatx-api
SKYBITDev3 opened this issue · 2 comments
I've just tried the meta-transactions demo but found many errors when just following the instructions. It seems that it was published without checking that it works beforehand, which is bad practise.
Please fix all errors so that it actually runs.
e.g.:
Replace forwarder.verify(request, signature)
with forwarder.verify(forwardRequestData)
where forwardRequestData
corresponds with ForwardRequestData.
Add deadline
to the request
.
Should EIP712Domain
have salt
?
Replace API_KEY
with RELAYER_API_KEY
and API_SECRET
with RELAYER_API_SECRET
in various files.
Replace apiKey
with relayerApiKey
and apiSecret
with relayerApiSecret
in the call to handler()
.
Agreed, would love to see an actual working example, it seems the forwarder contract has also been upgraded, while the demo is calling another one.
For example, the verify
function needs deadline
and signature
as parameters now.
forwarder.getNonce
is also not a function on the forwarder contract whereas it actually nonces
now.
yarn relay
wouldn't really work and gives Error: Cannot find module '../action/'
if I copy the code in action to relay.js
, it'll say 'too many arguments: passed to contract'
, since forwarder.verify
only accepts only one parameter
After I reconstruct the request parameter according to ERC2771Forwarder.sol
, it'll finally give me an error Error: Invalid request
, which I don't know how to fix it anymore.
Hey @zijianwang90 , i'm with the same problem (After I reconstruct the request parameter according to ERC2771Forwarder.sol, it'll finally give me an error Error: Invalid request, which I don't know how to fix it anymore.)
I could solve the others but still show the Invalid Request.
Did you manage to solve it ?
thanks in advance