Skip to main content

Usage

dokrypt deploy track <contract-name> <address> [flags]
dokrypt deploy list [flags]
dokrypt deploy export [flags]
dokrypt deploy multi [flags]
dokrypt deploy diff [flags]

Subcommands

deploy track

Record a contract deployment for tracking across environments.
dokrypt deploy track MyToken 0x1234... --network arbitrum --tx-hash 0xabc...
dokrypt deploy track MyToken 0x1234... --network sepolia --tags "staging,v2"
FlagDefaultDescription
--networklocalhostDeployment network
--chain-idChain ID
--tx-hashDeployment transaction hash
--deployerDeployer address
--compilersolc-0.8.20Compiler version
--tagsComma-separated tags (e.g., staging,v2)
Deployments are saved to deployments.json in the project root.

deploy list

List all tracked deployments with optional filters.
dokrypt deploy list
dokrypt deploy list --network arbitrum
dokrypt deploy list --tag production
FlagDefaultDescription
--networkFilter by network
--tagFilter by tag

deploy export

Export the deployment manifest in different formats.
dokrypt deploy export --format json
dokrypt deploy export --format env
dokrypt deploy export --format markdown
FlagDefaultDescription
--formatjsonOutput format: json, env, markdown
env format outputs environment variables:
MYTOKEN_ARBITRUM_ADDRESS=0x1234...
MYTOKEN_SEPOLIA_ADDRESS=0x5678...
markdown format outputs a table:
| Contract | Network | Address |
|----------|---------|---------|
| MyToken | arbitrum | `0x1234...` |

deploy multi

Prepare deployment to multiple networks in sequence.
dokrypt deploy multi --networks "arbitrum,optimism,base" --script scripts/deploy.js
dokrypt deploy multi --networks "sepolia,arb-sepolia" --script scripts/deploy.js --dry-run
FlagDefaultDescription
--networksComma-separated networks (required)
--scriptPath to deployment script (required)
--dry-runfalsePreview deployment without executing

deploy diff

Compare contract deployments across two networks.
dokrypt deploy diff --net1 arbitrum --net2 sepolia
FlagDefaultDescription
--net1First network to compare
--net2Second network to compare
Shows which contracts exist on each network and highlights differences.

Examples

Track a deployment after deploying to Arbitrum:
forge script scripts/Deploy.s.sol --rpc-url $ARBITRUM_RPC --broadcast

dokrypt deploy track MyToken 0x1234... --network arbitrum --tx-hash 0xabc...
dokrypt deploy track StakingRewards 0x5678... --network arbitrum --tx-hash 0xdef...
Compare staging vs production:
dokrypt deploy diff --net1 arb-sepolia --net2 arbitrum
Export addresses for frontend:
dokrypt deploy export --format env > .env.contracts
Multi-chain dry run:
dokrypt deploy multi --networks "arbitrum,optimism,base" --script scripts/deploy.js --dry-run