From 488628c31a59607424772dda76b956609a7ff943 Mon Sep 17 00:00:00 2001 From: elbok Date: Tue, 21 Nov 2023 15:59:38 +0100 Subject: [PATCH] remove mint [fix build] --- Cargo.lock | 448 +------------------ Cargo.toml | 1 - contracts/cw82-token-account/Cargo.toml | 2 - contracts/cw82-token-account/src/contract.rs | 46 +- contracts/cw82-token-account/src/execute.rs | 27 +- contracts/cw82-token-account/src/msg.rs | 1 - contracts/cw82-token-account/src/state.rs | 1 - 7 files changed, 19 insertions(+), 507 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c26cf63..d2e5c7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -60,12 +60,6 @@ version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - [[package]] name = "assert_matches" version = "1.5.0" @@ -171,25 +165,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base-factory" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b415edbc8d98ac278341e70b4c50f882b0afbf74baf0f83a2671754472713ba6" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "schemars", - "serde", - "sg-std", - "sg1", - "sg2", - "thiserror", -] - [[package]] name = "base16ct" version = "0.1.1" @@ -250,28 +225,6 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" -[[package]] -name = "bitvec" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" -dependencies = [ - "either", - "radium 0.3.0", -] - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium 0.7.0", - "tap", - "wyz", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -296,30 +249,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" -[[package]] -name = "borsh" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf617fabf5cdbdc92f774bfe5062d870f228b80056d41180797abf48bed4056e" -dependencies = [ - "borsh-derive", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f404657a7ea7b5249e36808dff544bc88a28f26e0ac40009f674b7a009d14be3" -dependencies = [ - "once_cell", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.38", - "syn_derive", -] - [[package]] name = "bs58" version = "0.4.0" @@ -335,28 +264,6 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" -[[package]] -name = "bytecheck" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "byteorder" version = "1.5.0" @@ -387,12 +294,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "config" version = "0.13.3" @@ -971,7 +872,6 @@ dependencies = [ "sg721-base", "sha2 0.10.8", "thiserror", - "vending-minter", ] [[package]] @@ -1274,12 +1174,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - [[package]] name = "erased-serde" version = "0.3.31" @@ -1366,12 +1260,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.3.28" @@ -1525,7 +1413,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap", "slab", "tokio", "tokio-util", @@ -1735,16 +1623,6 @@ dependencies = [ "hashbrown 0.12.3", ] -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown 0.14.2", -] - [[package]] name = "is-terminal" version = "0.4.9" @@ -2147,38 +2025,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "proc-macro-crate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" version = "1.0.69" @@ -2220,26 +2066,6 @@ dependencies = [ "prost", ] -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "quote" version = "1.0.33" @@ -2249,18 +2075,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - [[package]] name = "rand" version = "0.8.5" @@ -2297,15 +2111,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] - [[package]] name = "regex" version = "1.10.2" @@ -2335,15 +2140,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "rend" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" -dependencies = [ - "bytecheck", -] - [[package]] name = "rfc6979" version = "0.3.1" @@ -2400,34 +2196,6 @@ dependencies = [ "opaque-debug", ] -[[package]] -name = "rkyv" -version = "0.7.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" -dependencies = [ - "bitvec 1.0.1", - "bytecheck", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid 1.5.0", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ron" version = "0.7.1" @@ -2449,22 +2217,6 @@ dependencies = [ "ordered-multimap", ] -[[package]] -name = "rust_decimal" -version = "1.33.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" -dependencies = [ - "arrayvec", - "borsh", - "bytes", - "num-traits", - "rand", - "rkyv", - "serde", - "serde_json", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -2582,12 +2334,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - [[package]] name = "sec1" version = "0.3.0" @@ -2731,67 +2477,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sg-whitelist" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c54f7d541542d54e9f33fe8aaa3fca7672d7477d3a926d0597cf9188a0c350a" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "rust_decimal", - "schemars", - "serde", - "sg-std", - "sg1", - "thiserror", -] - -[[package]] -name = "sg1" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991d30973e55895e49139e94f3e862b3d9b2eb44326c6bf147067cea59912449" -dependencies = [ - "cosmwasm-std", - "cw-utils 1.0.2", - "serde", - "sg-std", - "thiserror", -] - -[[package]] -name = "sg2" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e594ed544bda82961075c4178b68685ea6c23096608b3db190ea9bdf1d051ba" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "schemars", - "serde", - "sg721", - "thiserror", -] - -[[package]] -name = "sg4" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b71feeda27a385623a75209f2fcb2aed981b7e245d9f7cab67d04252fd0b6b9" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - [[package]] name = "sg721" version = "3.3.0" @@ -2873,16 +2558,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "shuffle" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fecbe806be0726e22a6192ce0ec2f90e0798946ae0cbc2c10c7a3c68cae4eb2" -dependencies = [ - "bitvec 0.17.4", - "rand", -] - [[package]] name = "signature" version = "1.6.4" @@ -2903,12 +2578,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - [[package]] name = "slab" version = "0.4.9" @@ -3001,30 +2670,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.38", -] - [[package]] name = "sync_wrapper" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tendermint" version = "0.26.0" @@ -3118,7 +2769,7 @@ dependencies = [ "tokio", "tracing", "url", - "uuid 0.8.2", + "uuid", "walkdir", ] @@ -3298,23 +2949,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - [[package]] name = "tonic" version = "0.8.3" @@ -3355,7 +2989,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap 1.9.3", + "indexmap", "pin-project", "pin-project-lite", "rand", @@ -3482,64 +3116,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -[[package]] -name = "uuid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" - -[[package]] -name = "vending-factory" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a75646cfe65d5eb470024f93ec15d4d82bedc3e23f14f73e91f27a2aaffe34" -dependencies = [ - "base-factory", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "schemars", - "serde", - "sg-std", - "sg1", - "sg2", - "sg721", - "thiserror", -] - -[[package]] -name = "vending-minter" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd7549a3f712b417fcaf3d6e009544ef0e8bf11cfbcde524c86021d08ba1368" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw721 0.18.0", - "cw721-base 0.18.0", - "rand_core 0.6.4", - "rand_xoshiro", - "schemars", - "semver", - "serde", - "sg-std", - "sg-whitelist", - "sg1", - "sg2", - "sg4", - "sg721", - "sha2 0.10.8", - "shuffle", - "thiserror", - "url", - "vending-factory", -] - [[package]] name = "version_check" version = "0.9.4" @@ -3751,24 +3327,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" -[[package]] -name = "winnow" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" -dependencies = [ - "memchr", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "yaml-rust" version = "0.4.5" diff --git a/Cargo.toml b/Cargo.toml index 2b41254..8e8b174 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,6 @@ cw22 = { git = "https://github.com/aura-nw/cw-plus", package cw721 = "0.18.0" sg721 = "3.3.0" sg721-base = "3.3.0" -vending-minter = { version = "3.3.0", default-features = false, features = ["library"] } cw82-token-account = { path = "contracts/cw82-token-account" } cw83-tba-registry = { path = "contracts/cw83-tba-registry" } diff --git a/contracts/cw82-token-account/Cargo.toml b/contracts/cw82-token-account/Cargo.toml index 6858ef8..25ef844 100644 --- a/contracts/cw82-token-account/Cargo.toml +++ b/contracts/cw82-token-account/Cargo.toml @@ -36,5 +36,3 @@ cw82 = { workspace = true } cw83 = { workspace = true } cw721 = { workspace = true } sg721-base = { workspace = true, features = ["library"] } -vending-minter = { workspace = true, features = ["library"] } - diff --git a/contracts/cw82-token-account/src/contract.rs b/contracts/cw82-token-account/src/contract.rs index d11dacb..7360c54 100644 --- a/contracts/cw82-token-account/src/contract.rs +++ b/contracts/cw82-token-account/src/contract.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{ - Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, to_binary, Empty, Reply, + Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, to_binary, Empty, }; use cw_ownable::{get_ownership, initialize_owner}; @@ -8,11 +8,22 @@ use cosmwasm_std::entry_point; use crate::{ - state::{REGISTRY_ADDRESS, TOKEN_INFO, PUBKEY, STATUS, MINT_CACHE}, + state::{REGISTRY_ADDRESS, TOKEN_INFO, PUBKEY, STATUS}, msg::{QueryMsg, InstantiateMsg, ExecuteMsg, TokenInfo, Status, MigrateMsg}, error::ContractError, query::{can_execute, valid_signature, valid_signatures, known_tokens, assets, full_info}, - execute::{try_execute, try_update_ownership, try_update_known_tokens, try_forget_tokens, try_update_known_on_receive, try_transfer_token, try_send_token, try_freeze, try_unfreeze, try_change_pubkey, try_mint_token}, + execute::{ + try_execute, + try_update_ownership, + try_update_known_tokens, + try_forget_tokens, + try_update_known_on_receive, + try_transfer_token, + try_send_token, + try_freeze, + try_unfreeze, + try_change_pubkey + }, }; #[cfg(target_arch = "wasm32")] @@ -78,13 +89,6 @@ pub fn execute(deps: DepsMut, env : Env, info : MessageInfo, msg : ExecuteMsg) -> Result { match msg { ExecuteMsg::Execute { msgs } => try_execute(deps.as_ref(), info.sender, msgs), - - ExecuteMsg::MintToken { collection } => try_mint_token( - deps, - info.sender, - collection, - info.funds - ), ExecuteMsg::TransferToken { collection, @@ -179,26 +183,4 @@ pub fn query(deps: Deps, env : Env, msg: QueryMsg) -> StdResult { pub fn migrate(deps: DepsMut, _: Env, _: MigrateMsg) -> StdResult { STATUS.save(deps.storage, &Status { frozen: false })?; Ok(Response::default()) -} - - -#[cfg_attr(not(feature = "library"), entry_point)] -pub fn reply(deps: DepsMut, env: Env, msg: Reply) -> Result { - match msg.id { - MINT_REPLY_ID => { - let collection = MINT_CACHE.load(deps.storage)?; - MINT_CACHE.remove(deps.storage); - - try_update_known_tokens( - deps, - env.clone(), - env.contract.address, - collection.to_string(), - None, - None - ) - } - - _ => Err(ContractError::NotSupported {}) - } } \ No newline at end of file diff --git a/contracts/cw82-token-account/src/execute.rs b/contracts/cw82-token-account/src/execute.rs index e6be6a3..f9d3eb4 100644 --- a/contracts/cw82-token-account/src/execute.rs +++ b/contracts/cw82-token-account/src/execute.rs @@ -1,9 +1,9 @@ use cosmwasm_std::{ - Deps, DepsMut, Env, Response, CosmosMsg, Addr, Binary, WasmMsg, to_binary, Coin, StdResult, SubMsg, ReplyOn, + Deps, DepsMut, Env, Response, CosmosMsg, Addr, Binary, WasmMsg, to_binary, Coin, StdResult, }; use cw_ownable::{assert_owner, initialize_owner, is_owner}; -use crate::{error::ContractError, utils::{assert_factory, is_ok_cosmos_msg, assert_status}, state::{KNOWN_TOKENS, PUBKEY, STATUS, MINT_CACHE}, msg::Status, contract::MINT_REPLY_ID}; +use crate::{error::ContractError, utils::{assert_factory, is_ok_cosmos_msg, assert_status}, state::{KNOWN_TOKENS, PUBKEY, STATUS}, msg::Status}; @@ -21,29 +21,6 @@ pub fn try_execute( Ok(Response::new().add_messages(msgs)) } -pub fn try_mint_token( - deps: DepsMut, - sender: Addr, - collection: String, - funds: Vec -) -> Result { - assert_owner(deps.storage, &sender)?; - assert_status(deps.storage)?; - - MINT_CACHE.save(deps.storage, &collection)?; - - Ok(Response::new().add_submessage(SubMsg { - msg: WasmMsg::Execute { - contract_addr: collection, - msg: to_binary(&vending_minter::msg::ExecuteMsg::Mint {})?, - funds - }.into(), - reply_on: ReplyOn::Success, - id: MINT_REPLY_ID, - gas_limit: None, - })) -} - pub fn try_freeze( deps: DepsMut, diff --git a/contracts/cw82-token-account/src/msg.rs b/contracts/cw82-token-account/src/msg.rs index 0cbe205..86c6a98 100644 --- a/contracts/cw82-token-account/src/msg.rs +++ b/contracts/cw82-token-account/src/msg.rs @@ -99,7 +99,6 @@ pub type QueryMsg = QueryMsgBase; pub enum ExecuteMsg { Execute { msgs: Vec> }, SendToken { collection: String, token_id: String, contract: String, msg: Binary }, - MintToken { collection: String }, TransferToken { collection: String, token_id: String, recipient: String }, ForgetTokens { collection: String, token_ids: Vec }, UpdateKnownTokens { collection: String, start_after: Option, limit: Option }, diff --git a/contracts/cw82-token-account/src/state.rs b/contracts/cw82-token-account/src/state.rs index 26bfe94..a21decc 100644 --- a/contracts/cw82-token-account/src/state.rs +++ b/contracts/cw82-token-account/src/state.rs @@ -7,7 +7,6 @@ pub static REGISTRY_ADDRESS : Item = Item::new("r"); pub static TOKEN_INFO : Item = Item::new("t"); pub static STATUS : Item = Item::new("s"); pub static PUBKEY : Item = Item::new("p"); -pub static MINT_CACHE : Item = Item::new("m"); pub static KNOWN_TOKENS : Map<(&str, &str), bool> = Map::new("k");