How is the vault deployed?
Nothing is deployed yet. These are the steps.
- Build:
pnpm vault:build. - Test:
pnpm vault:test. - Compute the address:
pnpm vault:address. - Fund the deployer with a little ETH. Check the current gas price first.
- Dry run:
pnpm vault:deploy. Use the runbook to send it on chain. - Verify the code on Blockscout.
The deploy uses the CREATE2 factory. The args come from VAULT_OWNER and VAULT_OPERATOR. When the deployer is the owner, the script allows the Universal Router.
pnpm vault:build && pnpm vault:test && pnpm vault:addressFull commands are in deployment/vault/README.md. The vault code is in packages/vault.
Sample
Section titled “Sample”pnpm vault:address writes deployment/vault/address.json. You can deploy later. Keep the code, salt, and args fixed to keep this address.