├── packages └── my-package │ ├── README.md │ ├── src │ └── lib.rs │ └── Cargo.toml ├── contracts └── my-contract │ ├── README.md │ ├── examples │ └── schema.rs │ ├── Cargo.toml │ └── src │ └── lib.rs ├── .gitignore ├── rustfmt.toml ├── README.md ├── .github └── workflows │ ├── wasm.yaml │ └── rust.yaml ├── justfile ├── Cargo.toml └── Cargo.lock /packages/my-package/README.md: -------------------------------------------------------------------------------- 1 | # my-package 2 | 3 | Description of the package 4 | 5 | ## License 6 | 7 | TBD 8 | -------------------------------------------------------------------------------- /contracts/my-contract/README.md: -------------------------------------------------------------------------------- 1 | # my-contract 2 | 3 | Description of the contract 4 | 5 | ## License 6 | 7 | TBD 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # cosmwasm build artifacts 2 | artifacts/ 3 | 4 | # rust 5 | target/ 6 | 7 | # editors 8 | .idea/ 9 | .vscode/ 10 | 11 | # macos 12 | .DS_Store 13 | -------------------------------------------------------------------------------- /contracts/my-contract/examples/schema.rs: -------------------------------------------------------------------------------- 1 | use cosmwasm_schema::write_api; 2 | use my_package::{ExecuteMsg, InstantiateMsg, QueryMsg}; 3 | 4 | fn main() { 5 | write_api! { 6 | instantiate: InstantiateMsg, 7 | execute: ExecuteMsg, 8 | query: QueryMsg, 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | # https://rust-lang.github.io/rustfmt 2 | format_code_in_doc_comments = true # nightly 3 | group_imports = "StdExternalCrate" # nightly 4 | imports_granularity = "Crate" # nightly 5 | match_block_trailing_comma = true 6 | max_width = 100 7 | use_small_heuristics = "off" 8 | -------------------------------------------------------------------------------- /packages/my-package/src/lib.rs: -------------------------------------------------------------------------------- 1 | use cosmwasm_schema::{cw_serde, QueryResponses}; 2 | use cw_ownable::{cw_ownable_execute, cw_ownable_query}; 3 | 4 | #[cw_serde] 5 | pub struct InstantiateMsg { 6 | /// The account to be appointed the contract owner 7 | pub owner: String, 8 | } 9 | 10 | #[cw_ownable_execute] 11 | #[cw_serde] 12 | pub enum ExecuteMsg {} 13 | 14 | #[cw_ownable_query] 15 | #[cw_serde] 16 | #[derive(QueryResponses)] 17 | pub enum QueryMsg {} 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CosmWasm Template 2 | 3 | Template for multi-contract [CosmWasm](https://github.com/CosmWasm/cosmwasm) projects. 4 | 5 | ## How to Use 6 | 7 | Install just: https://github.com/casey/just 8 | 9 | Run linter: 10 | 11 | ```bash 12 | just clippy 13 | ``` 14 | 15 | Run unit tests: 16 | 17 | ```bash 18 | just test 19 | ``` 20 | 21 | Compile all contracts using [rust-optimizer](https://github.com/CosmWasm/rust-optimizer): 22 | 23 | ```bash 24 | just optimize 25 | ``` 26 | 27 | ## License 28 | 29 | TBD 30 | -------------------------------------------------------------------------------- /packages/my-package/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "my-package" 3 | description = "Description of the package" 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | edition = { workspace = true } 7 | license = { workspace = true } 8 | homepage = { workspace = true } 9 | repository = { workspace = true } 10 | documentation = { workspace = true } 11 | keywords = { workspace = true } 12 | rust-version = { workspace = true } 13 | 14 | [dependencies] 15 | cosmwasm-schema = { workspace = true } 16 | cw-ownable = { workspace = true } 17 | -------------------------------------------------------------------------------- /.github/workflows/wasm.yaml: -------------------------------------------------------------------------------- 1 | name: Wasm 2 | 3 | on: push 4 | 5 | jobs: 6 | check: 7 | name: Check 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout sources 11 | uses: actions/checkout@v3 12 | 13 | - name: Install Just 14 | uses: extractions/setup-just@v1 15 | 16 | - name: Install toolchain 17 | uses: dtolnay/rust-toolchain@stable 18 | with: 19 | toolchain: stable 20 | targets: wasm32-unknown-unknown 21 | 22 | - name: Check for errors 23 | run: just rust-check 24 | env: 25 | RUST_BACKTRACE: 1 26 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | check: 2 | cargo check --target wasm32-unknown-unknown 3 | 4 | clippy: 5 | cargo +nightly clippy --tests 6 | 7 | test: 8 | cargo test 9 | 10 | optimize: 11 | if [[ $(uname -m) =~ "arm64" ]]; then \ 12 | just optimize-arm; else \ 13 | just optimize-x86; fi 14 | 15 | optimize-arm: 16 | docker run --rm -v "$(pwd)":/code \ 17 | --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ 18 | --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ 19 | --platform linux/arm64 \ 20 | cosmwasm/workspace-optimizer-arm64:0.13.0 21 | 22 | optimize-x86: 23 | docker run --rm -v "$(pwd)":/code \ 24 | --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ 25 | --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ 26 | --platform linux/amd64 \ 27 | cosmwasm/workspace-optimizer:0.13.0 28 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["contracts/*", "packages/*"] 3 | 4 | [workspace.package] 5 | version = "0.0.0" 6 | authors = ["Larry Lyu "] 7 | edition = "2021" 8 | rust-version = "1.69.0" 9 | license = "TBD" 10 | homepage = "https://larry.engineer" 11 | repository = "https://github.com/larry0x/cw-template" 12 | documentation = "https://github.com/larry0x/cw-template#readme" 13 | keywords = ["blockchain", "cosmos", "cosmwasm"] 14 | 15 | [workspace.dependencies] 16 | cosmwasm-schema = "1.3" 17 | cosmwasm-std = "1.3" 18 | cw2 = "1.1" 19 | cw-ownable = "0.5" 20 | thiserror = "1" 21 | 22 | [profile.release] 23 | codegen-units = 1 24 | debug = false 25 | debug-assertions = false 26 | incremental = false 27 | lto = true 28 | opt-level = 3 29 | overflow-checks = true 30 | rpath = false 31 | -------------------------------------------------------------------------------- /contracts/my-contract/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "my-contract" 3 | description = "Description of the contract" 4 | version = { workspace = true } 5 | authors = { workspace = true } 6 | edition = { workspace = true } 7 | license = { workspace = true } 8 | homepage = { workspace = true } 9 | repository = { workspace = true } 10 | documentation = { workspace = true } 11 | keywords = { workspace = true } 12 | rust-version = { workspace = true } 13 | 14 | [lib] 15 | crate-type = ["cdylib", "rlib"] 16 | 17 | [features] 18 | # for more explicit tests, cargo test --features=backtraces 19 | backtraces = ["cosmwasm-std/backtraces"] 20 | # use library feature to disable all instantiate/execute/query exports 21 | library = [] 22 | 23 | [dependencies] 24 | cosmwasm-schema = { workspace = true } 25 | cosmwasm-std = { workspace = true } 26 | cw2 = { workspace = true } 27 | cw-ownable = { workspace = true } 28 | my-package = { path = "../../packages/my-package" } 29 | thiserror = { workspace = true } 30 | -------------------------------------------------------------------------------- /.github/workflows/rust.yaml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: push 4 | 5 | jobs: 6 | test: 7 | name: Test 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout sources 11 | uses: actions/checkout@v3 12 | 13 | - name: Install Just 14 | uses: extractions/setup-just@v1 15 | 16 | - name: Install toolchain 17 | uses: dtolnay/rust-toolchain@stable 18 | with: 19 | toolchain: stable 20 | 21 | - name: Run tests 22 | run: just rust-test 23 | env: 24 | RUST_BACKTRACE: 1 25 | 26 | lint: 27 | name: Lint 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Checkout sources 31 | uses: actions/checkout@v3 32 | 33 | - name: Install Just 34 | uses: extractions/setup-just@v1 35 | 36 | - name: Install toolchain 37 | uses: dtolnay/rust-toolchain@stable 38 | with: 39 | toolchain: nightly 40 | components: clippy 41 | 42 | - name: Run linter 43 | run: just rust-lint 44 | env: 45 | RUST_BACKTRACE: 1 46 | -------------------------------------------------------------------------------- /contracts/my-contract/src/lib.rs: -------------------------------------------------------------------------------- 1 | use cosmwasm_std::{ 2 | entry_point, to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, 3 | }; 4 | use cw_ownable::OwnershipError; 5 | use my_package::{ExecuteMsg, InstantiateMsg, QueryMsg}; 6 | 7 | pub const CONTRACT_NAME: &str = "crates.io:my-contract"; 8 | pub const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); 9 | 10 | #[entry_point] 11 | pub fn instantiate( 12 | deps: DepsMut, 13 | _env: Env, 14 | _info: MessageInfo, 15 | msg: InstantiateMsg, 16 | ) -> StdResult { 17 | cw2::set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; 18 | cw_ownable::initialize_owner(deps.storage, deps.api, Some(&msg.owner))?; 19 | Ok(Response::default()) 20 | } 21 | 22 | #[entry_point] 23 | pub fn execute( 24 | deps: DepsMut, 25 | env: Env, 26 | info: MessageInfo, 27 | msg: ExecuteMsg, 28 | ) -> Result { 29 | match msg { 30 | ExecuteMsg::UpdateOwnership(action) => { 31 | cw_ownable::update_ownership(deps, &env.block, &info.sender, action)?; 32 | Ok(Response::default()) 33 | }, 34 | } 35 | } 36 | 37 | #[entry_point] 38 | pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { 39 | match msg { 40 | QueryMsg::Ownership {} => { 41 | let ownership = cw_ownable::get_ownership(deps.storage)?; 42 | to_binary(&ownership) 43 | }, 44 | } 45 | } 46 | 47 | #[derive(Debug, thiserror::Error)] 48 | pub enum ContractError { 49 | #[error(transparent)] 50 | Std(#[from] StdError), 51 | 52 | #[error(transparent)] 53 | Ownership(#[from] OwnershipError), 54 | } 55 | 56 | // ----------------------------------- Tests ----------------------------------- 57 | 58 | #[cfg(test)] 59 | mod tests { 60 | use cosmwasm_std::{ 61 | testing::{mock_dependencies, mock_env, mock_info}, 62 | Addr, 63 | }; 64 | use cw2::ContractVersion; 65 | use cw_ownable::Ownership; 66 | 67 | use super::*; 68 | 69 | #[test] 70 | fn proper_initialization() { 71 | let mut deps = mock_dependencies(); 72 | 73 | // run instantiation logic 74 | instantiate( 75 | deps.as_mut(), 76 | mock_env(), 77 | mock_info("larry", &[]), 78 | InstantiateMsg { 79 | owner: "pumpkin".into(), 80 | }, 81 | ) 82 | .unwrap(); 83 | 84 | // correct cw2 version info should have been stored 85 | let version = cw2::get_contract_version(deps.as_ref().storage).unwrap(); 86 | assert_eq!( 87 | version, 88 | ContractVersion { 89 | contract: CONTRACT_NAME.into(), 90 | version: CONTRACT_VERSION.into(), 91 | }, 92 | ); 93 | 94 | // correct ownership info should have been stored 95 | let ownership = cw_ownable::get_ownership(deps.as_ref().storage).unwrap(); 96 | assert_eq!( 97 | ownership, 98 | Ownership { 99 | owner: Some(Addr::unchecked("pumpkin")), 100 | pending_owner: None, 101 | pending_expiry: None, 102 | }, 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ahash" 7 | version = "0.7.6" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 10 | dependencies = [ 11 | "getrandom", 12 | "once_cell", 13 | "version_check", 14 | ] 15 | 16 | [[package]] 17 | name = "base16ct" 18 | version = "0.1.1" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" 21 | 22 | [[package]] 23 | name = "base64" 24 | version = "0.13.1" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 27 | 28 | [[package]] 29 | name = "base64ct" 30 | version = "1.6.0" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 33 | 34 | [[package]] 35 | name = "block-buffer" 36 | version = "0.9.0" 37 | source = "registry+https://github.com/rust-lang/crates.io-index" 38 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 39 | dependencies = [ 40 | "generic-array", 41 | ] 42 | 43 | [[package]] 44 | name = "block-buffer" 45 | version = "0.10.4" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 48 | dependencies = [ 49 | "generic-array", 50 | ] 51 | 52 | [[package]] 53 | name = "bnum" 54 | version = "0.7.0" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "845141a4fade3f790628b7daaaa298a25b204fb28907eb54febe5142db6ce653" 57 | 58 | [[package]] 59 | name = "byteorder" 60 | version = "1.4.3" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 63 | 64 | [[package]] 65 | name = "cfg-if" 66 | version = "1.0.0" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 69 | 70 | [[package]] 71 | name = "const-oid" 72 | version = "0.9.4" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" 75 | 76 | [[package]] 77 | name = "cosmwasm-crypto" 78 | version = "1.3.1" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "7e272708a9745dad8b591ef8a718571512130f2b39b33e3d7a27c558e3069394" 81 | dependencies = [ 82 | "digest 0.10.7", 83 | "ed25519-zebra", 84 | "k256", 85 | "rand_core 0.6.4", 86 | "thiserror", 87 | ] 88 | 89 | [[package]] 90 | name = "cosmwasm-derive" 91 | version = "1.3.1" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "296db6a3caca5283425ae0cf347f4e46999ba3f6620dbea8939a0e00347831ce" 94 | dependencies = [ 95 | "syn 1.0.109", 96 | ] 97 | 98 | [[package]] 99 | name = "cosmwasm-schema" 100 | version = "1.3.1" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "63c337e097a089e5b52b5d914a7ff6613332777f38ea6d9d36e1887cd0baa72e" 103 | dependencies = [ 104 | "cosmwasm-schema-derive", 105 | "schemars", 106 | "serde", 107 | "serde_json", 108 | "thiserror", 109 | ] 110 | 111 | [[package]] 112 | name = "cosmwasm-schema-derive" 113 | version = "1.3.1" 114 | source = "registry+https://github.com/rust-lang/crates.io-index" 115 | checksum = "766cc9e7c1762d8fc9c0265808910fcad755200cd0e624195a491dd885a61169" 116 | dependencies = [ 117 | "proc-macro2", 118 | "quote", 119 | "syn 1.0.109", 120 | ] 121 | 122 | [[package]] 123 | name = "cosmwasm-std" 124 | version = "1.3.1" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "eb5e05a95fd2a420cca50f4e94eb7e70648dac64db45e90403997ebefeb143bd" 127 | dependencies = [ 128 | "base64", 129 | "bnum", 130 | "cosmwasm-crypto", 131 | "cosmwasm-derive", 132 | "derivative", 133 | "forward_ref", 134 | "hex", 135 | "schemars", 136 | "serde", 137 | "serde-json-wasm", 138 | "sha2 0.10.7", 139 | "thiserror", 140 | ] 141 | 142 | [[package]] 143 | name = "cpufeatures" 144 | version = "0.2.9" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" 147 | dependencies = [ 148 | "libc", 149 | ] 150 | 151 | [[package]] 152 | name = "crypto-bigint" 153 | version = "0.4.9" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" 156 | dependencies = [ 157 | "generic-array", 158 | "rand_core 0.6.4", 159 | "subtle", 160 | "zeroize", 161 | ] 162 | 163 | [[package]] 164 | name = "crypto-common" 165 | version = "0.1.6" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 168 | dependencies = [ 169 | "generic-array", 170 | "typenum", 171 | ] 172 | 173 | [[package]] 174 | name = "curve25519-dalek" 175 | version = "3.2.0" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" 178 | dependencies = [ 179 | "byteorder", 180 | "digest 0.9.0", 181 | "rand_core 0.5.1", 182 | "subtle", 183 | "zeroize", 184 | ] 185 | 186 | [[package]] 187 | name = "cw-address-like" 188 | version = "1.0.4" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "451a4691083a88a3c0630a8a88799e9d4cd6679b7ce8ff22b8da2873ff31d380" 191 | dependencies = [ 192 | "cosmwasm-std", 193 | ] 194 | 195 | [[package]] 196 | name = "cw-ownable" 197 | version = "0.5.1" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "093dfb4520c48b5848274dd88ea99e280a04bc08729603341c7fb0d758c74321" 200 | dependencies = [ 201 | "cosmwasm-schema", 202 | "cosmwasm-std", 203 | "cw-address-like", 204 | "cw-ownable-derive", 205 | "cw-storage-plus", 206 | "cw-utils", 207 | "thiserror", 208 | ] 209 | 210 | [[package]] 211 | name = "cw-ownable-derive" 212 | version = "0.5.1" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "a1d3bf2e0f341bb6cc100d7d441d31cf713fbd3ce0c511f91e79f14b40a889af" 215 | dependencies = [ 216 | "proc-macro2", 217 | "quote", 218 | "syn 1.0.109", 219 | ] 220 | 221 | [[package]] 222 | name = "cw-storage-plus" 223 | version = "1.1.0" 224 | source = "registry+https://github.com/rust-lang/crates.io-index" 225 | checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" 226 | dependencies = [ 227 | "cosmwasm-std", 228 | "schemars", 229 | "serde", 230 | ] 231 | 232 | [[package]] 233 | name = "cw-utils" 234 | version = "1.0.1" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" 237 | dependencies = [ 238 | "cosmwasm-schema", 239 | "cosmwasm-std", 240 | "cw2", 241 | "schemars", 242 | "semver", 243 | "serde", 244 | "thiserror", 245 | ] 246 | 247 | [[package]] 248 | name = "cw2" 249 | version = "1.1.0" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908" 252 | dependencies = [ 253 | "cosmwasm-schema", 254 | "cosmwasm-std", 255 | "cw-storage-plus", 256 | "schemars", 257 | "serde", 258 | "thiserror", 259 | ] 260 | 261 | [[package]] 262 | name = "der" 263 | version = "0.6.1" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" 266 | dependencies = [ 267 | "const-oid", 268 | "zeroize", 269 | ] 270 | 271 | [[package]] 272 | name = "derivative" 273 | version = "2.2.0" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 276 | dependencies = [ 277 | "proc-macro2", 278 | "quote", 279 | "syn 1.0.109", 280 | ] 281 | 282 | [[package]] 283 | name = "digest" 284 | version = "0.9.0" 285 | source = "registry+https://github.com/rust-lang/crates.io-index" 286 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 287 | dependencies = [ 288 | "generic-array", 289 | ] 290 | 291 | [[package]] 292 | name = "digest" 293 | version = "0.10.7" 294 | source = "registry+https://github.com/rust-lang/crates.io-index" 295 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 296 | dependencies = [ 297 | "block-buffer 0.10.4", 298 | "crypto-common", 299 | "subtle", 300 | ] 301 | 302 | [[package]] 303 | name = "dyn-clone" 304 | version = "1.0.12" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" 307 | 308 | [[package]] 309 | name = "ecdsa" 310 | version = "0.14.8" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" 313 | dependencies = [ 314 | "der", 315 | "elliptic-curve", 316 | "rfc6979", 317 | "signature", 318 | ] 319 | 320 | [[package]] 321 | name = "ed25519-zebra" 322 | version = "3.1.0" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" 325 | dependencies = [ 326 | "curve25519-dalek", 327 | "hashbrown", 328 | "hex", 329 | "rand_core 0.6.4", 330 | "serde", 331 | "sha2 0.9.9", 332 | "zeroize", 333 | ] 334 | 335 | [[package]] 336 | name = "elliptic-curve" 337 | version = "0.12.3" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" 340 | dependencies = [ 341 | "base16ct", 342 | "crypto-bigint", 343 | "der", 344 | "digest 0.10.7", 345 | "ff", 346 | "generic-array", 347 | "group", 348 | "pkcs8", 349 | "rand_core 0.6.4", 350 | "sec1", 351 | "subtle", 352 | "zeroize", 353 | ] 354 | 355 | [[package]] 356 | name = "ff" 357 | version = "0.12.1" 358 | source = "registry+https://github.com/rust-lang/crates.io-index" 359 | checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" 360 | dependencies = [ 361 | "rand_core 0.6.4", 362 | "subtle", 363 | ] 364 | 365 | [[package]] 366 | name = "forward_ref" 367 | version = "1.0.0" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" 370 | 371 | [[package]] 372 | name = "generic-array" 373 | version = "0.14.7" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 376 | dependencies = [ 377 | "typenum", 378 | "version_check", 379 | ] 380 | 381 | [[package]] 382 | name = "getrandom" 383 | version = "0.2.10" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" 386 | dependencies = [ 387 | "cfg-if", 388 | "libc", 389 | "wasi", 390 | ] 391 | 392 | [[package]] 393 | name = "group" 394 | version = "0.12.1" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" 397 | dependencies = [ 398 | "ff", 399 | "rand_core 0.6.4", 400 | "subtle", 401 | ] 402 | 403 | [[package]] 404 | name = "hashbrown" 405 | version = "0.12.3" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 408 | dependencies = [ 409 | "ahash", 410 | ] 411 | 412 | [[package]] 413 | name = "hex" 414 | version = "0.4.3" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 417 | 418 | [[package]] 419 | name = "hmac" 420 | version = "0.12.1" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 423 | dependencies = [ 424 | "digest 0.10.7", 425 | ] 426 | 427 | [[package]] 428 | name = "itoa" 429 | version = "1.0.9" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" 432 | 433 | [[package]] 434 | name = "k256" 435 | version = "0.11.6" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" 438 | dependencies = [ 439 | "cfg-if", 440 | "ecdsa", 441 | "elliptic-curve", 442 | "sha2 0.10.7", 443 | ] 444 | 445 | [[package]] 446 | name = "libc" 447 | version = "0.2.147" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 450 | 451 | [[package]] 452 | name = "my-contract" 453 | version = "0.0.0" 454 | dependencies = [ 455 | "cosmwasm-schema", 456 | "cosmwasm-std", 457 | "cw-ownable", 458 | "cw2", 459 | "my-package", 460 | "thiserror", 461 | ] 462 | 463 | [[package]] 464 | name = "my-package" 465 | version = "0.0.0" 466 | dependencies = [ 467 | "cosmwasm-schema", 468 | "cw-ownable", 469 | ] 470 | 471 | [[package]] 472 | name = "once_cell" 473 | version = "1.18.0" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 476 | 477 | [[package]] 478 | name = "opaque-debug" 479 | version = "0.3.0" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 482 | 483 | [[package]] 484 | name = "pkcs8" 485 | version = "0.9.0" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" 488 | dependencies = [ 489 | "der", 490 | "spki", 491 | ] 492 | 493 | [[package]] 494 | name = "proc-macro2" 495 | version = "1.0.66" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" 498 | dependencies = [ 499 | "unicode-ident", 500 | ] 501 | 502 | [[package]] 503 | name = "quote" 504 | version = "1.0.32" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" 507 | dependencies = [ 508 | "proc-macro2", 509 | ] 510 | 511 | [[package]] 512 | name = "rand_core" 513 | version = "0.5.1" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 516 | 517 | [[package]] 518 | name = "rand_core" 519 | version = "0.6.4" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 522 | dependencies = [ 523 | "getrandom", 524 | ] 525 | 526 | [[package]] 527 | name = "rfc6979" 528 | version = "0.3.1" 529 | source = "registry+https://github.com/rust-lang/crates.io-index" 530 | checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" 531 | dependencies = [ 532 | "crypto-bigint", 533 | "hmac", 534 | "zeroize", 535 | ] 536 | 537 | [[package]] 538 | name = "ryu" 539 | version = "1.0.15" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" 542 | 543 | [[package]] 544 | name = "schemars" 545 | version = "0.8.12" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" 548 | dependencies = [ 549 | "dyn-clone", 550 | "schemars_derive", 551 | "serde", 552 | "serde_json", 553 | ] 554 | 555 | [[package]] 556 | name = "schemars_derive" 557 | version = "0.8.12" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" 560 | dependencies = [ 561 | "proc-macro2", 562 | "quote", 563 | "serde_derive_internals", 564 | "syn 1.0.109", 565 | ] 566 | 567 | [[package]] 568 | name = "sec1" 569 | version = "0.3.0" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" 572 | dependencies = [ 573 | "base16ct", 574 | "der", 575 | "generic-array", 576 | "pkcs8", 577 | "subtle", 578 | "zeroize", 579 | ] 580 | 581 | [[package]] 582 | name = "semver" 583 | version = "1.0.18" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" 586 | 587 | [[package]] 588 | name = "serde" 589 | version = "1.0.178" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "60363bdd39a7be0266a520dab25fdc9241d2f987b08a01e01f0ec6d06a981348" 592 | dependencies = [ 593 | "serde_derive", 594 | ] 595 | 596 | [[package]] 597 | name = "serde-json-wasm" 598 | version = "0.5.1" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" 601 | dependencies = [ 602 | "serde", 603 | ] 604 | 605 | [[package]] 606 | name = "serde_derive" 607 | version = "1.0.178" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "f28482318d6641454cb273da158647922d1be6b5a2fcc6165cd89ebdd7ed576b" 610 | dependencies = [ 611 | "proc-macro2", 612 | "quote", 613 | "syn 2.0.27", 614 | ] 615 | 616 | [[package]] 617 | name = "serde_derive_internals" 618 | version = "0.26.0" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" 621 | dependencies = [ 622 | "proc-macro2", 623 | "quote", 624 | "syn 1.0.109", 625 | ] 626 | 627 | [[package]] 628 | name = "serde_json" 629 | version = "1.0.104" 630 | source = "registry+https://github.com/rust-lang/crates.io-index" 631 | checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" 632 | dependencies = [ 633 | "itoa", 634 | "ryu", 635 | "serde", 636 | ] 637 | 638 | [[package]] 639 | name = "sha2" 640 | version = "0.9.9" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" 643 | dependencies = [ 644 | "block-buffer 0.9.0", 645 | "cfg-if", 646 | "cpufeatures", 647 | "digest 0.9.0", 648 | "opaque-debug", 649 | ] 650 | 651 | [[package]] 652 | name = "sha2" 653 | version = "0.10.7" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" 656 | dependencies = [ 657 | "cfg-if", 658 | "cpufeatures", 659 | "digest 0.10.7", 660 | ] 661 | 662 | [[package]] 663 | name = "signature" 664 | version = "1.6.4" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" 667 | dependencies = [ 668 | "digest 0.10.7", 669 | "rand_core 0.6.4", 670 | ] 671 | 672 | [[package]] 673 | name = "spki" 674 | version = "0.6.0" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" 677 | dependencies = [ 678 | "base64ct", 679 | "der", 680 | ] 681 | 682 | [[package]] 683 | name = "subtle" 684 | version = "2.5.0" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 687 | 688 | [[package]] 689 | name = "syn" 690 | version = "1.0.109" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 693 | dependencies = [ 694 | "proc-macro2", 695 | "quote", 696 | "unicode-ident", 697 | ] 698 | 699 | [[package]] 700 | name = "syn" 701 | version = "2.0.27" 702 | source = "registry+https://github.com/rust-lang/crates.io-index" 703 | checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" 704 | dependencies = [ 705 | "proc-macro2", 706 | "quote", 707 | "unicode-ident", 708 | ] 709 | 710 | [[package]] 711 | name = "thiserror" 712 | version = "1.0.44" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" 715 | dependencies = [ 716 | "thiserror-impl", 717 | ] 718 | 719 | [[package]] 720 | name = "thiserror-impl" 721 | version = "1.0.44" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" 724 | dependencies = [ 725 | "proc-macro2", 726 | "quote", 727 | "syn 2.0.27", 728 | ] 729 | 730 | [[package]] 731 | name = "typenum" 732 | version = "1.16.0" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 735 | 736 | [[package]] 737 | name = "unicode-ident" 738 | version = "1.0.11" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" 741 | 742 | [[package]] 743 | name = "version_check" 744 | version = "0.9.4" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 747 | 748 | [[package]] 749 | name = "wasi" 750 | version = "0.11.0+wasi-snapshot-preview1" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 753 | 754 | [[package]] 755 | name = "zeroize" 756 | version = "1.6.0" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" 759 | --------------------------------------------------------------------------------