Skip to content

Commit

Permalink
Merge branch 'main' into tasiov/auction-whitelist-denoms
Browse files Browse the repository at this point in the history
  • Loading branch information
shanev committed Mar 7, 2024
2 parents bdeffea + 6974dbb commit bc05ec3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workflows:
jobs:
contract_marketplace:
docker:
- image: rust:1.68.2
- image: rust:1.72.1
working_directory: ~/project/contracts/marketplace
steps:
- checkout:
Expand All @@ -28,7 +28,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-marketplace-rust:1.68.2-{{ checksum "~/project/Cargo.lock" }}
- cargocache-marketplace-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -50,19 +50,19 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-marketplace-rust:1.68.2-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-marketplace-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }}

lint:
docker:
- image: rust:1.68.2
- image: rust:1.72.1
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-lint-rust:1.68.2-{{ checksum "Cargo.lock" }}
- cargocache-v2-lint-rust:1.72.1-{{ checksum "Cargo.lock" }}
- run:
name: Add rustfmt component
command: rustup component add rustfmt
Expand All @@ -81,15 +81,15 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: cargocache-v2-lint-rust:1.68.2-{{ checksum "Cargo.lock" }}
key: cargocache-v2-lint-rust:1.72.1-{{ checksum "Cargo.lock" }}

# This runs one time on the top level to ensure all contracts compile properly into wasm.
# We don't run the wasm build per contract build, and then reuse a lot of the same dependencies, so this speeds up CI time
# for all the other tests.
# We also sanity-check the resultant wasm files.
wasm-build:
docker:
- image: rust:1.68.2
- image: rust:1.72.1
steps:
- checkout:
path: ~/project
Expand All @@ -98,7 +98,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-wasm-rust:1.68.2-{{ checksum "~/project/Cargo.lock" }}
- cargocache-wasm-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown
Expand All @@ -113,19 +113,19 @@ jobs:
- run:
name: Install check_contract
# Uses --debug for compilation speed
command: cargo install --debug --version 1.0.0 --features iterator --example check_contract -- cosmwasm-vm
command: cargo install cosmwasm-check --locked
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-wasm-rust:1.68.2-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-wasm-rust:1.72.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Check wasm contracts
command: |
for W in ./target/wasm32-unknown-unknown/release/*.wasm
do
echo -n "Checking `basename $W`... "
check_contract --supported-features iterator,staking,stargate,stargaze $W
cosmwasm-check --available-capabilities iterator,staking,stargate,stargaze $W
done
# This job roughly follows the instructions from https://circleci.com/blog/publishing-to-github-releases-via-circleci/
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions contracts/marketplace/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ pub fn execute_accept_bid(

pub fn execute_reject_bid(
deps: DepsMut,
env: Env,
_env: Env,
info: MessageInfo,
collection: Addr,
token_id: TokenId,
Expand All @@ -744,10 +744,6 @@ pub fn execute_reject_bid(
let bid_key = bid_key(&collection, token_id, &bidder);

let bid = bids().load(deps.storage, bid_key.clone())?;
if bid.is_expired(&env.block) {
return Err(ContractError::BidExpired {});
}

bids().remove(deps.storage, bid_key)?;

let refund_msg = BankMsg::Send {
Expand Down
2 changes: 1 addition & 1 deletion contracts/reserve-auction/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stargaze-reserve-auction"
version = "1.0.1"
version = "1.0.2"
authors = [
"Shane Vitarana <s+git@publicawesome.com>",
"Tasio Victoria <tasiovictoria@ujulabs.com>",
Expand Down
3 changes: 2 additions & 1 deletion contracts/reserve-auction/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ pub fn settle_auction(
.add_attribute("token_id", auction.token_id)
.add_attribute("seller", auction.seller)
.add_attribute("bidder", high_bid.bidder.to_string())
.add_attribute("bid_amount", high_bid.coin.amount.to_string()),
.add_attribute("bid_amount", high_bid.coin.amount.to_string())
.add_attribute("bid_denom", high_bid.coin.denom.to_string()),
);

Ok(response)
Expand Down

0 comments on commit bc05ec3

Please sign in to comment.