From 6e26efd6f7c48cf158c19eb6eab98f0871418df0 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 22 Mar 2023 10:47:43 -0500 Subject: [PATCH 1/2] ForceTransfer Msg + Burn from any addr --- contracts/tokenfactory/src/contract.rs | 61 +++++++++++++++++++++---- contracts/tokenfactory/src/error.rs | 3 -- contracts/tokenfactory/src/msg.rs | 6 +++ packages/bindings-test/src/multitest.rs | 6 +++ packages/bindings/src/msg.rs | 27 +++++++++-- 5 files changed, 87 insertions(+), 16 deletions(-) diff --git a/contracts/tokenfactory/src/contract.rs b/contracts/tokenfactory/src/contract.rs index 2ef78d5..ea997c3 100644 --- a/contracts/tokenfactory/src/contract.rs +++ b/contracts/tokenfactory/src/contract.rs @@ -55,6 +55,12 @@ pub fn execute( amount, burn_from_address, } => burn_tokens(deps, denom, amount, burn_from_address), + ExecuteMsg::ForceTransfer { + denom, + amount, + from_address, + to_address, + } => force_transfer(deps, denom, amount, from_address, to_address), } } @@ -125,12 +131,6 @@ pub fn burn_tokens( amount: Uint128, burn_from_address: String, ) -> Result, TokenFactoryError> { - if !burn_from_address.is_empty() { - return Result::Err(TokenFactoryError::BurnFromAddressNotSupported { - address: burn_from_address, - }); - } - if amount.eq(&Uint128::new(0_u128)) { return Result::Err(TokenFactoryError::ZeroAmount {}); } @@ -146,6 +146,28 @@ pub fn burn_tokens( Ok(res) } +pub fn force_transfer( + deps: DepsMut, + denom: String, + amount: Uint128, + from_address: String, + to_address: String, +) -> Result, TokenFactoryError> { + if amount.eq(&Uint128::new(0_u128)) { + return Result::Err(TokenFactoryError::ZeroAmount {}); + } + + validate_denom(deps, denom.clone())?; + + let force_msg = TokenMsg::force_transfer_tokens(denom, amount, from_address, to_address); + + let res = Response::new() + .add_attribute("method", "force_transfer_tokens") + .add_message(force_msg); + + Ok(res) +} + #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { @@ -554,13 +576,32 @@ mod tests { burn_from_address: String::from(BURN_FROM_ADDR), amount: burn_amount, }; - let err = execute(deps.as_mut(), mock_env(), info, msg).unwrap_err(); + let err = execute(deps.as_mut(), mock_env(), info, msg).is_err(); + assert_eq!(err, false) + } + + #[test] + fn msg_force_transfer_tokens_address() { + let mut deps = mock_dependencies(); + + const TRANSFER_FROM_ADDR: &str = "transferme"; + const TRANSFER_TO_ADDR: &str = "tome"; + + let transfer_amount = Uint128::new(100_u128); + let full_denom_name: &str = + &format!("{}/{}/{}", DENOM_PREFIX, MOCK_CONTRACT_ADDR, DENOM_NAME)[..]; + + let info = mock_info("creator", &coins(2, "token")); - let expected_error = TokenFactoryError::BurnFromAddressNotSupported { - address: String::from(BURN_FROM_ADDR), + let msg = ExecuteMsg::ForceTransfer { + denom: String::from(full_denom_name), + amount: transfer_amount, + from_address: TRANSFER_FROM_ADDR.to_string(), + to_address: TRANSFER_TO_ADDR.to_string(), }; - assert_eq!(expected_error, err) + let err = execute(deps.as_mut(), mock_env(), info, msg).is_err(); + assert_eq!(err, false) } #[test] diff --git a/contracts/tokenfactory/src/error.rs b/contracts/tokenfactory/src/error.rs index 3c7cc93..024ced6 100644 --- a/contracts/tokenfactory/src/error.rs +++ b/contracts/tokenfactory/src/error.rs @@ -18,9 +18,6 @@ pub enum TokenFactoryError { #[error("denom does not exist: {denom:?}")] DenomDoesNotExist { denom: String }, - #[error("address is not supported yet, was: {address:?}")] - BurnFromAddressNotSupported { address: String }, - #[error("amount was zero, must be positive")] ZeroAmount {}, } diff --git a/contracts/tokenfactory/src/msg.rs b/contracts/tokenfactory/src/msg.rs index 8b05c50..4ac37b3 100644 --- a/contracts/tokenfactory/src/msg.rs +++ b/contracts/tokenfactory/src/msg.rs @@ -23,6 +23,12 @@ pub enum ExecuteMsg { amount: Uint128, burn_from_address: String, }, + ForceTransfer { + denom: String, + amount: Uint128, + from_address: String, + to_address: String, + }, } #[cw_serde] diff --git a/packages/bindings-test/src/multitest.rs b/packages/bindings-test/src/multitest.rs index c8c4661..c3e6748 100644 --- a/packages/bindings-test/src/multitest.rs +++ b/packages/bindings-test/src/multitest.rs @@ -129,6 +129,12 @@ impl Module for TokenFactoryModule { amount: _, burn_from_address: _, } => todo!(), + TokenMsg::ForceTransfer { + denom: _, + amount: _, + from_address: _, + to_address: _, + } => todo!(), TokenMsg::ChangeAdmin { denom, new_admin_address, diff --git a/packages/bindings/src/msg.rs b/packages/bindings/src/msg.rs index 2b8b978..c001949 100644 --- a/packages/bindings/src/msg.rs +++ b/packages/bindings/src/msg.rs @@ -43,12 +43,19 @@ pub enum TokenMsg { }, /// Contracts can burn native tokens for an existing factory denom /// that they are the admin of. - /// Currently, the burn from address must be the admin contract. BurnTokens { denom: String, amount: Uint128, burn_from_address: String, }, + /// Contracts can force transfer tokens for an existing factory denom + /// that they are the admin of. + ForceTransfer { + denom: String, + amount: Uint128, + from_address: String, + to_address: String, + }, SetMetadata { denom: String, metadata: Metadata, @@ -67,12 +74,26 @@ impl TokenMsg { pub fn burn_contract_tokens( denom: String, amount: Uint128, - _burn_from_address: String, + burn_from_address: String, ) -> Self { TokenMsg::BurnTokens { denom, amount, - burn_from_address: "".to_string(), // burn_from_address is currently disabled. + burn_from_address, + } + } + + pub fn force_transfer_tokens( + denom: String, + amount: Uint128, + from_address: String, + to_address: String, + ) -> Self { + TokenMsg::ForceTransfer { + denom, + amount, + from_address, + to_address, } } } From 4acf582aaf98732bcfd4821d0bbf45faf6c479dc Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Wed, 22 Mar 2023 11:14:48 -0500 Subject: [PATCH 2/2] Updates versions for token_reflect --- Cargo.lock | 364 ++++++++++++++++++------------ contracts/reflect/Cargo.toml | 4 +- contracts/tokenfactory/Cargo.toml | 16 +- packages/bindings-test/Cargo.toml | 2 +- packages/bindings/Cargo.toml | 2 +- 5 files changed, 232 insertions(+), 156 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8e7930..3a70975 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,11 +2,22 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "anyhow" -version = "1.0.56" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "base16ct" @@ -16,15 +27,15 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea908e7347a8c64e378c17e30ef880ad73e3b4498346b055c2c00ea342f3179" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "block-buffer" @@ -37,9 +48,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -52,9 +63,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cfg-if" @@ -64,37 +75,37 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "cosmwasm-crypto" -version = "1.1.4" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce1c26e5595c6a960cd3d6dc1d8629e16a2b0cb22ecd653b28bbf292d7c53a3c" +checksum = "f22add0f9b2a5416df98c1d0248a8d8eedb882c38fbf0c5052b64eebe865df6d" dependencies = [ - "digest 0.10.5", + "digest 0.10.6", "ed25519-zebra", "k256", - "rand_core 0.6.3", + "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.1.4" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a24050753f242554c558dfe7a6b3a456850f2bc6fcf8b518988720e40a5fa21" +checksum = "c2e64f710a18ef90d0a632cf27842e98ffc2d005a38a6f76c12fd0bc03bc1a2d" dependencies = [ - "syn", + "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.1.4" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6fe57b9e59a87a406b825cbe647f6456e1a853f8d4c99bffcc20957fd29d6" +checksum = "fe5ad2e23a971b9e4cd57b20cee3e2e79c33799bed4b128e473aca3702bfe5dd" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -105,20 +116,20 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.4" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e8cfc90b557a8ed272c9daf0ff3634e6b9f4698a19832bba6a4c7baa46da04" +checksum = "2926d159a9bb1a716a592b40280f1663f2491a9de3b6da77c0933cee2a2655b8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "cosmwasm-std" -version = "1.1.4" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78e50ba8bfea2e449be2e7fa96fd8b196d09fb5ef34e27a18f28835ed835b199" +checksum = "76fee88ff5bf7bef55bd37ac0619974701b99bf6bd4b16cf56ee8810718abd71" dependencies = [ "base64", "cosmwasm-crypto", @@ -129,15 +140,16 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", + "sha2 0.10.6", "thiserror", "uint", ] [[package]] name = "cosmwasm-storage" -version = "1.1.4" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce135cec6c90df7115b0f5b2b40683dd41ac62999dfb002107f6a9f5c345374" +checksum = "639bc36408bc1ac45e3323166ceeb8f0b91b55a941c4ad59d389829002fbbd94" dependencies = [ "cosmwasm-std", "serde", @@ -145,9 +157,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] @@ -165,7 +177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -202,10 +214,29 @@ dependencies = [ "anyhow", "cosmwasm-std", "cosmwasm-storage", - "cw-storage-plus", - "cw-utils", + "cw-storage-plus 0.15.1", + "cw-utils 0.15.1", + "derivative", + "itertools", + "prost", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-multi-test" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2eb84554bbfa6b66736abcd6a9bfdf237ee0ecb83910f746dff7f799093c80a" +dependencies = [ + "anyhow", + "cosmwasm-std", + "cw-storage-plus 1.0.1", + "cw-utils 1.0.1", "derivative", "itertools", + "k256", "prost", "schemars", "serde", @@ -223,6 +254,17 @@ dependencies = [ "serde", ] +[[package]] +name = "cw-storage-plus" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053a5083c258acd68386734f428a5a171b29f7d733151ae83090c6fcc9417ffa" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", +] + [[package]] name = "cw-utils" version = "0.15.1" @@ -231,7 +273,22 @@ checksum = "0ae0b69fa7679de78825b4edeeec045066aa2b2c4b6e063d80042e565bb4da5c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2", + "cw2 0.15.1", + "schemars", + "semver", + "serde", + "thiserror", +] + +[[package]] +name = "cw-utils" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw2 1.0.1", "schemars", "semver", "serde", @@ -246,16 +303,29 @@ checksum = "5abb8ecea72e09afff830252963cb60faf945ce6cef2c20a43814516082653da" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus", + "cw-storage-plus 0.15.1", + "schemars", + "serde", +] + +[[package]] +name = "cw2" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb70cee2cf0b4a8ff7253e6bc6647107905e8eb37208f87d54f67810faa62f8" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.0.1", "schemars", "serde", ] [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -269,7 +339,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -283,20 +353,20 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer 0.10.4", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.4" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" +checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecdsa" @@ -312,24 +382,24 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", + "hashbrown", "hex", - "rand_core 0.6.3", + "rand_core 0.6.4", "serde", "sha2 0.9.9", - "thiserror", "zeroize", ] [[package]] name = "either" -version = "1.6.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "elliptic-curve" @@ -340,12 +410,12 @@ dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.5", + "digest 0.10.6", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.3", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -353,11 +423,11 @@ dependencies = [ [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] @@ -369,9 +439,9 @@ checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -379,35 +449,33 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", ] [[package]] -name = "getrandom" -version = "0.2.5" +name = "group" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ - "cfg-if", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "ff", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "group" -version = "0.12.0" +name = "hashbrown" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ff", - "rand_core 0.6.3", - "subtle", + "ahash", ] [[package]] @@ -422,23 +490,23 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.5", + "digest 0.10.6", ] [[package]] name = "itertools" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "k256" @@ -454,9 +522,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.119" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" + +[[package]] +name = "once_cell" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "opaque-debug" @@ -476,9 +550,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" dependencies = [ "unicode-ident", ] @@ -503,14 +577,14 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "quote" -version = "1.0.15" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -520,24 +594,21 @@ name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.5", + "getrandom", ] [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", "hmac", @@ -546,15 +617,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "schemars" -version = "0.8.8" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b5a3c80cea1ab61f4260238409510e814e38b4b563c06044edf91e7dc070e3" +checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" dependencies = [ "dyn-clone", "schemars_derive", @@ -564,14 +635,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.8" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ae4dce13e8614c46ac3c38ef1c0d668b101df6ac39817aebdaa26642ddae9b" +checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn", + "syn 1.0.109", ] [[package]] @@ -590,55 +661,55 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" dependencies = [ "serde_derive", ] [[package]] name = "serde-json-wasm" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479b4dbc401ca13ee8ce902851b834893251404c4f3c65370a49e047a6be09a5" +checksum = "a15bee9b04dd165c3f4e142628982ddde884c2022a89e8ddf99c4829bf2c3a58" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.5", ] [[package]] name = "serde_derive_internals" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ "itoa", "ryu", @@ -666,7 +737,7 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.5", + "digest 0.10.6", ] [[package]] @@ -675,8 +746,8 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.5", - "rand_core 0.6.3", + "digest 0.10.6", + "rand_core 0.6.4", ] [[package]] @@ -703,9 +774,20 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.95" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +checksum = "89c2d1c76a26822187a1fbb5964e3fff108bc208f02e820ab9dac1234f6b388a" dependencies = [ "proc-macro2", "quote", @@ -714,27 +796,27 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.5", ] [[package]] name = "token-bindings" -version = "0.8.0" +version = "0.9.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -748,8 +830,8 @@ version = "0.8.0" dependencies = [ "anyhow", "cosmwasm-std", - "cw-multi-test", - "cw-storage-plus", + "cw-multi-test 0.15.1", + "cw-storage-plus 0.15.1", "itertools", "schemars", "serde", @@ -759,7 +841,7 @@ dependencies = [ [[package]] name = "token-reflect" -version = "0.8.0" +version = "0.9.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -772,14 +854,14 @@ dependencies = [ [[package]] name = "tokenfactory" -version = "0.8.0" +version = "0.9.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", - "cw-multi-test", - "cw-storage-plus", - "cw2", + "cw-multi-test 0.16.2", + "cw-storage-plus 1.0.1", + "cw2 1.0.1", "schemars", "serde", "thiserror", @@ -789,15 +871,15 @@ dependencies = [ [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -807,9 +889,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.0" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "version_check" @@ -819,15 +901,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "zeroize" diff --git a/contracts/reflect/Cargo.toml b/contracts/reflect/Cargo.toml index 6daf67a..dbca9f3 100644 --- a/contracts/reflect/Cargo.toml +++ b/contracts/reflect/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "token-reflect" -version = "0.8.0" +version = "0.9.0" authors = ["Ethan Frey "] edition = "2018" description = "Reflect messages to use for test cases - based on cw-mask" @@ -20,7 +20,7 @@ backtraces = ["cosmwasm-std/backtraces"] cosmwasm-schema = "1.1" cosmwasm-std = { version = "1.1", features = ["staking", "stargate"] } cosmwasm-storage = "1.1" -token-bindings = { version = "0.8.0", path = "../../packages/bindings" } +token-bindings = { version = "0.9.0", path = "../../packages/bindings" } schemars = "0.8" serde = { version = "1.0", default-features = false, features = ["derive"] } thiserror = "1.0" diff --git a/contracts/tokenfactory/Cargo.toml b/contracts/tokenfactory/Cargo.toml index b572473..ee9996d 100644 --- a/contracts/tokenfactory/Cargo.toml +++ b/contracts/tokenfactory/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tokenfactory" -version = "0.8.0" +version = "0.9.0" authors = ["Roman "] edition = "2018" @@ -41,15 +41,15 @@ optimize = """docker run --rm -v "$(pwd)":/code \ [dependencies] cosmwasm-schema = "1.1" -cosmwasm-std = "1.1" +cosmwasm-std = "1.2.3" cosmwasm-storage = "1.1" -cw-storage-plus = "0.15" -token-bindings = { version = "0.8.0", path = "../../packages/bindings" } -cw2 = "0.15" +cw-storage-plus = "1.0.1" +token-bindings = { version = "0.9.0", path = "../../packages/bindings" } +cw2 = "1.0.1" schemars = "0.8" serde = { version = "1.0", default-features = false, features = ["derive"] } -thiserror = "1.0" +thiserror = { version = "1.0" } [dev-dependencies] -cw-multi-test = "0.15" -token-bindings-test = { version = "0.8.0", path = "../../packages/bindings-test" } +cw-multi-test = "0.16.2" +token-bindings-test = { path = "../../packages/bindings-test" } diff --git a/packages/bindings-test/Cargo.toml b/packages/bindings-test/Cargo.toml index 5eeabaf..a0d7cac 100644 --- a/packages/bindings-test/Cargo.toml +++ b/packages/bindings-test/Cargo.toml @@ -10,7 +10,7 @@ license = "Apache-2.0" [dependencies] itertools = "0.10" -token-bindings = { version = "0.8.0", path = "../bindings" } +token-bindings = { version = "0.9.0", path = "../bindings" } cosmwasm-std = "1.1" schemars = "0.8" serde = { version = "1.0", default-features = false, features = ["derive"] } diff --git a/packages/bindings/Cargo.toml b/packages/bindings/Cargo.toml index 27c535f..f3ed154 100644 --- a/packages/bindings/Cargo.toml +++ b/packages/bindings/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "token-bindings" -version = "0.8.0" +version = "0.9.0" authors = ["Ethan Frey "] edition = "2018" description = "Bindings for CustomMsg and CustomQuery for the Osmosis blockchain"