# ERC721LazyMintWith712Signature + Upgradeable

**URL:** <https://forum.openzeppelin.com/t/erc721lazymintwith712signature-upgradeable/13392>\
**Category:** Upgrades\
**Created:** [August 2, 2021, 12:02am UTC](https://forum.openzeppelin.com/t/erc721lazymintwith712signature-upgradeable/13392 "2021-08-02T00:02:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mjavala](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/mjavala/32/7618_2.png) [@Mjavala](https://forum.openzeppelin.com/u/Mjavala)\
**Post date:** [August 2, 2021, 12:02am UTC](https://forum.openzeppelin.com/t/erc721lazymintwith712signature-upgradeable/13392/1 "2021-08-02T00:02:25Z")

</div>

I'm trying to take the ERC721LazyMintWith712Signature.sol code and create an upgradeable version of it, and add some other functionality as well. So far I'm able to compile the code, but the minting and transferring tests fail with an exception I can't seem to crack:

```auto
Error: resolver or addr is not configured for ENS name (argument="name", value="6705805767844207723261592881831509603729469983418291212309451818559986173218", code=INVALID_ARGUMENT, version=contracts/5.4.1)

```

This occurs in this portion of the test:

```js
        await expect(this.registry.connect(this.accounts[2]).redeem(account, tokenId, this.smartwallet.address, signature))
          .to.emit(this.registry, 'Transfer')
          .withArgs(ethers.constants.AddressZero, account, tokenId);

```

#### 🔢 Code to reproduce

I've pushed a repo that shows the error with the three commands below.  
The repo can be found here: [https://github.com/Mjavala/Rays](https://github.com/Mjavala/Rays)

```auto
- npm i
- npx hardhat compile
- npx hardhat test  

```

#### 💻 Environment

I'm using the following env:  
hardhat - 2.5.0  
node - v14.15.4  
sol - 0.8.4

\*\* this is my first topic, if I've messed up the format or provided insufficient information, please let me know!

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [August 2, 2021, 6:59pm UTC](https://forum.openzeppelin.com/t/erc721lazymintwith712signature-upgradeable/13392/2 "2021-08-02T18:59:00Z")

</div>

This error means that an address was expected somewhere and you passed a non-address value. According to the error, this happened in an argument called `name`. I can't tell what argument this is because I don't know the argument names but you should be able to check based on this information.

---

<div class="post-metadata">

**Author:** ![Mjavala](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/mjavala/32/7618_2.png) [@Mjavala](https://forum.openzeppelin.com/u/Mjavala)\
**Post date:** [August 3, 2021, 11:58pm UTC](https://forum.openzeppelin.com/t/erc721lazymintwith712signature-upgradeable/13392/3 "2021-08-03T23:58:44Z")

</div>

Hey frangio, thanks for the reply. It turned out that i had mixed up the order of variables in this redeem function:

```auto
    function redeem(address account, address signer, uint256 tokenId, bytes calldata signature)
    external
    {
        require(_verify(signer, _hash(account, tokenId), signature), "Invalid signature");
        _safeMint(account, tokenId);
    }

```

However now I'm getting this error:

```auto
 Error: VM Exception while processing transaction: reverted with reason string 'Invalid signature'
      at Rays.redeem (contracts/Rays.sol:41)
      at <UnrecognizedContract>.<unknown> (0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at runNextTicks (internal/process/task_queues.js:62:3)
      at listOnTimeout (internal/timers.js:523:9)
      at processTimers (internal/timers.js:497:7)
      at HardhatNode._mineBlockWithPendingTxs (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:1575:23)
      at HardhatNode.mineBlock (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:443:16)
      at EthModule._sendTransactionAndReturnHash (node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:1500:18)

```

When running the following code:

```auto
        await expect(this.registry.connect(this.accounts[2]).redeem(account, this.smartwallet.address, tokenId, signature))
          .to.emit(this.registry, 'Transfer')
          .withArgs(ethers.constants.AddressZero, account, tokenId);

```

I'm pretty sure it has something to do with the proxy, since this code works for the base contract.

I've updated the repo with this latest error, any ideas?

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [August 5, 2021, 1:16am UTC](https://forum.openzeppelin.com/t/erc721lazymintwith712signature-upgradeable/13392/4 "2021-08-05T01:16:57Z")

</div>

Debugging invalid signatures is difficult and from a quick glance I can't see what could be wrong. I suggest slowly trying to build up from a simple traditional signature to an EIP712 signature to try to find out what's wrong.
