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

feat: NTRN-308 - Implement burn-based vesting for treasury #15

Merged
merged 3 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ Cargo.lock
**/*.rs.bk

.idea

85 changes: 72 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ check_contracts:
compile:
@./build_release.sh

build: schema clippy fmt compile check_contracts
build: schema clippy fmt test compile check_contracts



2 changes: 1 addition & 1 deletion artifacts/checksums.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ acba35a90a5b81256eda8055512e0e9117586b5869687986ebf8f0bf14a6d605 cwd_subdao_pro
341fce8e9437a4f3475d331e54acd12ef092450a39bff804543f9ee4c87e6556 cwd_subdao_timelock_single.wasm
de33de7ae51e0d0f64534dac4562f339cad66966f8b4d5762060b850f5f2f114 neutron_distribution.wasm
1982982b78b417fd87108c731f91a2226704b00fe722d0ad6985c45e5e444c89 neutron_reserve.wasm
ea4a6c7d9cb14bed91eb572b2531070db1a7f7dace1e217d759ea2cebaa769b5 neutron_treasury.wasm
fb003c04917dad5e51c8bcbc5c172705f8c86c1ce88c5a139b828f5b88b18de2 neutron_treasury.wasm
dc5542363aba30fb46f32d2cf0e883cc8122736bc149a11ce3d3cfeb4ef9830c neutron_vault.wasm
7516c30b8868f52596306c1f54a6daf83da53f8e585cd1fe6210990cb2747051 neutron_voting_registry.wasm
2 changes: 1 addition & 1 deletion artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ f9affa3dbdd7632bfd2c9b90de9e959cf441f94fdbb5b47068781de94fa4fcce target/wasm32-
e27881309f58faeebada41e462a1210a068f6194db4834faa5f6fb24a6c4d295 target/wasm32-unknown-unknown/release/cwd_subdao_core.wasm
21bfa6eb92d9b98c4fe73567471b09cb849614d0ff8a739e6bfe3d28c24e0094 target/wasm32-unknown-unknown/release/neutron_distribution.wasm
143a562b387797caff1e6c51ab80a4ce678419e00b2986b362b7aff378b762e5 target/wasm32-unknown-unknown/release/neutron_reserve.wasm
117bfb323974358045d534d1362fdc26d1fed805ec357da9ba1fd38f17fc714e target/wasm32-unknown-unknown/release/neutron_treasury.wasm
766ae9b870511352aa835e53b88bee081b565c31af69ddacc9d5bbc32f41c3fc target/wasm32-unknown-unknown/release/neutron_treasury.wasm
Binary file modified artifacts/neutron_treasury.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mod mock_querier;
pub mod mock_querier;
mod tests;
1 change: 0 additions & 1 deletion contracts/tokenomics/distribution/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pub enum QueryMsg {
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub struct StatsResponse {
pub total_received: Uint128,
pub total_distributed: Uint128,
pub last_balance: Uint128,
}
Expand Down
1 change: 1 addition & 0 deletions contracts/tokenomics/reserve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ pub mod contract;
pub mod error;
pub mod msg;
pub mod state;

#[cfg(test)]
mod testing;
8 changes: 8 additions & 0 deletions contracts/tokenomics/treasury/.cargo/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@
"string",
"null"
]
},
"vesting_denominator": {
"type": [
"integer",
"null"
],
"format": "uint128",
"minimum": 0.0
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"distribution_rate",
"min_period",
"owner",
"reserve_contract"
"reserve_contract",
"vesting_denominator"
],
"properties": {
"denom": {
Expand Down Expand Up @@ -38,6 +39,12 @@
"reserve_contract": {
"description": "Address of reserve contract",
"type": "string"
},
"vesting_denominator": {
"description": "Vesting release equation denominator",
"type": "integer",
"format": "uint128",
"minimum": 0.0
}
},
"definitions": {
Expand Down
1 change: 1 addition & 0 deletions contracts/tokenomics/treasury/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ crate-type = ["cdylib", "rlib"]
backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
neutron_bindings = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk.git" }
cosmwasm-std = { version = "1.0" }
cw-storage-plus = "1.0.1"
schemars = "0.8.1"
Expand Down
8 changes: 8 additions & 0 deletions contracts/tokenomics/treasury/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@
"string",
"null"
]
},
"vesting_denominator": {
"type": [
"integer",
"null"
],
"format": "uint128",
"minimum": 0.0
}
}
}
Expand Down
9 changes: 8 additions & 1 deletion contracts/tokenomics/treasury/schema/instantiate_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"main_dao_address",
"min_period",
"reserve_contract",
"security_dao_address"
"security_dao_address",
"vesting_denominator"
],
"properties": {
"denom": {
Expand Down Expand Up @@ -43,6 +44,12 @@
"security_dao_address": {
"description": "Address of security DAO contract",
"type": "string"
},
"vesting_denominator": {
"description": "Vesting release function denominator",
"type": "integer",
"format": "uint128",
"minimum": 0.0
}
},
"definitions": {
Expand Down
Loading