Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ workflows:
jobs:
contract_marketplace:
docker:
- image: rust:1.81.0
- image: rust:1.88.0
working_directory: ~/project/contracts/marketplace
steps:
- checkout:
Expand All @@ -29,7 +29,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-marketplace-rust:1.81.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-marketplace-rust:1.88.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -43,10 +43,10 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-marketplace-rust:1.81.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-marketplace-rust:1.88.0-{{ checksum "~/project/Cargo.lock" }}
contract_marketplace_v2:
docker:
- image: rust:1.81.0
- image: rust:1.88.0
working_directory: ~/project/contracts/stargaze-marketplace-v2
steps:
- checkout:
Expand All @@ -56,7 +56,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-marketplace-v2-rust:1.81.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-marketplace-v2-rust:1.88.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -70,18 +70,18 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-marketplace-v2-rust:1.81.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-marketplace-v2-rust:1.88.0-{{ checksum "~/project/Cargo.lock" }}
lint:
docker:
- image: rust:1.81.0
- image: rust:1.88.0
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.81.0-{{ checksum "Cargo.lock" }}
- cargocache-v2-lint-rust:1.88.0-{{ checksum "Cargo.lock" }}
- run:
name: Add rustfmt component
command: rustup component add rustfmt
Expand All @@ -100,15 +100,15 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: cargocache-v2-lint-rust:1.81.0-{{ checksum "Cargo.lock" }}
key: cargocache-v2-lint-rust:1.88.0-{{ 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.81.0
- image: rust:1.88.0
steps:
- checkout:
path: ~/project
Expand All @@ -117,7 +117,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-wasm-rust:1.81.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-wasm-rust:1.88.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown
Expand All @@ -137,7 +137,7 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-wasm-rust:1.81.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-wasm-rust:1.88.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Check wasm contracts
command: |
Expand Down
2 changes: 1 addition & 1 deletion contracts/marketplace/src/sudo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub fn sudo_update_params(

pub fn sudo_add_operator(deps: DepsMut, operator: Addr) -> Result<Response, ContractError> {
let mut params = SUDO_PARAMS.load(deps.storage)?;
if !params.operators.iter().any(|o| o == operator) {
if !params.operators.contains(&operator) {
params.operators.push(operator.clone());
} else {
return Err(ContractError::OperatorAlreadyRegistered {});
Expand Down
2 changes: 1 addition & 1 deletion contracts/marketplace/src/testing/helpers/funds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn add_funds_for_incremental_fee(
amount: fee_funds,
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/marketplace/src/testing/helpers/nft_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn mint_for(
&mint_for_creator_msg,
&[],
);
println!("res is {:?}", res);
println!("res is {res:?}");
assert!(res.is_ok());
}

Expand Down
8 changes: 4 additions & 4 deletions contracts/marketplace/src/testing/setup/setup_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn setup_accounts(router: &mut StargazeApp) -> Result<(Addr, Addr, Addr), Co
amount: funds.clone(),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();
router
.sudo(SudoMsg::Bank({
Expand All @@ -34,7 +34,7 @@ pub fn setup_accounts(router: &mut StargazeApp) -> Result<(Addr, Addr, Addr), Co
amount: funds.clone(),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();
router
.sudo(SudoMsg::Bank({
Expand All @@ -43,7 +43,7 @@ pub fn setup_accounts(router: &mut StargazeApp) -> Result<(Addr, Addr, Addr), Co
amount: creator_funds.clone(),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();

// Check native balances
Expand All @@ -67,7 +67,7 @@ pub fn setup_second_bidder_account(router: &mut StargazeApp) -> Result<Addr, Con
amount: funds.clone(),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();

// Check native balances
Expand Down
6 changes: 3 additions & 3 deletions contracts/marketplace/src/testing/tests/bids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ fn auto_accept_bid() {
amount: coins(1000, "random"),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();
let set_bid_msg = ExecuteMsg::SetBid {
sale_type: SaleType::FixedPrice,
Expand Down Expand Up @@ -899,7 +899,7 @@ fn try_set_accept_bid_high_fees() {
amount: creator_funds,
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();
// Mint NFT for creator
mint(&mut router, &creator, &minter_addr);
Expand Down Expand Up @@ -1096,7 +1096,7 @@ fn try_query_sorted_bids() {
amount: funds,
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();

// Bidder makes bid
Expand Down
8 changes: 4 additions & 4 deletions contracts/reserve-auction/src/tests/setup/setup_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn setup_accounts(router: &mut StargazeApp) -> Result<(Addr, Addr, Addr), Co
amount: funds.clone(),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();
router
.sudo(SudoMsg::Bank({
Expand All @@ -33,7 +33,7 @@ pub fn setup_accounts(router: &mut StargazeApp) -> Result<(Addr, Addr, Addr), Co
amount: funds.clone(),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();
router
.sudo(SudoMsg::Bank({
Expand All @@ -42,7 +42,7 @@ pub fn setup_accounts(router: &mut StargazeApp) -> Result<(Addr, Addr, Addr), Co
amount: creator_funds.clone(),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();

// Check native balances
Expand Down Expand Up @@ -70,7 +70,7 @@ pub fn setup_addtl_account(
amount: funds.clone(),
}
}))
.map_err(|err| println!("{:?}", err))
.map_err(|err| println!("{err:?}"))
.ok();

// Check native balances
Expand Down
3 changes: 3 additions & 0 deletions contracts/stargaze-marketplace-v2/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ pub enum ContractError {
#[error("InsufficientFunds")]
InsufficientFunds,

#[error("ContractPaused")]
ContractPaused,

#[error("InternalError: {0}")]
InternalError(String),
}
Loading
Loading