Skip to content
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

Reward distributor improvements #881

Merged
merged 8 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
434 changes: 217 additions & 217 deletions Cargo.lock

Large diffs are not rendered by default.

82 changes: 41 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resolver = "2"
edition = "2021"
license = "BSD-3-Clause"
repository = "https://github.com/DA0-DA0/dao-contracts"
version = "2.5.0"
version = "2.5.1"

[profile.release]
codegen-units = 1
Expand Down Expand Up @@ -85,46 +85,46 @@ wynd-utils = "0.4"
# optional owner.
cw-ownable = "0.5"

cw-admin-factory = { path = "./contracts/external/cw-admin-factory", version = "2.5.0" }
cw-denom = { path = "./packages/cw-denom", version = "2.5.0" }
cw-fund-distributor = { path = "./contracts/distribution/cw-fund-distributor", version = "2.5.0" }
cw-hooks = { path = "./packages/cw-hooks", version = "2.5.0" }
cw-paginate-storage = { path = "./packages/cw-paginate-storage", version = "2.5.0" }
cw-payroll-factory = { path = "./contracts/external/cw-payroll-factory", version = "2.5.0" }
cw-stake-tracker = { path = "./packages/cw-stake-tracker", version = "2.5.0" }
cw-tokenfactory-issuer = { path = "./contracts/external/cw-tokenfactory-issuer", version = "2.5.0", default-features = false }
cw-tokenfactory-types = { path = "./packages/cw-tokenfactory-types", version = "2.5.0", default-features = false }
cw-vesting = { path = "./contracts/external/cw-vesting", version = "2.5.0" }
cw-wormhole = { path = "./packages/cw-wormhole", version = "2.5.0" }
cw20-stake = { path = "./contracts/staking/cw20-stake", version = "2.5.0" }
cw721-controllers = { path = "./packages/cw721-controllers", version = "2.5.0" }
cw721-roles = { path = "./contracts/external/cw721-roles", version = "2.5.0" }
dao-cw721-extensions = { path = "./packages/dao-cw721-extensions", version = "2.5.0" }
dao-dao-core = { path = "./contracts/dao-dao-core", version = "2.5.0" }
dao-dao-macros = { path = "./packages/dao-dao-macros", version = "2.5.0" }
dao-hooks = { path = "./packages/dao-hooks", version = "2.5.0" }
dao-interface = { path = "./packages/dao-interface", version = "2.5.0" }
dao-pre-propose-approval-single = { path = "./contracts/pre-propose/dao-pre-propose-approval-single", version = "2.5.0" }
dao-pre-propose-approver = { path = "./contracts/pre-propose/dao-pre-propose-approver", version = "2.5.0" }
dao-pre-propose-base = { path = "./packages/dao-pre-propose-base", version = "2.5.0" }
dao-pre-propose-multiple = { path = "./contracts/pre-propose/dao-pre-propose-multiple", version = "2.5.0" }
dao-pre-propose-single = { path = "./contracts/pre-propose/dao-pre-propose-single", version = "2.5.0" }
dao-proposal-condorcet = { path = "./contracts/proposal/dao-proposal-condorcet", version = "2.5.0" }
dao-proposal-hook-counter = { path = "./contracts/test/dao-proposal-hook-counter", version = "2.5.0" }
dao-proposal-multiple = { path = "./contracts/proposal/dao-proposal-multiple", version = "2.5.0" }
dao-proposal-single = { path = "./contracts/proposal/dao-proposal-single", version = "2.5.0" }
dao-proposal-sudo = { path = "./contracts/test/dao-proposal-sudo", version = "2.5.0" }
dao-rewards-distributor = { path = "./contracts/distribution/dao-rewards-distributor", version = "2.5.0" }
dao-test-custom-factory = { path = "./contracts/test/dao-test-custom-factory", version = "2.5.0" }
dao-testing = { path = "./packages/dao-testing", version = "2.5.0" }
dao-voting = { path = "./packages/dao-voting", version = "2.5.0" }
dao-voting-cw20-balance = { path = "./contracts/test/dao-voting-cw20-balance", version = "2.5.0" }
dao-voting-cw20-staked = { path = "./contracts/voting/dao-voting-cw20-staked", version = "2.5.0" }
dao-voting-cw4 = { path = "./contracts/voting/dao-voting-cw4", version = "2.5.0" }
dao-voting-cw721-roles = { path = "./contracts/voting/dao-voting-cw721-roles", version = "2.5.0" }
dao-voting-cw721-staked = { path = "./contracts/voting/dao-voting-cw721-staked", version = "2.5.0" }
dao-voting-onft-staked = { path = "./contracts/voting/dao-voting-onft-staked", version = "2.5.0" }
dao-voting-token-staked = { path = "./contracts/voting/dao-voting-token-staked", version = "2.5.0" }
cw-admin-factory = { path = "./contracts/external/cw-admin-factory", version = "2.5.1" }
cw-denom = { path = "./packages/cw-denom", version = "2.5.1" }
cw-fund-distributor = { path = "./contracts/distribution/cw-fund-distributor", version = "2.5.1" }
cw-hooks = { path = "./packages/cw-hooks", version = "2.5.1" }
cw-paginate-storage = { path = "./packages/cw-paginate-storage", version = "2.5.1" }
cw-payroll-factory = { path = "./contracts/external/cw-payroll-factory", version = "2.5.1" }
cw-stake-tracker = { path = "./packages/cw-stake-tracker", version = "2.5.1" }
cw-tokenfactory-issuer = { path = "./contracts/external/cw-tokenfactory-issuer", version = "2.5.1", default-features = false }
cw-tokenfactory-types = { path = "./packages/cw-tokenfactory-types", version = "2.5.1", default-features = false }
cw-vesting = { path = "./contracts/external/cw-vesting", version = "2.5.1" }
cw-wormhole = { path = "./packages/cw-wormhole", version = "2.5.1" }
cw20-stake = { path = "./contracts/staking/cw20-stake", version = "2.5.1" }
cw721-controllers = { path = "./packages/cw721-controllers", version = "2.5.1" }
cw721-roles = { path = "./contracts/external/cw721-roles", version = "2.5.1" }
dao-cw721-extensions = { path = "./packages/dao-cw721-extensions", version = "2.5.1" }
dao-dao-core = { path = "./contracts/dao-dao-core", version = "2.5.1" }
dao-dao-macros = { path = "./packages/dao-dao-macros", version = "2.5.1" }
dao-hooks = { path = "./packages/dao-hooks", version = "2.5.1" }
dao-interface = { path = "./packages/dao-interface", version = "2.5.1" }
dao-pre-propose-approval-single = { path = "./contracts/pre-propose/dao-pre-propose-approval-single", version = "2.5.1" }
dao-pre-propose-approver = { path = "./contracts/pre-propose/dao-pre-propose-approver", version = "2.5.1" }
dao-pre-propose-base = { path = "./packages/dao-pre-propose-base", version = "2.5.1" }
dao-pre-propose-multiple = { path = "./contracts/pre-propose/dao-pre-propose-multiple", version = "2.5.1" }
dao-pre-propose-single = { path = "./contracts/pre-propose/dao-pre-propose-single", version = "2.5.1" }
dao-proposal-condorcet = { path = "./contracts/proposal/dao-proposal-condorcet", version = "2.5.1" }
dao-proposal-hook-counter = { path = "./contracts/test/dao-proposal-hook-counter", version = "2.5.1" }
dao-proposal-multiple = { path = "./contracts/proposal/dao-proposal-multiple", version = "2.5.1" }
dao-proposal-single = { path = "./contracts/proposal/dao-proposal-single", version = "2.5.1" }
dao-proposal-sudo = { path = "./contracts/test/dao-proposal-sudo", version = "2.5.1" }
dao-rewards-distributor = { path = "./contracts/distribution/dao-rewards-distributor", version = "2.5.1" }
dao-test-custom-factory = { path = "./contracts/test/dao-test-custom-factory", version = "2.5.1" }
dao-testing = { path = "./packages/dao-testing", version = "2.5.1" }
dao-voting = { path = "./packages/dao-voting", version = "2.5.1" }
dao-voting-cw20-balance = { path = "./contracts/test/dao-voting-cw20-balance", version = "2.5.1" }
dao-voting-cw20-staked = { path = "./contracts/voting/dao-voting-cw20-staked", version = "2.5.1" }
dao-voting-cw4 = { path = "./contracts/voting/dao-voting-cw4", version = "2.5.1" }
dao-voting-cw721-roles = { path = "./contracts/voting/dao-voting-cw721-roles", version = "2.5.1" }
dao-voting-cw721-staked = { path = "./contracts/voting/dao-voting-cw721-staked", version = "2.5.1" }
dao-voting-onft-staked = { path = "./contracts/voting/dao-voting-onft-staked", version = "2.5.1" }
dao-voting-token-staked = { path = "./contracts/voting/dao-voting-token-staked", version = "2.5.1" }

