---
# System prepended metadata

title: V2-deploy Instructions

---

# V2-deploy Instructions

- Setup deployment
  Clone monorepo
  Change directory to packages/v2-deploy and install dependencies`cd packages/v2-deploy && yarn`
  Compile contracts `npx hardhat compile`
- Add network
  Add network to `hardhat.config.ts`
  Update chainId `.chainId`
- Pool deployment parameters
  Add/update the following parameters in the deploy script `v2-deploy/scripts/deploy0.ts`

  -- Strike : update `targetStrike`
  -- Maturity: update `maturity`
  -- Spot : update `currentSpot`

  Deploy the pool on :-
  local : `npx hardhat run scripts/deploy0.ts` Deploy the pool on local hardhat node

  > buildbear: `npx hardhat run scripts/deploy0.ts --network buildbear` Deploys pool on buildbear network

  ## Note:

  Do not reset node - make sure `hre.ethers.provider.send("hardhat_reset` is disabled/commented out.

  For initial deploymen , make sure to enable contract deployment
  `await hre.run("deploy");`

  If contracts are already deployed on the network, add multiple pools of arbitrary strike and maturity, by disabling/commenting out deployments

  - `// await hre.run("deploy");`
  - `// const txn1`
  - `// const txn2`
    After updating targetStrike, maturity and currSpot you can run the script in order to add new pools of any strike/maturity
