Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Basic DAO
copy icon
Cookbook
• version 0.0.2r
DAO
Governance
Deployable

Basic DAO

A very simple implementation of a DAO. Voting period is locked in at 1 week, and the voting delay is 1 block. There is no delay on approved proposals.

*Visit desktop site to download or deploy

Version

0.0.2r

Creator

Cookbook

Recent Use

🍞 0x7398 downloaded
🥐 0x0fAb downloaded
🥖 0x4897 saved
🥨 0x5Db0 downloaded
🥯 0x7Cf7 saved
🥞 0x7398 downloaded
🧀 0x35a9 deployed
🍖 0x13F0 downloaded
🍗 0x49FE downloaded
🥩 0x5Db0 downloaded

Last Publish

9/6/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
COUNTING_MODE() :
See {IGovernor-COUNTING_MODE}.
castVote(uint256,uint8) :
See {IGovernor-castVote}.
castVoteBySig(uint256,uint8,uint8,bytes32,bytes32) :
See {IGovernor-castVoteBySig}.
castVoteWithReason(uint256,uint8,string) :
See {IGovernor-castVoteWithReason}.
castVoteWithReasonAndParams(uint256,uint8,string,bytes) :
See {IGovernor-castVoteWithReasonAndParams}.
castVoteWithReasonAndParamsBySig(uint256,uint8,string,bytes,uint8,bytes32,bytes32) :
See {IGovernor-castVoteWithReasonAndParamsBySig}.
execute(address[],uint256[],bytes[],bytes32) :
See {IGovernor-execute}.
getVotes(address,uint256) :
See {IGovernor-getVotes}.
getVotesWithParams(address,uint256,bytes) :
See {IGovernor-getVotesWithParams}.
hasVoted(uint256,address) :
See {IGovernor-hasVoted}.
hashProposal(address[],uint256[],bytes[],bytes32) :
See {IGovernor-hashProposal}. The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in advance, before the proposal is submitted. Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the same proposal (with same operation and same description) will have the same id if submitted on multiple governors across multiple networks. This also means that in order to execute the same operation twice (on the same governor) the proposer will have to change the description in order to avoid proposal id conflicts.
name() :
See {IGovernor-name}.
onERC1155BatchReceived(address,address,uint256[],uint256[],bytes) :
See {IERC1155Receiver-onERC1155BatchReceived}.
onERC1155Received(address,address,uint256,uint256,bytes) :
See {IERC1155Receiver-onERC1155Received}.
onERC721Received(address,address,uint256,bytes) :
See {IERC721Receiver-onERC721Received}.
proposalDeadline(uint256) :
See {IGovernor-proposalDeadline}.
proposalSnapshot(uint256) :
See {IGovernor-proposalSnapshot}.
proposalThreshold() :
Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_.
proposalVotes(uint256) :
Accessor to the internal vote counts.
propose(address[],uint256[],bytes[],string) :
See {IGovernor-propose}.
quorumDenominator() :
Returns the quorum denominator. Defaults to 100, but may be overridden.
quorumNumerator() :
Returns the current quorum numerator. See {quorumDenominator}.
relay(address,uint256,bytes) :
Relays a transaction or function call to an arbitrary target. In cases where the governance executor is some contract other than the governor itself, like when using a timelock, this function can be invoked in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. Note that if the executor is simply the governor itself, use of `relay` is redundant.
state(uint256) :
See {IGovernor-state}.
supportsInterface(bytes4) :
See {IERC165-supportsInterface}.
updateQuorumNumerator(uint256) :
Changes the quorum numerator. Emits a {QuorumNumeratorUpdated} event. Requirements: - Must be called through a governance proposal. - New numerator must be smaller or equal to the denominator.
version() :
See {IGovernor-version}.
votingDelay() :
Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to leave time for users to buy voting power, of delegate it, before the voting of a proposal starts.
votingPeriod() :
Delay, in number of blocks, between the vote start and vote ends. NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting duration compared to the voting delay.

Get Cookin'
share iconShare

copy iconNo-Code Deploy
copy iconDownload Source
copy iconnpx cookbookdev i basic-dao
copy icon

Bytecode

Download

Verification

Download

Recent Use

🍞 0x7398 downloaded
🥐 0x0fAb downloaded
🥖 0x4897 saved
🥨 0x5Db0 downloaded
🥯 0x7Cf7 saved
🥞 0x7398 downloaded
🧀 0x35a9 deployed
🍖 0x13F0 downloaded
🍗 0x49FE downloaded
🥩 0x5Db0 downloaded

Last Publish

9/6/2022

Solidity Compiler

0.8.12+commit.f00d7308

Version

0.0.2r

Creator

Cookbook

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.