diff --git a/docs/get-started/deploy-smart-contracts.mdx b/docs/get-started/deploy-smart-contracts.mdx index 144028ff7..15427c6c2 100644 --- a/docs/get-started/deploy-smart-contracts.mdx +++ b/docs/get-started/deploy-smart-contracts.mdx @@ -101,23 +101,35 @@ Never share or commit your private key. Always keep it secure and handle with ca Now that your environment is set up, let's deploy your contracts to Base Sepolia. -1. Use the following command to compile and deploy your contract +1. (Optional) Perform a dry run to simulate the deployment and verify your configuration: ```bash forge create ./src/Counter.sol:Counter --rpc-url $BASE_SEPOLIA_RPC_URL --account deployer ``` +This simulates the deployment without broadcasting the transaction to the network. + +2. Deploy your contract by adding the `--broadcast` flag: + +```bash +forge create ./src/Counter.sol:Counter --rpc-url $BASE_SEPOLIA_RPC_URL --account deployer --broadcast +``` + + +The `--broadcast` flag is **required** to actually deploy your contract to the network. Without it, Foundry only performs a dry run simulation. + + Note the format of the contract being deployed is `:`. -2. After successful deployment, the transaction hash will be printed to the console output +3. After successful deployment, the transaction hash and deployed contract address will be printed to the console output -3. Copy the deployed contract address and add it to your `.env` file +4. Copy the deployed contract address and add it to your `.env` file ```bash COUNTER_CONTRACT_ADDRESS="0x..." ``` -4. Load the new environment variable +5. Load the new environment variable ```bash source .env