# MinimalForwarder: Invalid request

**URL:** <https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520>\
**Category:** Defender\
**Tags:** erc721, defender\
**Created:** [November 23, 2021, 9:24am UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520 "2021-11-23T09:24:15Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![And\_Sama](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@And\_Sama](https://forum.openzeppelin.com/u/And_Sama)\
**Post date:** [November 23, 2021, 9:24am UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/1 "2021-11-23T09:24:15Z")

</div>

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

> **[workshops/01-defender-meta-txs at master · OpenZeppelin/workshops](https://github.com/OpenZeppelin/workshops/tree/master/01-defender-meta-txs)**
>
> master/01-defender-meta-txs

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 .

---

<div class="post-metadata">

**Author:** ![spalladino](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/spalladino/32/22_2.png) [@spalladino](https://forum.openzeppelin.com/u/spalladino)\
**Post date:** [November 24, 2021, 3:09pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/2 "2021-11-24T15:09:30Z")

</div>

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

> <https://github.com/OpenZeppelin/workshops/blob/6a31d71e82d0b151a8f552727819382a7351b5c7/01-defender-meta-txs/app/src/eth/provider.js#L11>

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.

---

<div class="post-metadata">

**Author:** ![tcassini](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@tcassini](https://forum.openzeppelin.com/u/tcassini)\
**Post date:** [November 24, 2021, 3:27pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/3 "2021-11-24T15:27:28Z")

</div>

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

```auto
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!

---

<div class="post-metadata">

**Author:** ![spalladino](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/spalladino/32/22_2.png) [@spalladino](https://forum.openzeppelin.com/u/spalladino)\
**Post date:** [November 24, 2021, 3:37pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/4 "2021-11-24T15:37:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![spalladino](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/spalladino/32/22_2.png) [@spalladino](https://forum.openzeppelin.com/u/spalladino)\
**Post date:** [November 24, 2021, 3:41pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/5 "2021-11-24T15:41:36Z")

</div>

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

> <https://github.com/OpenZeppelin/workshops/blob/b48bec19d9103de66350b605d9acc00f3603f8f8/01-defender-meta-txs/package.json#L10-L12>

---

<div class="post-metadata">

**Author:** ![And\_Sama](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@And\_Sama](https://forum.openzeppelin.com/u/And_Sama)\
**Post date:** [November 24, 2021, 5:58pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/6 "2021-11-24T17:58:08Z")

</div>

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

```auto
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.

```

---

<div class="post-metadata">

**Author:** ![And\_Sama](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@And\_Sama](https://forum.openzeppelin.com/u/And_Sama)\
**Post date:** [November 24, 2021, 6:08pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/7 "2021-11-24T18:08:07Z")

</div>

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

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

```

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

> [@Meta transactions - can't solve invalid signature](https://forum.openzeppelin.com/t/meta-transactions-cant-solve-invalid-signature/16392/2):
>
> Hey @sbauch! The issue you describe is typically caused by an error in the EIP712 signature. Most likely, the payload you're signing does not match the one expected by the EIP712 verifier contract. You'll want to compare the getMetaTxTypeData function in the signer with the verify method in the MinimalForwarder, and make sure they are both operating on the same structured data. That said, from a quick look, it'd seem that the incompatibility is in the domain name: you're using GSNv2 Forwarder i…

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

---

<div class="post-metadata">

**Author:** ![spalladino](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/spalladino/32/22_2.png) [@spalladino](https://forum.openzeppelin.com/u/spalladino)\
**Post date:** [November 25, 2021, 1:25pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/8 "2021-11-25T13:25:46Z")

</div>

> [@And\_Sama](#):
>
> Also if i skipped the check

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.

---

<div class="post-metadata">

**Author:** ![And\_Sama](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@And\_Sama](https://forum.openzeppelin.com/u/And_Sama)\
**Post date:** [November 25, 2021, 1:43pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/9 "2021-11-25T13:43:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![And\_Sama](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@And\_Sama](https://forum.openzeppelin.com/u/And_Sama)\
**Post date:** [November 25, 2021, 1:45pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/10 "2021-11-25T13:45:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![spalladino](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/spalladino/32/22_2.png) [@spalladino](https://forum.openzeppelin.com/u/spalladino)\
**Post date:** [November 25, 2021, 3:07pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/11 "2021-11-25T15:07:43Z")

</div>

> [@And\_Sama](#):
>
> I tried running on Xdai , no working faucet there, and this is a live network that cost real money you know.

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

> [@And\_Sama](#):
>
> is there an alternative way to do gasless tx , beside this ?

You can look into [https://opengsn.org/](https://opengsn.org/)

---

<div class="post-metadata">

**Author:** ![tcassini](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@tcassini](https://forum.openzeppelin.com/u/tcassini)\
**Post date:** [November 26, 2021, 12:53pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/12 "2021-11-26T12:53:22Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![And\_Sama](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@And\_Sama](https://forum.openzeppelin.com/u/And_Sama)\
**Post date:** [November 26, 2021, 1:57pm UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/13 "2021-11-26T13:57:21Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![tcassini](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@tcassini](https://forum.openzeppelin.com/u/tcassini)\
**Post date:** [November 30, 2021, 11:31am UTC](https://forum.openzeppelin.com/t/minimalforwarder-invalid-request/19520/14 "2021-11-30T11:31:18Z")

</div>

@spalladino I can verify that I've been able to get this working on Ropsten by using the solution you provided here: [Meta transactions - can't solve invalid signature - #2 by spalladino](https://forum.openzeppelin.com/t/meta-transactions-cant-solve-invalid-signature/16392/2)

Many thanks for your work on this!  
TC