# v1 dependencies. used for state migrations.
cw-core-v1 = { package = "cw-core", version = "0.1.0" }
Expand Down
2 changes: 1 addition & 1 deletion contracts/dao-dao-core/schema/dao-dao-core.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "dao-dao-core",
"contract_version": "2.5.0",
"contract_version": "2.5.1",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "cw-fund-distributor",
"contract_version": "2.5.0",
"contract_version": "2.5.1",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "dao-rewards-distributor",
"contract_version": "2.5.0",
"contract_version": "2.5.1",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down Expand Up @@ -110,6 +110,13 @@
"format": "uint64",
"minimum": 0.0
},
"open_funding": {
"description": "whether or not non-owners can fund the distribution",
"type": [
"boolean",
"null"
]
},
"vp_contract": {
"description": "address to query the voting power",
"type": [
Expand Down Expand Up @@ -156,6 +163,20 @@
},
"additionalProperties": false
},
{
"description": "Used to fund the latest distribution with native tokens.",
"type": "object",
"required": [
"fund_latest"
],
"properties": {
"fund_latest": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Claims rewards for the sender.",
"type": "object",
Expand Down Expand Up @@ -307,12 +328,19 @@
"description": "address that will update the reward split when the voting power distribution changes",
"type": "string"
},
"open_funding": {
"description": "whether or not non-owners can fund the distribution. defaults to true.",
"type": [
"boolean",
"null"
]
},
"vp_contract": {
"description": "address to query the voting power",
"type": "string"
},
"withdraw_destination": {
"description": "destination address for reward clawbacks. defaults to owner",
"description": "destination address for reward clawbacks. defaults to owner.",
"type": [
"string",
"null"
Expand Down Expand Up @@ -786,6 +814,30 @@
},
"additionalProperties": false
},
{
"description": "Returns the undistributed rewards for a distribution.",
"type": "object",
"required": [
"undistributed_rewards"
],
"properties": {
"undistributed_rewards": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Returns the state of the given distribution.",
"type": "object",
Expand Down Expand Up @@ -864,6 +916,7 @@
"historical_earned_puvp",
"hook_caller",
"id",
"open_funding",
"vp_contract",
"withdraw_destination"
],
Expand Down Expand Up @@ -914,6 +967,10 @@
"format": "uint64",
"minimum": 0.0
},
"open_funding": {
"description": "whether or not non-owners can fund the distribution",
"type": "boolean"
},
"vp_contract": {
"description": "address to query the voting power",
"allOf": [
Expand Down Expand Up @@ -1254,6 +1311,7 @@
"historical_earned_puvp",
"hook_caller",
"id",
"open_funding",
"vp_contract",
"withdraw_destination"
],
Expand Down Expand Up @@ -1304,6 +1362,10 @@
"format": "uint64",
"minimum": 0.0
},
"open_funding": {
"description": "whether or not non-owners can fund the distribution",
"type": "boolean"
},
"vp_contract": {
"description": "address to query the voting power",
"allOf": [
Expand Down Expand Up @@ -1781,6 +1843,12 @@
"type": "string"
}
}
},
"undistributed_rewards": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Uint128",
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
"type": "string"
}
}
}
Loading
Loading