Skip to content

Commit 8f066f8

Browse files
New nft contract from github source
1 parent 0eeb41b commit 8f066f8

21 files changed

+43
-2696
lines changed

Cargo.lock

Lines changed: 0 additions & 2529 deletions
This file was deleted.

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ tendermint-proto = { version = "0.34.1", default-features = false }
4343
cosmwasm-schema = { version = "2.1.0", default-features = false }
4444
cw-storage-plus = { version = "2.0.0", default-features = false }
4545
cw2 = { version = "2.0.0", default-features = false }
46-
cw721 = { version = "0.18.0", default-features = false }
47-
cw721-base = { version = "0.18.0", features = ["library"] }
46+
cw721 = { package = "cw721", git = "https://github.com/public-awesome/cw-nfts", branch = "main", default-features = false }
47+
cw721-base = { package = "cw721-base", git = "https://github.com/public-awesome/cw-nfts", branch = "main", default-features = false }
4848
cw-multi-test = { version = "2.1.0", default-features = false }
4949
cw-utils = { version = "2.0.0", default-features = false }
5050
serde = { version = "1.0.195", default-features = false }
@@ -55,7 +55,6 @@ bech32 = { version = "0.11.0", default-features = false, features = ["alloc"] }
5555
thiserror = { version = "1.0.56", default-features = false }
5656
optfield = { version = "0.3.0", default-features = false }
5757
schemars = { version = "0.8.16", default-features = false }
58-
astroport = { version = "5.5.0", default-features = false }
5958
semver = { version = "1.0.22", default-features = false }
6059
hex = { version = "0.4.3", default-features = false }
6160
once_cell = { version = "1.20.2" }

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ compile_arm64:
3333

3434
check_contracts:
3535
@cargo install cosmwasm-check --locked
36-
@cosmwasm-check --available-capabilities iterator,staking,stargate,neutron,cosmwasm_1_1,cosmwasm_1_2 artifacts/*.wasm
36+
@cosmwasm-check --available-capabilities iterator,staking,stargate,neutron,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,cosmwasm_1_4,cosmwasm_2_0 artifacts/*.wasm
3737

3838
build_arm64: schema clippy test fmt doc compile_arm64 check_contracts
3939

contracts/withdrawal-manager/src/contract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use cosmwasm_std::{
22
attr, ensure_eq, from_json, to_json_binary, Attribute, BankMsg, Binary, Coin, CosmosMsg,
33
Decimal, Deps, DepsMut, Env, MessageInfo, Response, StdResult, Uint128, WasmMsg,
44
};
5-
use cw721::NftInfoResponse;
5+
use cw721::msg::NftInfoResponse;
66
use cw_ownable::{get_ownership, update_ownership};
77
use drop_helpers::{
88
answer::response,

contracts/withdrawal-voucher/Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ crate-type = ["cdylib", "rlib"]
2121
library = []
2222

2323
[dependencies]
24-
cosmwasm-schema = { version = "1.5.4", default-features = false }
25-
cosmwasm-std = { version = "1.5.4", default-features = false }
26-
cw2 = { version = "1.1.2", default-features = false }
27-
cw721-base = { version = "0.18.0", features = ["library"] }
28-
semver = { version = "1.0.22", default-features = false }
24+
cosmwasm-schema = { workspace = true }
25+
cosmwasm-std = { workspace = true }
26+
cw2 = { workspace = true }
27+
cw721 = { workspace = true }
28+
cw721-base = { workspace = true }
29+
drop-staking-base = { workspace = true }
30+
semver = { workspace = true }

contracts/withdrawal-voucher/src/bin/drop-withdrawal-voucher-schema.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use cosmwasm_schema::write_api;
2-
use drop_withdrawal_voucher::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
2+
use drop_staking_base::msg::withdrawal_voucher::{
3+
ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg,
4+
};
35

46
fn main() {
57
write_api! {

contracts/withdrawal-voucher/src/contract.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
use crate::msg::{ExecuteMsg, Extension, InstantiateMsg, MigrateMsg, QueryMsg};
2-
use cosmwasm_std::Empty;
3-
pub use cw721_base::{ContractError, MinterResponse};
1+
pub use cw721::msg::MinterResponse;
2+
pub use cw721::traits::{Cw721Execute, Cw721Query};
3+
pub use cw721_base::error::ContractError;
4+
pub use cw721_base::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
45

56
const CONTRACT_NAME: &str = concat!("crates.io:drop-staking__", env!("CARGO_PKG_NAME"));
67
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
78

8-
pub type Cw721VoucherContract<'a> = cw721_base::Cw721Contract<'a, Extension, Empty, Empty, Empty>;
9+
pub type Cw721VoucherContract<'a> = cw721_base::Cw721BaseContract<'a>;
910

1011
#[cfg(not(feature = "library"))]
1112
pub mod entry {
1213
use super::*;
1314

14-
use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult};
15+
use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError};
1516

1617
// This makes a conscious choice on the various generics used by the contract
1718
#[cosmwasm_std::entry_point]
@@ -20,9 +21,9 @@ pub mod entry {
2021
env: Env,
2122
info: MessageInfo,
2223
msg: InstantiateMsg,
23-
) -> StdResult<Response> {
24+
) -> Result<Response, ContractError> {
2425
cw2::set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
25-
Cw721VoucherContract::default().instantiate(deps.branch(), env, info, msg)
26+
Cw721VoucherContract::default().instantiate(deps.branch(), &env, &info, msg)
2627
}
2728

2829
#[cosmwasm_std::entry_point]
@@ -32,12 +33,12 @@ pub mod entry {
3233
info: MessageInfo,
3334
msg: ExecuteMsg,
3435
) -> Result<Response, ContractError> {
35-
Cw721VoucherContract::default().execute(deps, env, info, msg)
36+
Cw721VoucherContract::default().execute(deps, &env, &info, msg)
3637
}
3738

3839
#[cosmwasm_std::entry_point]
39-
pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult<Binary> {
40-
Cw721VoucherContract::default().query(deps, env, msg)
40+
pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> Result<Binary, ContractError> {
41+
Cw721VoucherContract::default().query(deps, &env, msg)
4142
}
4243

4344
#[cosmwasm_std::entry_point]
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
pub mod contract;
2-
pub mod msg;
3-
pub mod state;

contracts/withdrawal-voucher/src/msg.rs

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/base/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ cw721 = { workspace = true }
3535
thiserror = { workspace = true }
3636
cw-ownable = { workspace = true }
3737
optfield = { workspace = true }
38-
astroport = { workspace = true }
3938
prost = { workspace = true }
4039
serde = { workspace = true }
4140
cw-utils = { workspace = true }

0 commit comments

Comments
 (0)