MinimalForwarder: Invalid request

So i'm trying to run the code from Defender Meta-Transactions Workshop

I changed the code to Kovan testnet , and followed all steps. but I always get Invalid Request whenever I try to relay and i'm not sure what i'm doing wrong, or how to debug it as i have only changed the network in hardhat config file and package.json .

Hey @And_Sama, can you confirm if you have changed the network ID here as well?

Also, have you tried running it on xDAI to see if everything works for you? This would help rule out any issues unrelated to the network change.

I think my issue is related to this. Upon running yarn relay I get

Error: Invalid request
    at relay (/Users/.../workshops/01-defender-meta-txs/autotasks/relay/index.js:15:21)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async handler (/Users/.../workshops/01-defender-meta-txs/autotasks/relay/index.js:35:14)
error Command failed with exit code 1.

@spalladino I just tried changing the network ID, as you suggest above (I'm using Ropsten), but am still getting the same error. Any other suggestions? Thank in advance!

Hmm are you sure the Relayer associated with the RELAY_API_KEY in your .env corresponds to a Relayer on the same network you're working on?

Also, have you updated the package.json to change the networks used in the scripts?

I did all the above:

  • created a kovan relay.
  • changed the network in package.json.
  • and also changed athe network id in the app as suggested. but still have the same error
Error: Invalid request
    at relay (.....workshops\01-defender-meta-txs\autotasks\relay\index.js:15:21)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async handler (.....\workshops\01-defender-meta-txs\autotasks\relay\index.js:35:14)
error Command failed with exit code 1.

Also if i skipped the check, i will get the following error on etherscan.

Fail with error 'MinimalForwarder: signature does not match request'

googling this error, let me to another post which is this one :

but the problem mentioned there seems to be already fixed and resolved .

Yep, the check is in place to prevent you from sending a tx that would fail.

At this point, what I'd suggest is getting a clean clone of the repo, and see if you still get the error by running on xDAI, to rule out any issues with the network change.

I tried running on Xdai , no working faucet there, and this is a live network that cost real money you know.

is there an alternative way to do gasless tx , beside this ?

Have you tried the ones listed https://www.xdaichain.com/for-users/get-xdai-tokens/xdai-faucet? And even if it's real money, txs on xDAI cost pennies.

You can look into https://opengsn.org/

@spalladino Yes, the Relayer associated with the RELAY_API_KEY in my .env file corresponds to the Relayer on the network I'm using.

To confirm, I've updated package.json to change the networks used in the scripts and I'v also updated the network ID for Ropsten (3) in the provider.js file.

Is there anywhere else where I might need to specify/config Relayer or network credentials?

Many thanks for your support!
TC

I followed your advice , clean cloned the repo , made a new relay on xdai...etc. , ran yarn sign, followed by yarn relay and got the following error

Error: call revert exception (method="verify((address,address,uint256,uint256,uint256,bytes),bytes)", errorSignature=null, errorArgs=[null], reason=null, code=CALL_EXCEPTION, version=abi/5.0.12)
    at Logger.makeError (workshops\workshops\01-defender-meta-txs\node_modules\@ethersproject\logger\lib\index.js:179:21)
    at Logger.throwError (workshops\workshops\01-defender-meta-txs\node_modules\@ethersproject\logger\lib\index.js:188:20)00097369676e2d746573740000000000000000000000000000000000000000000000'
    at Interface.decodeFunctionResult (workshops\workshops\01-defender-meta-txs\node_modules\@ethersproject\abi\lib\interface.js:286:23)
    at Contract.<anonymous> (workshops\workshops\01-defender-meta-txs\node_modules\@ethersproject\contracts\lib\index.js:319:56)
    at step (workshops\workshops\01-defender-meta-txs\node_modules\@ethersproject\contracts\lib\index.js:46:23)
    at Object.next (workshops\workshops\01-defender-meta-txs\node_modules\@ethersproject\contracts\lib\index.js:27:53)
    at fulfilled (workshops\workshops\01-defender-meta-txs\node_modules\@ethersproject\contracts\lib\index.js:18:58)000001a0000000000000000000000000840c1b6ce85bbfebcfad737514c0097b078a7e7e000000000
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000
  reason: null,000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000064f2c298be0000000000000000000000000000000000000000000000000000000000000
  code: 'CALL_EXCEPTION',0000000000000000000000000000000000000000097369676e2d7465737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  method: 'verify((address,address,uint256,uint256,uint256,bytes),bytes)',90e5314ad9d15c12e483576dcaac617d1f3cedb1b58f6d8b7f53ef255f32602d997012af36d9386f5571b00000000000000000000000000000000000000000000000000000000000000'
  errorSignature: null,
  errorArgs: [ null ],8E7394D2303F2aB3C731c36072Fd3',
  address: '0xB2819af7aAa8E7394D2303F2aB3C731c36072Fd3',
  args: [
    {
      value: 0,ailed with exit code 1.
      gas: 1000000,yarnpkg.com/en/docs/cli/run for documentation about this command.
      nonce: '0',
      to: '0x54189C6F7e3EEBA3d988A047934bE3365B38A011',defender-meta-txs>yarn relay
      from: '0x840C1b6ce85bBFEbcFAd737514c0097B078a7E7E',
      data: '0xf2c298be000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000097369676e2d746573740000000000000000000000000000000000000000000000'
    },
    '0xc336908afb0f5bb4594dac1fdd7a50ce0a7554f7f35c790e5314ad9d15c12e483576dcaac617d1f3cedb1b58f6d8b7f53ef255f32602d997012af36d9386f5571b'
  ],
  transaction: {
    data: '0xbf5d3bdb000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000840c1b6ce85bbfebcfad737514c0097b078a7e7e00000000000000000000000054189c6f7e3eeba3d988a047934be3365b38a011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000064f2c298be000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000097369676e2d746573740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041c336908afb0f5bb4594dac1fdd7a50ce0a7554f7f35c790e5314ad9d15c12e483576dcaac617d1f3cedb1b58f6d8b7f53ef255f32602d997012af36d9386f5571b00000000000000000000000000000000000000000000000000000000000000',
    to: '0xB2819af7aAa8E7394D2303F2aB3C731c36072Fd3',
    from: '0xeefb9a200fda3ae68a5a9075b0320cac1ead740b'
  }
}
error Command failed with exit code 1.

I did try to redeploy both the registry and minimal forwarder contracts but seems i dont have enough xdai for that.