Comments (4)
- Nope! The way this is set up, anyone can make a proposal.
- We setup the executor of a proposal like this:
This makes it so that once a proposal has:
- Been proposed
- Passed the vote
- Passed the time lock period
Anyone can "execute" the proposal.
- Not quite.
You'd still want the timelock controller to own your treasury wallet. You could put some functionality of payment in the GT contract, but I think it would make more sense for the timelock controller contract to own all the GT tokens and just make people pay for them (if that's what you want to do)
from dao-template.
Thank you @PatrickAlphaC
Your Answers are very thorough and educational.
Just some clarifying followups.
So anyone can propose, but only token holders may vote. So is it safe to assume the chain of imported contracts from GovernorContract.sol and ERCXXVotes.sol ensure that only valid token holders can vote?
Linking Contracts
I noticed there was no special solidity code to somehow 'link" these 3 contracts. So this linking is only handled within our deployment scripts? However, I do know OpenZeppelin's Ownable and onlyOwner
directive does allow an owner to be specified and customized.
In conclusion, the linkages are through the contract deployer (me) or whatever contract is designated as the Owner using Ownable.sol
Treasury Wallet
Is the "Treasury Wallet" typically a separate contract or do we typically leave the funds in the contract that mints the tokens? Or do we make TimeLock.sol the "Treasury Wallet"? I'm not quite sure what is a best practice.
I guess no matter which contract serves as the Treasury Wallet, some sort of payable and receiver functionality is needed in its solidity code.
Time Lock
I think I may understand now. It's best practice for only TimeLock.sol to deposit and withdraw funds from that Treasury wallet/contract. Being a DAO, this ensures that funds are only moved by the democratic consensus of its members.
Do you recommend importing Ownable.sol into the TimeLock.sol? Or only into GovernorToken.sol and GovernorContract.sol?
from dao-template.
So anyone can propose, but only token holders may vote. So is it safe to assume the chain of imported contracts from GovernorContract.sol and ERCXXVotes.sol ensure that only valid token holders can vote?
Yes.
I noticed there was no special solidity code to somehow 'link" these 3 contracts.
There is:
This "links" the governance token of choice to the governor contract:
This "links" the governor contract to the timelock:
Treasury Wallet
The treasury wallet can simply be the timelock contract.
Do you recommend importing Ownable.sol into the TimeLock.sol? Or only into GovernorToken.sol and GovernorContract.sol?
Neither. All the permissions are handled inside the contracts imported already.
from dao-template.
@PatrickAlphaC Thank you again.
It all makes a lot more sense now!
from dao-template.
Related Issues (20)
- VM Exception while processing transaction: reverted with reason string 'Governor: vote not currently active' HOT 7
- Error running yarn hardhat deploy HOT 5
- Error: VM Exception while processing transaction: reverted with reason string 'Governor: proposal not successful' HOT 3
- Error - TimelockController: operation is not ready HOT 4
- Error: Unable to propose a new proposal with error TypeError: Cannot read properties of undefined (reading 'args') HOT 2
- The logical flow of governance seems off HOT 1
- live chain deployment
- Update of the TimeLockController openzeppelin contract HOT 3
- 02-deploy-time-lock.ts // Error: expected 4 constructor arguments, got 3 HOT 1
- Error: VM Exception while processing transaction: reverted with reason string 'AccessControl: account 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 is missing role 0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5' HOT 1
- Governance Execution Delay? HOT 1
- ERROR DEOPLOYING
- Error when running queue-and-execute.ts on Sepolia HOT 1
- Error: could not decode result data PROPOSER_ROLE() HOT 2
- TypeError: Cannot read properties of undefined (reading '0') HOT 1
- Add support for slither-action HOT 4
- TypeError: Cannot read properties of ')undefined (reading '0) HOT 2
- Transaction ran out of gas HOT 5
- A noob question, How does the contract ensure that the execution parameters are the same as those for proposal? HOT 1
- TypeError: Cannot read properties of undefined (reading 'length') HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dao-template.