Skip to content

Commit

Permalink
feat: max amt works
Browse files Browse the repository at this point in the history
  • Loading branch information
PFC-developer committed Jan 13, 2024
1 parent 542dbb8 commit 014ccd6
Show file tree
Hide file tree
Showing 14 changed files with 352 additions and 35 deletions.
2 changes: 1 addition & 1 deletion artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
3d74986751e5ffaee368e2fef48600a2cec7475cf34180bf4416f0bf38f7511b pfc_astroport_generator.wasm
882eaf36e8f8377e6da7d38338a5f6f1abf1e2c2d4c3201dde34ec62de63faaf pfc_dust_collector_kujira_contract.wasm
9ddaa3af8899c013ce4efaf78dde32124304b624f20ba869cc407a951fafc2e8 pfc_dust_collector_kujira_contract.wasm
f4301d89b55b0f1f18279c6b3b3931a5a5db3efc2d58875000d1768a27d27f1a pfc_fee_splitter.wasm
866668e836b01245abc173e2a7669f53eb2adcbc7ba266627d5651f07b7ca580 pfc_vault_contract.wasm
Binary file modified artifacts/pfc_dust_collector_kujira_contract.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion contracts/pfc-dust-collector-kujira/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "pfc-dust-collector-kujira-contract"
version = "1.0.1"
version = "1.1.0"
authors = ["PFC <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
10 changes: 7 additions & 3 deletions contracts/pfc-dust-collector-kujira/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use pfc_dust_collector_kujira::dust_collector::{
use crate::error::ContractError;
use crate::handler::exec as ExecHandler;
use crate::handler::exec::{
execute_clear_asset, execute_set_asset_minimum, execute_set_asset_strategy,
execute_set_base_denom, execute_set_calc_token_router, execute_set_manta_token_router,
execute_set_max_swaps, execute_set_return_contract,
execute_clear_asset, execute_set_asset_maximum, execute_set_asset_minimum,
execute_set_asset_strategy, execute_set_base_denom, execute_set_calc_token_router,
execute_set_manta_token_router, execute_set_max_swaps, execute_set_return_contract,
};
use crate::handler::query as QueryHandler;
use crate::state;
Expand Down Expand Up @@ -138,6 +138,10 @@ pub fn execute(
cw_ownable::assert_owner(deps.storage, &info.sender)?;
execute_set_asset_minimum(deps, &info.sender, denom, minimum)
}
ExecuteMsg::SetAssetMaximum { denom, maximum } => {
cw_ownable::assert_owner(deps.storage, &info.sender)?;
execute_set_asset_maximum(deps, &info.sender, denom, maximum)
}
ExecuteMsg::ClearAsset { denom } => {
cw_ownable::assert_owner(deps.storage, &info.sender)?;
execute_clear_asset(deps, &info.sender, denom)
Expand Down
4 changes: 3 additions & 1 deletion contracts/pfc-dust-collector-kujira/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cosmwasm_std::{OverflowError, StdError};
use cosmwasm_std::{OverflowError, StdError, Uint128};
use cw_ownable::OwnershipError;
use kujira::Denom;
use thiserror::Error;
Expand Down Expand Up @@ -42,6 +42,8 @@ pub enum ContractError {
DenomNotUnique {},
#[error("PFC-Dust-Kujira: Don't send funds here")]
NoFundsRequired {},
#[error("PFC-Dust-Kujira: Min {min:?} > Max {max:?} ?")]
MinMax { min: Uint128, max: Uint128 },

#[error("PFC-Dust-Kujira: Contract can't be migrated! {current_name:?} {current_version:?}")]
MigrationError {
Expand Down
Loading

0 comments on commit 014ccd6

Please sign in to comment.