Skip to content

Commit bac2cca

Browse files
authored
Merge pull request #5 from KiiChain/feat/cw20-flow
Add compliance wrapper and script new T-REX flow
2 parents 2c81a40 + 64c6eb0 commit bac2cca

16 files changed

Lines changed: 858 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[package]
2+
name = "compliance-whitelist-wrapper"
3+
version = "0.1.0"
4+
authors = ["Thales Zirbel <thaleszh@gmail.com>"]
5+
edition = "2021"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[lib]
10+
crate-type = ["cdylib", "rlib"]
11+
12+
13+
[features]
14+
# use library feature to disable all instantiate/execute/query exports
15+
library = []
16+
17+
[package.metadata.scripts]
18+
optimize = """docker run --rm -v "$(pwd)":/code \
19+
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
20+
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
21+
cosmwasm/optimizer:0.15.0
22+
"""
23+
24+
[dependencies]
25+
cosmwasm-schema = { workspace = true }
26+
cosmwasm-std = { workspace = true }
27+
cw-storage-plus = { workspace = true }
28+
cw2 = { workspace = true }
29+
schemars = "0.8.16"
30+
serde = { version = "1.0.197", default-features = false, features = ["derive"] }
31+
thiserror = { version = "1.0.58" }
32+
utils = { workspace = true }
33+
34+
[dev-dependencies]
35+
cw-multi-test = { workspace = true }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Compliance Whitelist Wrapper
2+
3+
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.
4+
5+
Only addresses with the OwnerRole ComplianceManager can add or remove addresses from the whitelist. Each compliance contract should have its own wrapper.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use compliance_whitelist_wrapper::msg::{ExecuteMsg, InstantiateMsg};
2+
use cosmwasm_schema::write_api;
3+
use utils::compliance::QueryMsg;
4+
5+
fn main() {
6+
write_api! {
7+
instantiate: InstantiateMsg,
8+
execute: ExecuteMsg,
9+
query: QueryMsg,
10+
}
11+
}

0 commit comments

Comments
 (0)