-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added the chain manager contract #NTRN-211
- Loading branch information
Andrei Zavgorodnii
committed
Feb 12, 2024
1 parent
d787d2b
commit 46c57f5
Showing
19 changed files
with
6,081 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[alias] | ||
wasm = "build --release --target wasm32-unknown-unknown" | ||
unit-test = "test --lib" | ||
schema = "run --example neutron-chain-manager_schema" |
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,15 @@ | ||
# Build results | ||
/target | ||
|
||
# Cargo+Git helper file (https://github.com/rust-lang/cargo/blob/0.44.1/src/cargo/sources/git/utils.rs#L320-L327) | ||
.cargo-ok | ||
|
||
# Text file backups | ||
**/*.rs.bk | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
# IDEs | ||
*.iml | ||
.idea |
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,38 @@ | ||
[package] | ||
authors = ["Andrei Zavgorodnii <[email protected]>"] | ||
description = "A chain manager implementation that grants fine-grained admin permissions to other contracts" | ||
edition = "2021" | ||
name = "neutron-chain-manager" | ||
repository = "https://github.com/neutron-org/neutron-dao" | ||
version = "0.3.0" | ||
|
||
[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-schema = {version = "1.3.0"} | ||
cosmwasm-std = {version = "1.3.0"} | ||
cosmwasm-storage = {version = "1.3.0"} | ||
cw-controllers = "1.1.0" | ||
cw-paginate = {path = "../../../packages/cw-paginate"} | ||
cw-storage-plus = "1.1.0" | ||
cw-utils = {version = "1.0.1"} | ||
cw2 = "1.1.0" | ||
cwd-interface = {path = "../../../packages/cwd-interface"} | ||
cwd-macros = {path = "../../../packages/cwd-macros"} | ||
schemars = "0.8.8" | ||
serde = {version = "1.0.175", default-features = false, features = ["derive"]} | ||
thiserror = {version = "1.0"} | ||
neutron-sdk = "0.8.0" | ||
serde-json-wasm = "1.0.1" | ||
prost = "0.9.0" | ||
|
||
[dev-dependencies] | ||
anyhow = "1.0.57" | ||
cw-multi-test = "0.16.5" |
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,6 @@ | ||
### Neutron Chain Manager | ||
|
||
This contract implements a **chain management** **model** with two types of permission strategies: | ||
|
||
1. **ALLOW_ALL**: gives a given address full access to the admin module, allowing to submit all possible types of privileged messages; | ||
2. **ALLOW_ONLY**: allows a given address to submit privileged messages of a specific type, with further restrictions if applicable (see below). |
Oops, something went wrong.