-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add missing hooks to dao-voting-native-staked, start adding tests * Fix group contract attribute key emits "address" * Fix absoluteCount can be configured to be greater than the total NFT supply * Fix absoluteCount threshold for a new token is not validated * Fix issuer contract can be blacklisted * Fix Stargaze collection info bug, and absolute count validation sg721 has two addresses that control it. The `minter` which can mint NFTs, and the `creator` which can update collection metadata and royalties. We now set both of those to be the DAO. * Fix incorrect events are emitted for whitelist * Fix lack of denom validation * Fix BEFORE_SEND_HOOK_FEATURES_ENABLED is not exposed through smart queries * Fix misleading from attribute when burning funds * Fix broken tests from denom validation * Fix inconsistent attribute namings and orderings * Fix INITITIAL_NFTS spelling XD * Fix counterintuitive variable namings * Better API for cw-tokenfactory-issuer Many of these methods are not needed thanks to Authz. * Appease clippy gods * Reduce unneeded gas consumption by setting admin directly * Fix unneeded reply_always when instantiating new token * Remove unused function * Improve comments * Use “Migrate only if newer” pattern * Clean up and fix issuer test-tube tests * Combine all dao-related hooks into a single package * Improve code resuse by consilidating stake hooks * Clean up types * Remove need for unused TokenFactoryQuery, use shared stake hooks * Fix stake hook tests, update schema * Incorporate NFT staking hooks into dao-hooks package * Add cw4::MemberChangedHookMsg and clean up dao-hooks pkg * Make clippy happy, use only migrate newer across all voting contracts * cargo fmt * clippy on latest rust version * Improve unstaking_duration validation reuse * Allowlist should apply to transfers from *or to* an address For example, a DAO may wish to white list a Token Staking contract (to allow users to stake their tokens in the DAO) or a Merkle Drop contract (to allow users to claim their tokens). * Add info on renouncing Token Factory Admin * Remove outdated comments * Remove commented out metadata test Osmosis test tube doesn't support metadata queries anymore, we assume metadata is set properly by the Cosmos SDK and this is well tested upstream. * More informative error to address BlockBeforeSend hook executing on minting or burning This is intended functionality. If a token is frozen, a DAO needs to both grant a minter allowance as well as adding the minter to the allowlist to allow for token transfers when the token is frozen. The new error message should make next steps clear if this edge case is encountered. * Use tagged versions or upstream git repos for deps * Better code documentation for cw-tokenfactory-issuer * Make it possible to unset BeforeSendHook, or set to a different contract DAOs may wish to disable the BeforeSendHook at some point, or potentially set it to a custom cosmwasm contract if they wish to customize functionality a bit more. Modifies the SetBeforeSendHook method to allow for this, and adds tests that it's indeed possible to set it to nil. * Default to BeforeSendHook features being disabled These are powerful features, but many may not want them as they can be abused. DAOs that want these features will have to explicitly enable them via a governance prop. * BeforeSendHook refactor and tests * Cleanup TODO, verify correct error * Accurate comment * Improve active threshold validation reuse * Don't create issuer for existing tokens * Reorg so we can have only one native token voting contract * No need to have an issuer for existing tokens * Update Schema * Fix up integration tests * Remove owner from dao-voting-cw721-staked The concept of ownership doesn't really make sense for voting contracts. IMO the owner should always be the DAO. * Improve TF docs * Implement two-step ownership transfer for cw_tokenfactory_issue * Tests for renouncing ownership * Fix package name. * Fix integration tests * set_before_update_hook -> set_before_send_hook * Address remaining TODOs --------- Co-authored-by: Jake Hartnell <[email protected]>
- Loading branch information
1 parent
bf3ef9c
commit 3518a28
Showing
144 changed files
with
3,825 additions
and
6,968 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.