Teklifler ve Oylama
Governor sözleşmeleri
Teklifler ve Oylama, CoddyKit'te ücretsiz bir Web3 & DApp Development Fundamentals dersidir. Bu, 4 dersinin 3. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Web3 & DApp Development Fundamentals öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Web3 & DApp Development Fundamentals kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
The Governance Lifecycle
On-chain governance follows a clear lifecycle: propose, vote, queue, execute.
Each stage is handled by a Governor smart contract that enforces the rules automatically.
The Governor Contract
OpenZeppelin's Governor is the standard framework for DAO voting. It manages proposals, tallies votes, and triggers execution.
It is modular: you plug in a vote-counting strategy, a token, and timing parameters.
contract MyGovernor is
Governor,
GovernorVotes,
GovernorVotesQuorumFraction,
GovernorTimelockControl
{ /* ... */ }Creating a Proposal
A proposal bundles the actions to execute: target contracts, call data, and values, plus a human-readable description.
governor.propose(
[targetContract], // addresses
[0], // ETH values
[callData], // encoded function calls
"Increase reward rate to 5%"
);The Voting Delay
After a proposal is created, a voting delay passes before voting opens.
This gives members time to review and lets the snapshot block settle so balances are fixed.
votingDelay = 1 block // wait before voting
votingPeriod = 50400 blocks // ~1 week of votingCasting Votes
During the voting period, members cast votes weighted by their delegated power at the snapshot block.
Standard options are For, Against, and Abstain.
governor.castVote(proposalId, 1);
// 0 = Against, 1 = For, 2 = AbstainVote Counting and Quorum
When voting ends, the Governor tallies the weighted votes. A proposal succeeds only if it has more For than Against votes and meets the quorum.
Abstain votes typically count toward quorum but not toward the For/Against decision.
Proposal States
A proposal moves through defined states:
- Pending — waiting for voting delay
- Active — voting open
- Defeated or Succeeded
- Queued then Executed
Queuing a Successful Proposal
A succeeded proposal is usually queued in a timelock before it can run.
This delay (covered next lesson) is a safety buffer letting users react before the change takes effect.
governor.queue(targets, values, calldatas, descHash);Execution
After the timelock delay, anyone can call execute to carry out the proposal's actions on-chain.
The Governor (or its timelock) holds the permissions needed to make the changes.
governor.execute(targets, values, calldatas, descHash);
// the approved actions now runGas Costs and Off-Chain Voting
On-chain voting costs gas per vote. To save costs, many DAOs deliberate and signal off-chain (Snapshot) and only push final, binding actions on-chain.
This hybrid keeps participation cheap while preserving trustless execution.
Putting It Together
Governor contracts standardize the propose-vote-queue-execute flow. Voting delays, periods, quorum, and proposal states make governance predictable and secure.
Next we focus on timelocks, the safety layer before execution.
Quick Check
Test your understanding of the governance flow.
Recap: Proposals and Voting
You learned that:
- Governance follows propose, vote, queue, execute
- The Governor contract enforces the rules
- A voting delay and period structure the timeline
- Success needs a majority For plus quorum
- Proposals pass through defined states
Next: timelocks and safe execution.
Sıkça Sorulan Sorular
“Teklifler ve Oylama” dersi ücretsiz mi?
Evet — “Teklifler ve Oylama” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Web3 & DApp Development Fundamentals kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Web3 & DApp Development Fundamentals kursu toplamda 4 dersten oluşur.
“Teklifler ve Oylama” dersinde ne öğreneceğim?
Governor sözleşmeleri Web3 & DApp Development Fundamentals ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Web3 & DApp Development Fundamentals öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Web3 & DApp Development Fundamentals, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 3. dersidir.
“Teklifler ve Oylama” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Web3 & DApp Development Fundamentals dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Web3 & DApp Development Fundamentals dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- DAO Nedir
- Yönetişim Belirteçleri
- Teklifler ve Oylama
- Zaman Kilitleri ve Yürütme