Skip to content

Commit

Permalink
remove not library feature flag other than entry_point fns
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki1frsh committed Aug 25, 2023
1 parent 64736f5 commit fcc2317
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions contracts/ibc-denom-resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["rlib"]
crate-type = ["rlib", "cdylib"]

[features]
# use library feature to disable all instantiate/execute/query exports
Expand All @@ -19,4 +19,4 @@ thiserror = "1.0"
cw-storage-plus = "1.1.0"
cw-utils = "1.0.1"
serde-json-wasm = "1.0.0"
packet-forward = { path = "../packet-forward" }
packet-forward = { path = "../packet-forward", features = ["library"] }
2 changes: 1 addition & 1 deletion contracts/packet-forward/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["rlib"]
crate-type = ["rlib", "cdylib"]

[features]
# use library feature to disable all instantiate/execute/query exports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::state::FAILED_REQUESTS;
use cosmwasm_std::{BankMsg, CosmosMsg};
use cosmwasm_std::{DepsMut, Env, MessageInfo, Response};

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
pub fn execute_claim_failed_request(
deps: DepsMut,
_env: Env,
Expand Down
6 changes: 3 additions & 3 deletions contracts/packet-forward/src/execute/forward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::collections::BTreeMap;

const TRANSFER_PORT: &str = "transfer";

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
pub fn execute_forward(
deps: DepsMut,
env: Env,
Expand Down Expand Up @@ -96,7 +96,7 @@ pub fn execute_forward(
Ok(response)
}

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
fn fee_and_subtracted(
amount: Uint128,
commission_rate: Decimal,
Expand All @@ -109,7 +109,7 @@ fn fee_and_subtracted(
Ok((fee, subtracted))
}

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
fn insert_ibc_callback(memo: &str, contract: &str) -> String {
let mut memo_object: BTreeMap<String, Value> =
serde_json_wasm::from_str(memo).unwrap_or_default();
Expand Down
2 changes: 1 addition & 1 deletion contracts/packet-forward/src/execute/update_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::types::Config;
use cosmwasm_std::{DepsMut, Env, MessageInfo, Response};

/// Only owner can execute it.
#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
pub fn execute_update_config(
deps: DepsMut,
_env: Env,
Expand Down
2 changes: 1 addition & 1 deletion contracts/packet-forward/src/query/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{state::CONFIG, types::Config};
use cosmwasm_std::{Deps, StdResult};

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
pub fn query_config(deps: Deps) -> StdResult<Config> {
let config: Config = CONFIG.load(deps.storage)?;

Expand Down
2 changes: 1 addition & 1 deletion contracts/packet-forward/src/query/failed_requests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{state::FAILED_REQUESTS, types::Request};
use cosmwasm_std::{Deps, StdResult};

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
pub fn query_failed_requests(deps: Deps, addr: String) -> StdResult<Vec<Request>> {
let addr = deps.api.addr_validate(&addr.as_str())?;

Expand Down
2 changes: 1 addition & 1 deletion contracts/packet-forward/src/reply/err.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::types::SubMsgId;
use crate::types::SubMsgType;
use cosmwasm_std::{DepsMut, Response};

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
pub fn reply_err(deps: DepsMut, id: SubMsgId, _err: String) -> Result<Response, ContractError> {
let mut response = Response::new();

Expand Down
2 changes: 1 addition & 1 deletion contracts/packet-forward/src/reply/ok.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::types::SubMsgType;
use cosmwasm_std::{DepsMut, Response, SubMsgResponse};
use prost::Message;

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
pub fn reply_ok(
deps: DepsMut,
id: SubMsgId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
};
use cosmwasm_std::{DepsMut, Env, Response};

#[cfg(not(feature = "library"))]
// #[cfg(not(feature = "library"))]
pub fn ibc_lifecycle_complete(
deps: DepsMut,
_env: Env,
Expand Down

0 comments on commit fcc2317

Please sign in to comment.