πŸš€Smart Contract Deployment

Deploy smart contracts instantly using Remix's web-based IDE and built-in deployment tools.

Here are the step-by-step instructions to deploy a smart contract on the Avalanche L1 Demo Network using Remix:

Deployment Steps-

πŸ§‘β€πŸ’» Step 1: Connect MetaMask to the Avalanche L1 Demo Network

Follow this link to complete this step - Adding to MetaMask

🧱 Step 2: Open Remix and Write Your Contract

  1. Visit Remix IDE.

  2. In the File Explorer, create a new Solidity file (e.g., MyContract.sol).

  3. Write or paste your smart contract code.

πŸ”¨ Step 3: Compile the Contract

  1. Go to the Solidity Compiler tab on the left.

  2. Select the appropriate compiler version for your code.

  3. Click Compile.

πŸš€ Step 4: Deploy Using Injected Web3 (MetaMask)

  1. Go to the Deploy & Run Transactions tab.

  2. Under Environment, select Injected Provider - MetaMask.

    • MetaMask will prompt you to connect β€” approve it.

    • Ensure it's connected to the Avalanche L1 Demo Network.

  3. Select the contract from the dropdown.

  4. If your contract has constructor parameters, input them.

  5. Click Deploy.

  6. MetaMask will pop up to confirm the transaction, approve it.

πŸ“ Step 5: Confirm Deployment

  • Once the transaction is mined, the contract will appear under Deployed Contracts in Remix.

  • You can interact with the contract directly from here.

  • Optionally, copy the contract address and check it on the Tracehawk to verify.

Verify & publish contract via Explorer-

πŸ› οΈ Step 1: Verify & publish contract via Explorer

  1. Click on Others, and then choose Verify Contract.

  2. Click it to open the verification form.

🧾 Step 2: Fill in Verification Details

  1. Contract Address:

  2. Contract License Dropdown: Choose MIT License

  3. Compiler Type: Select Solidity (Single File) or Multi-part depending on your project.

  4. Compiler Version: Must match what was used in Remix (e.g., 0.8.22).

  5. Optimization Enabled: Yes / No (indicates if optimization was enabled during contract deployment)

  6. Enter Solidity Source Code in the provided text box.

πŸ’Ύ Step 3: Submit

  • Click "Verify and Publish".

  • The explorer will compile and compare the code with the on-chain bytecode.

πŸŽ‰ Step 4: Verification Complete

Once verified:

  • The contract’s source will be publicly visible on the explorer.

  • A βœ… Verified badge will appear.

  • You can now read/write to your contract directly from the explorer.

Last updated