Skip to content

Commit

Permalink
add entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
siriustaikun committed May 6, 2023
1 parent a936b79 commit d4caca6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Cargo.lock
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

trash


# Ignores local beaker state
**/state.local.json
7 changes: 5 additions & 2 deletions contracts/nft-auction/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use cosmwasm_std::{
coins, to_binary, wasm_execute, BankMsg, Binary, Deps, DepsMut, Env, Event, MessageInfo,
Response, StdError, StdResult, Timestamp, Uint128,
coins, entry_point, to_binary, wasm_execute, BankMsg, Binary, Deps, DepsMut, Env, Event,
MessageInfo, Response, StdError, StdResult, Timestamp, Uint128,
};
use cw2::set_contract_version;
use cw721::Cw721ReceiveMsg;
Expand All @@ -13,6 +13,7 @@ use crate::state::{AUCTION_INFO, BID_HISTORY};
const CONTRACT_NAME: &str = "crates.io:nft-auction";
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn instantiate(
deps: DepsMut,
_env: Env,
Expand Down Expand Up @@ -60,6 +61,7 @@ pub fn instantiate(
Ok(Response::default())
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn execute(
deps: DepsMut,
env: Env,
Expand All @@ -73,6 +75,7 @@ pub fn execute(
}
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> Result<Binary, StdError> {
match msg {
QueryMsg::AuctionInfo {} => query_auction_info(deps),
Expand Down

0 comments on commit d4caca6

Please sign in to comment.