# 1. deploy

Spin up the testing chain with

```bash
npx hardhat node
```

Use the hardhat testing chain as an example config.

```
PROVIDER=http://127.0.0.1:8545/
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
```

{% code title="deploy.ts" %}

```typescript
import { ethers } from 'ethers'
import { deployUnirep } from '@unirep/contracts'

async function main(){
    const provider = await ethers.getDefaultProvider(PROVIDER)
    const signer = new ethers.Wallet(
        PRIVATE_KEY,
        provider
    )
    const contract = await deployUnirep(
        signer
    )
    console.log("Unirep address: ", contract.address)
}

main();
```

{% endcode %}

{% hint style="warning" %}
Now the verifiers are fixed in `@unirep/contracts` so it can be deployed with `deployUnirep` function.\
To make verifiers more flexible, it it recommended to download [Unirep repository](https://github.com/Unirep/Unirep) and deploy verifiers before deploying `Unirep.sol`.
{% endhint %}
