-
Notifications
You must be signed in to change notification settings - Fork 17
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: add lockdrop vault NTRN-343 #35
Merged
zavgorodnii
merged 11 commits into
neutron_audit_informal_17_01_2023
from
feat/add-lockdrop-vault
Feb 21, 2023
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4a73ed6
add voting vault exec msg macro
sotnikov-s f12055a
a couple of fixes+tests to neutron voting vault
sotnikov-s 68f259b
apply voting vault macro on neutron voting vault
sotnikov-s 19bdf02
introduce lockdrop vault mock
sotnikov-s 4ce5016
move typical voting vault queries to macro and add BondingStatus query
sotnikov-s 288deb1
add name and name query for voting vaults and add config validation
sotnikov-s 893fac6
rebuilt contracts
sotnikov-s f630dff
replace bond/unbond not implemented errors with dedicated ones for lo…
sotnikov-s c908763
Merge branch 'neutron_audit_informal_17_01_2023' of github.com:neutro…
sotnikov-s 7201e01
rebuild contracts
sotnikov-s af2049b
Merge branch 'neutron_audit_informal_17_01_2023' of github.com:neutro…
sotnikov-s File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
98d530814928c28813685bdd634d33c6d10bde7d8d3d14054dd28c18ecc082c7 target/wasm32-unknown-unknown/release/cwd_core.wasm | ||
5683c77f46619bea0dfc466792110a0008c447f9fec08e6e929892f70f11a53c target/wasm32-unknown-unknown/release/cwd_pre_propose_multiple.wasm | ||
d328a563a7125e5c1bd8d31004eacfea2417467efc040aac2ecc981040f566a6 target/wasm32-unknown-unknown/release/cwd_pre_propose_overrule.wasm | ||
9045a14917b5fe2aae20e8778bdb315ddee88dcd3f38e6d86fd2e1e820e585d0 target/wasm32-unknown-unknown/release/cwd_pre_propose_single.wasm | ||
78764327dccf528394eb79786bb75d8737687dfff33ea8e0497a71276a7ee926 target/wasm32-unknown-unknown/release/cwd_proposal_multiple.wasm | ||
fc79389148ad4653d8a9da2926c683d297b0c7ddce8bf2a865c70e0897cdb176 target/wasm32-unknown-unknown/release/cwd_proposal_single.wasm | ||
1ae934f9b3e188a4d7096f4f9231edfad84a482a33a66e90b5d0ce124065c062 target/wasm32-unknown-unknown/release/cwd_subdao_pre_propose_single.wasm | ||
91be9e3bbb44c0abfafc1602887348ac67c41511c6f2cbbca26e945e7125b159 target/wasm32-unknown-unknown/release/neutron_distribution.wasm | ||
2243d1d288ebc8c8110a95ea69226ba9012ffd79cad637147c6e9aa5a27c7942 target/wasm32-unknown-unknown/release/neutron_treasury.wasm | ||
b0ec185bb41233b43f1e38459b2397c4d15af2d814d2630f597d943dd1c86c01 target/wasm32-unknown-unknown/release/neutron_voting_registry.wasm | ||
98d530814928c28813685bdd634d33c6d10bde7d8d3d14054dd28c18ecc082c7 target/wasm32-unknown-unknown/release/cwd_core.wasm | ||
d328a563a7125e5c1bd8d31004eacfea2417467efc040aac2ecc981040f566a6 target/wasm32-unknown-unknown/release/cwd_pre_propose_overrule.wasm | ||
5f5de39421089a6edc7f6e8bbcfe90aa57115e6257d8f3e2c4ee9f026a8acf0e target/wasm32-unknown-unknown/release/cwd_subdao_proposal_single.wasm | ||
958d16502995b3793d757debf31462925a83d2a7ff64a9085cb039cdc647c6a6 target/wasm32-unknown-unknown/release/neutron_reserve.wasm | ||
2555e729336d8ea646673a72b044da8eb1a2277344715b4ac593bc609b5d44bb target/wasm32-unknown-unknown/release/neutron_vault.wasm | ||
182595fe1ffd93701b14c6f04d5ac40af1f43aabcfbdb7144b63d609a87154d0 target/wasm32-unknown-unknown/release/cwd_subdao_core.wasm | ||
2cbd1aeb99f73a7089fbcb94140096585c4db4611fb342a6e9843989feee1fd2 target/wasm32-unknown-unknown/release/cwd_subdao_timelock_single.wasm | ||
982741fd45b2e92967969e3f0953bd230bfd8e45a750c5916a1c40a30870d793 target/wasm32-unknown-unknown/release/lockdrop_vault.wasm | ||
a8db4fd0309edf7ddb2b8e222451126c0f2d80032467c3f7ed2bbd18cfb7bcb5 target/wasm32-unknown-unknown/release/neutron_vault.wasm | ||
7c99dc1f895fb4cc18fa62451ab70ff68ceefef63974cf066f191c260dfcf482 target/wasm32-unknown-unknown/release/neutron_voting_registry.wasm |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[package] | ||
name = "lockdrop-vault" | ||
version = "0.1.0" | ||
authors = ["Sergei Sotnikov <sergei.s@p2p.org>"] | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
repository = "https://github.com/neutron/neutron-dao" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[features] | ||
# for more explicit tests, cargo test --features=backtraces | ||
backtraces = ["cosmwasm-std/backtraces"] | ||
# use library feature to disable all instantiate/execute/query exports | ||
library = [] | ||
|
||
[dependencies] | ||
cosmwasm-std = { version = "1.0.0" } | ||
cw-storage-plus = "0.13" | ||
cw2 = "0.13" | ||
schemars = "0.8" | ||
serde = { version = "1.0.147", default-features = false, features = ["derive"] } | ||
thiserror = { version = "1.0" } | ||
cwd-macros = { path = "../../../../packages/cwd-macros" } | ||
cwd-interface = { path = "../../../../packages/cwd-interface" } | ||
neutron-lockdrop-vault = { path = "../../../../packages/neutron-lockdrop-vault" } | ||
|
||
[dev-dependencies] | ||
cosmwasm-schema = { version = "1.0.0" } | ||
cw-multi-test = "0.13" | ||
anyhow = "1.0.57" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Neutron Lockdrop Voting Vault | ||
|
||
This contract is not really a voting vault. It's rather an interface to get voting power from a Lockdrop contract. It's not possible to Bond or Unbond funds to this vault cause these ExecuteMsg handlers are introduced just to make the contract comply with the voting vault interface. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use std::env::current_dir; | ||
use std::fs::create_dir_all; | ||
|
||
use cosmwasm_schema::{export_schema, export_schema_with_title, remove_schemas, schema_for}; | ||
use cosmwasm_std::Addr; | ||
use cwd_interface::voting::{ | ||
BondingStatusResponse, InfoResponse, TotalPowerAtHeightResponse, VotingPowerAtHeightResponse, | ||
}; | ||
use neutron_lockdrop_vault::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; | ||
use neutron_lockdrop_vault::types::Config; | ||
|
||
fn main() { | ||
let mut out_dir = current_dir().unwrap(); | ||
out_dir.push("schema"); | ||
create_dir_all(&out_dir).unwrap(); | ||
remove_schemas(&out_dir).unwrap(); | ||
|
||
export_schema(&schema_for!(InstantiateMsg), &out_dir); | ||
export_schema(&schema_for!(ExecuteMsg), &out_dir); | ||
export_schema(&schema_for!(QueryMsg), &out_dir); | ||
export_schema(&schema_for!(MigrateMsg), &out_dir); | ||
|
||
export_schema(&schema_for!(InfoResponse), &out_dir); | ||
export_schema(&schema_for!(TotalPowerAtHeightResponse), &out_dir); | ||
export_schema(&schema_for!(VotingPowerAtHeightResponse), &out_dir); | ||
export_schema(&schema_for!(BondingStatusResponse), &out_dir); | ||
|
||
// Auto TS code generation expects the query return type as QueryNameResponse | ||
// Here we map query resonses to the correct name | ||
export_schema_with_title(&schema_for!(Addr), &out_dir, "DaoResponse"); | ||
export_schema_with_title(&schema_for!(Config), &out_dir, "GetConfigResponse"); | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use version
1.0.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created a task to update it across the whole repo: https://p2pvalidator.atlassian.net/browse/NTRN-381