> For the complete documentation index, see [llms.txt](https://docs.otterspace.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otterspace.xyz/documentation/contracts/adding-to-allowlist.md).

# Adding to allowlist

In order to approve someone to mint a Badge, a signature using EIP-712 is necessary

```tsx
import { utils } from "ethers"

const typedData = {
    domain: {
      name: 'BADGES',
      version: '1.0.0',
      chainId: 10, // optimism chainId
      verifyingContract: '0x7F9279B24D1c36Fa3E517041fdb4E8788dc63D25',
    },
    types: {
      Agreement: [
        { name: 'active', type: 'address' },
        { name: 'passive', type: 'address' },
        { name: 'tokenURI', type: 'string' },
      ],
    },
    value: {
      active: claimant.address, // issuer of badge 
      passive: issuer.address, // receiver of badge
      tokenURI: specUri, // uri of badge
    },
  }

// See: <https://docs.ethers.io/v5/api/signer/#Signer-signTypedData> for more detailed instructions.
const signature = await signer._signTypedData(typedData.domain, typedData.types, typedData.value)
const { compactSignature } = utils.splitSignature(signature)
```
