UNIT - 3
1. How to Deploy Smart Contracts on Blockchain
Smart contracts are small programs written in languages like Solidity (for Ethereum).
Deployment means putting them on the blockchain so they can run automatically.
Steps (Simplified):
1. Write the Smart Contract
o Example: In Solidity, you write the rules (like “if 60% people vote YES, release
funds”).
2. Compile the Contract
o Use tools like Remix IDE, Hardhat, or Truffle to compile the code into bytecode
(understandable by blockchain).
3. Connect to Blockchain Network
o Choose a blockchain:
Mainnet (real Ethereum network) for actual deployment.
Testnet (Ropsten, Goerli, Sepolia, etc.) for practice.
o Connect using MetaMask wallet.
4. Deploy the Contract
o Send a transaction with the compiled code to the blockchain.
o You pay a gas fee for deployment.
5. Get the Contract Address
o Once deployed, blockchain gives a unique address where the contract lives
permanently.
6. Interact with Contract
o Users can now call functions (like vote, transfer funds, etc.) by sending transactions
to that address.
2. Role of DAO with Smart Contracts
A DAO (Decentralized Autonomous Organization) uses smart contracts as its “rules and
brain.”
DAO = Smart contracts + Community voting + Tokens
Role of DAO
1. Rule Maker & Executor
o DAO rules (who can vote, how funds are used, etc.) are written in smart contracts.
o Once deployed, nobody can secretly change the rules.
2. Decision Making (Voting)
o DAO members hold governance tokens.
o They vote on proposals (e.g., “Should we invest in Project X?”).
o Smart contract automatically counts votes.
3. Funds Management
o DAO treasury (shared money) is stored in the smart contract.
o Funds are released only when the vote passes.
4. Transparency
o Every proposal, vote, and transaction is recorded on blockchain.
5. Autonomy
o No single leader — DAO runs 24/7 based on code and community.
✅ In short:
Smart contracts = Rules of the game (written on blockchain).
DAO = Players + Voting + Execution (organization that follows those rules).