feat: DAO governance system — supply cap, mutable decimals, and Pausable for XCAD - #6
Draft
jgphilpott with Copilot wants to merge 1 commit into
Draft
feat: DAO governance system — supply cap, mutable decimals, and Pausable for XCAD#6jgphilpott with Copilot wants to merge 1 commit into
jgphilpott with Copilot wants to merge 1 commit into
Conversation
…d Pausable for XCAD
Copilot created this pull request from a session on behalf of
jgphilpott
July 23, 2026 13:56
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a full on-chain DAO governance layer to the XCAD ecosystem. BITGOV holders propose and vote on parameter changes; passed proposals execute through a timelock before taking effect. XCAD's owner is now the timelock, so no single account can mint or change parameters unilaterally.
BITGOV — ERC20Votes
ERC20Votes+EIP712to enable on-chain voting checkpoints_updateoverride resolvesERC20Capped×ERC20Votesconflictdelegate(self)once to activate voting weightXCAD — DAO-controlled parameters
supplyCap(uint256,0= uncapped) enforced inmint(); adjustable viasetSupplyCap()decimalsviasetDecimals(uint8)— cosmetic only, does not rescale stored balancesPausablecircuit-breaker (pause()/unpause()) blocks all_updatecalls (transfers, mints, burns)onlyOwner(timelock in production)initialSupplyCaparg (0for uncapped)New governance contracts
XCADTimelockControllerXCADGovernorGovernorSettings+GovernorCountingSimple+GovernorVotes+GovernorVotesQuorumFraction+GovernorTimelockControlExample proposal to raise the supply cap:
Ignition module
ignition/modules/governance/XCADGovernor.tsdeploys all four contracts in dependency order and configuresPROPOSER_ROLE,CANCELLER_ROLE, andEXECUTOR_ROLEon the timelock. After deployment, the deployer should renounceDEFAULT_ADMIN_ROLEto make governance fully self-sovereign.Optimizer
Enabled Solidity optimizer (
runs: 200) inhardhat.config.ts—XCADGovernorexceeds the 24 576-byte EVM limit without it.