Skip to content
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
15 changes: 15 additions & 0 deletions Cargo.lock

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

35 changes: 35 additions & 0 deletions contracts/compliance-whitelist-wrapper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[package]
name = "compliance-whitelist-wrapper"
version = "0.1.0"
authors = ["Thales Zirbel <thaleszh@gmail.com>"]
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "rlib"]


[features]
# use library feature to disable all instantiate/execute/query exports
library = []

[package.metadata.scripts]
optimize = """docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/optimizer:0.15.0
"""

[dependencies]
cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = { workspace = true }
cw2 = { workspace = true }
schemars = "0.8.16"
serde = { version = "1.0.197", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.58" }
utils = { workspace = true }

[dev-dependencies]
cw-multi-test = { workspace = true }
5 changes: 5 additions & 0 deletions contracts/compliance-whitelist-wrapper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Compliance Whitelist Wrapper

This contract wraps other compliance contracts, filtering what is sent to them. If it finds an address that is in the whitelist, it will substitute it with None before forwarding it to the wrapped compliance module.

Only addresses with the OwnerRole ComplianceManager can add or remove addresses from the whitelist. Each compliance contract should have its own wrapper.
11 changes: 11 additions & 0 deletions contracts/compliance-whitelist-wrapper/src/bin/schema.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use compliance_whitelist_wrapper::msg::{ExecuteMsg, InstantiateMsg};
use cosmwasm_schema::write_api;
use utils::compliance::QueryMsg;

fn main() {
write_api! {
instantiate: InstantiateMsg,
execute: ExecuteMsg,
query: QueryMsg,
}
}
Loading
Loading