-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development -> Main #713
Closed
Closed
Development -> Main #713
Conversation
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
Cosm-Orc Gas Usage
Raw Report for 0367c84
|
* Refactor cw4 voting * Fix up tests and bugs * Add test for using an existing group contract * Update schema * Fix clippy * nightly -> stable for CI nightly broke a bunch of linting stuff, we should probably be using stable
* Initial contract commits * Clean up * Start building out the contracts more * Untested first version of roles NFT contract * Move ActiveThreshold to dao-voting package * Fix up many bugs in cw721-roles * Refactor into multiple files * Rename contracts * Clean up helpers * More ActiveThreshold fixups * Clean up dao-voting-cw721-roles tests * Bug fixes and starting tests for cw721-roles * MVP roles voting contract * MVP voting-cw721-roles contract and tests * Fix transfer / send and clean up * Create NFT contract on instantiation dao-voting-cw721-staked * Add ActiveThreshold support to dao-voting-cw721-staked * More dao-voting-cw721-roles tests, clippy cleanup * Update schemas * Update readmes, clean up msg exports * Add basic test for instantiate NFT contract with dao-voting-cw721-roles * Fix WASM build * Update cw721 and cw721-base to 0.17 * Update contracts/external/cw721-roles/src/contract.rs Co-authored-by: Art3miX <[email protected]> * Address code review comments, more comments * Add active threshold tests, fix math * Clean up * Implement Art3Mix suggested change * Add optional on-chain role * Fix WASM build * Add ext methods to update role NFTs * Add more info to README.md * Update contract description * Ignore doc test * Make clippy happy * Update schemas * Fixups, tests for NFT sending to increase test coverage * Add ListMembers query and test * Add test coverage for hooks * More test coverage for dao-voting-cw721-staked * Remove unused hooks code from roles voting module * Update schema, make clippy happy * Try and fix integration tests -Z option not available in stable * Try running integration tests with stable rust * Use older nightly version * Another attempt to fix integration tests * Fix dao-voting-cw721-staked * Minor cleanup * More cleanup, bump workspace-optimizer version * More cleanup * Introduce dao-cw721-extensions package, fix wasm build --------- Co-authored-by: Art3miX <[email protected]>
* update lib versions * generate schema: `just gen` --------- Co-authored-by: Tai 'Mr. T' Truong <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #713 +/- ##
==========================================
+ Coverage 93.94% 94.04% +0.10%
==========================================
Files 60 62 +2
Lines 5215 5610 +395
==========================================
+ Hits 4899 5276 +377
- Misses 316 334 +18
☔ View full report in Codecov by Sentry. |
* chore(ci): action release-contracts * Apply suggestions from code review --------- Co-authored-by: Jake Hartnell <[email protected]>
* Support a wider variety of NFT contracts Makes the interface for instantiating a new collection a bit more generic to account for most types of cw721 and sg721 contracts. * Improve test coverage * Address PR comments, check errors * Apply @bekauz's suggestion * Add migrate message New features don't require any state migrations. Both `ACTIVE_THRESHOLD` and `HOOKS` are uninitialized if none are set, so no migration logic needed. * More test coverage
* docs.rs shield.io badges missing docs.rs: cw-fund-distributor cw-tokenfactory-issuer cw721-roles dao-voting-cw721-roles dao-voting-token-factory-staked * Readme h1 touchups * Removed extra linebreaks * Main README.md shields Added shields for: * github latest release * Discord * x/Twitter * Change contract docs.rs shield to latest release instead of v2.2.0 * Add docs.rs logo to contract shields * Add crates.io to contract shields * Add commit activity and contributor count to main README.md shields * Added logos to commit activity and contributor main README.md shields Rearranged shields * Added DAO DAO DAO to main README.md shields
* 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]>
* Add error to FailedProposalExecution response Minimal information is shown when a proposal execution fails, and this could give users a better clue of what went wrong. It should probably be used in all reply_on_error handles. * Avoid possible panic from unwrap_err()
* Start outlining factory pattern work * Add FactoryCallbacks, build out test-contract * Factory callback for NFT contracts * Remove unneeded files, generate Schema * Fix WASM build * Move test-contracts to contracts/test Needed for workspace optimizer as we are now using test contract binaries with tests * Clippy. : ) * Breakout sg-minter-factory contract * # This is a combination of 2 commits. # This is the 1st commit message: Simpler NFT factory test # The commit message #2 will be skipped: # f * Simpler NFT factory test * Remove sg-minter-factory (for now) * Implement factory pattern for NFTs * Better tests and token factory cleanup * Remove Stargaze support (supported via factory now) Context: after speaking with the team, they want all NFTs on the platform to utilize the fairburn mechanism. In addition, many artists creating new collections on Stargaze also want to create a minter for that collection to allow for sales. The factory pattern now allows for both. * Docs and comments on factory pattern, clean up * FactoryCallback -> TokenFactoryCallback * Fix NFT factory and tests * Fixup and tests for passthrough of funds * Better test coverage for factory pattern * Update InvalidActivePercentage error message for accuracy * Reuse validation logic, and fix bug that slipped through audit : ) * Fix possible to instantiate new collection with zero supply of NFTs, add tests We now validate supply regardless of what ActiveThreshold is set to. * Granular allowlisting of minters * Validate unstaking duration on instantiation and update config * TokenContract query should return optional type * ModuleInstantiateInfo callback to accept ownership of new NFT contract Ownship transfer process is two steps now, so the DAO needs to accept the ownership transfer. * Audit fixups and improvements related to factories - Extends dao-test-custom-factory to mint NFTs - Validate ActiveThreshold in NFT factory test contract - Add ModuleInstantiateCallback to nft factory call backs - Fix transfer ownership in factory test contract - Add ModuleInstantiateCallback to nft factory callbacks - Test ownership set correctly in token factory factory - Test for module instantiate callback in NFT factory - Include note that custom factory contracts MUST handle validation logic The most important change here is the that both `dao-voting-cw721-staked` and `dao-voting-token-staked` implement ModuleInstantiateCallback now, which allows for more complicated setup possibilities. * Use tagged cw-multi-test release * Add integration tests for dao-voting-cw721-staked * Split up test tube and integration tests --------- Co-authored-by: Jake Hartnell <[email protected]>
Let's do this now that we're at v2.3.0. 💪 |
* Add missing query to dao-pre-propose-approver. * Made map name more descriptive and return option instead of error on missing ID. * Renamed query to be more clear. * Updated type.
* Adds missing ability to query for completed proposals and view the created proposal ID when approved. * Fixed tests. * Updated type.
… as payroll factory. (#770)
…using the pre propose approval ID. (#773)
* Update deprecated function names to_binary and from_binary #761 * bump cosmwasm-std to latest * replace from_json_binary to from_json * fmt * bump cw-multi-test to latest * replace from_slice to from_json * replace to_vec with to_json_vec * clippy fix * bump osmosis-std and osmosis-test-tube to latest * bump prost to latest * revert osmosis-std, osmosis-test-tube & prost bump * Fix up test tube errors * cargo fmt * Fixups from merge * Clippy * Another merge fixup --------- Co-authored-by: Massvdev <[email protected]> Co-authored-by: Dat-Andre <[email protected]>
* Initial timelock / veto implementation * Add refund logic for veto * Refactor timelock Should break less of the existing tests, doesn't lead to weird migration state (passed at time zero), and if timelock configuration is updated it won't affect currently open proposals. * Start v2 migration * Start writing tests * Fix build and basic tests * Fix veto checks, add more tests * Cleanup unneeded changes * Veto before proposal passes feature (early veto) Allows for the vetoer to veto a proposal before it passes is veto_before_passed is set to true. Some DAOs may want this to be able to speed up their process. * Improve code reuse with proposal_completed_hooks * Fix formatting * Start fixing up migration tests * dao-migrator test fixups * Tests pass, made TODO notes on future work * using Expiration & Duration for timelock; some cleanups * readme * unit tests wip * unit tests * fmt; test for vetoing non-open/timelocked props * adding semver dependency; v3 migration test assertions * readme veto extension; validating migration from v2 versions * manual to_json_binary in pr scope * lockfile * clippy fmt * happy clippy * schemas * test tube timelock fields * fmt * Bugfix: use timelock from proposal instead of config Co-authored-by: noah <[email protected]> * Better doc comment Co-authored-by: noah <[email protected]> * Cleanup unused code * checking validating vetoer early in veto; sanity check in execution from timelocked state * veto updating state before logic * pre propose error NotClosedOrExecuted renaming to NotCompleted * renaming Timelocked prop status to VetoTimelock; timelock rename to veto * replacing notion of timelock with veto config * just gen * revert v2 migration on prop-single * Reverted migrator changes and added veto to migration params. * Updated dao-migrator schema. * Ran clippy and formatter. * Move proposal into passed state after the veto time lock expires. * Updated schema. * Fixed comments. * Fixed schema again. * Added veto to dao-proposal-multiple. * prop multi tests * validating veto config * lints * cleanup tests * Fixed veto expiration calculation and removed timelock duration validation. * Updated veto README and added to dao-proposal-multiple. * Updated schema. * Added validation that timelock_duration is the same units as the max_voting_period, and fixed tests. Also fixed missing timelock status handler. --------- Co-authored-by: bekauz <[email protected]> Co-authored-by: noah <[email protected]> Co-authored-by: Jake Hartnell <[email protected]> Co-authored-by: Noah Saso <[email protected]>
Not sure what we want to do with the |
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.
No description provided.