Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0n00gler committed Nov 22, 2024
1 parent dc1abf4 commit 917de4f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contracts/no100/examples/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use no100::msg::{InstantiateMsg, MigrateMsg, QueryMsg};
use cosmwasm_schema::{export_schema, remove_schemas, schema_for};
use no100::msg::{InstantiateMsg, MigrateMsg, QueryMsg};
use std::{env::current_dir, fs::create_dir_all};

fn main() {
Expand Down
9 changes: 6 additions & 3 deletions contracts/no100/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg};
use cosmwasm_std::{entry_point, Binary, Coin, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, Uint128};
use cosmwasm_std::{
entry_point, Binary, Coin, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult,
Uint128,
};

#[entry_point]
pub fn instantiate(
Expand Down Expand Up @@ -41,15 +44,15 @@ pub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Respons

fn sudo_result_track_before(amount: Coin) -> StdResult<Response> {
if amount.amount >= Uint128::from(100u8) {
return Err(StdError::generic_err("sending >100 tokens is not allowed"))
return Err(StdError::generic_err("sending >100 tokens is not allowed"));
}

Ok(Response::new())
}

fn sudo_result_block_before(amount: Coin) -> StdResult<Response> {
if amount.amount >= Uint128::from(100u8) {
return Err(StdError::generic_err("sending >100 tokens is not allowed"))
return Err(StdError::generic_err("sending >100 tokens is not allowed"));
}

Ok(Response::new())
Expand Down
9 changes: 6 additions & 3 deletions contracts/reflect/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use crate::query::{ChainResponse, InterchainQueries, QueryMsg};
use cosmwasm_std::{entry_point, to_json_binary, to_json_vec, BankMsg, Binary, ContractResult, CosmosMsg, Deps, DepsMut, Env, MessageInfo, QueryRequest, Reply, Response, StdError, StdResult, SubMsg, SystemResult, Uint128};
use cosmwasm_std::{
entry_point, to_json_binary, to_json_vec, BankMsg, Binary, ContractResult, CosmosMsg, Deps,
DepsMut, Env, MessageInfo, QueryRequest, Reply, Response, StdError, StdResult, SubMsg,
SystemResult, Uint128,
};
use cw2::set_contract_version;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -51,7 +55,7 @@ pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> S

Ok(Response::default().add_submessages(submsgs))
}
ExecuteMsg::Burn { } => burn_tokens(deps, env, info)
ExecuteMsg::Burn {} => burn_tokens(deps, env, info),
}
}

Expand All @@ -61,7 +65,6 @@ pub fn burn_tokens(_deps: DepsMut, _env: Env, info: MessageInfo) -> Result<Respo
let msg = BankMsg::Burn { amount: funds };

Ok(Response::new().add_message(msg))

}

#[entry_point]
Expand Down

0 comments on commit 917de4f

Please sign in to comment.