Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
vladjdk committed Nov 16, 2023
1 parent bc08dfe commit 87ee376
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions contracts/warp-funding-account/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::state::CONFIG;
use crate::ContractError;
use controller::account::execute_warp_msgs;
use cosmwasm_std::{
entry_point, to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult,
entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult,
};
use funding_account::{Config, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};

Expand Down Expand Up @@ -49,7 +49,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
match msg {
QueryMsg::Config => {
let config = CONFIG.load(deps.storage)?;
to_binary(&config)
to_json_binary(&config)
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions contracts/warp-funding-account/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::ContractError;
use controller::account::{WarpMsg, WarpMsgs};
use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info};
use cosmwasm_std::{
to_binary, BankMsg, Coin, CosmosMsg, DistributionMsg, GovMsg, IbcMsg, IbcTimeout,
to_json_binary, BankMsg, Coin, CosmosMsg, DistributionMsg, GovMsg, IbcMsg, IbcTimeout,
IbcTimeoutBlock, Response, StakingMsg, Uint128, VoteOption, WasmMsg,
};
use funding_account::{ExecuteMsg, InstantiateMsg};
Expand All @@ -27,7 +27,7 @@ fn test_execute_controller() {
msgs: vec![
WarpMsg::Generic(CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: "contract".to_string(),
msg: to_binary("test").unwrap(),
msg: to_json_binary("test").unwrap(),
funds: vec![Coin {
denom: "coin".to_string(),
amount: Uint128::new(100),
Expand Down Expand Up @@ -84,7 +84,7 @@ fn test_execute_controller() {
.add_messages(vec![
CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: "contract".to_string(),
msg: to_binary("test").unwrap(),
msg: to_json_binary("test").unwrap(),
funds: vec![Coin {
denom: "coin".to_string(),
amount: Uint128::new(100)
Expand Down Expand Up @@ -149,7 +149,7 @@ fn test_execute_owner() {
msgs: vec![
WarpMsg::Generic(CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: "contract".to_string(),
msg: to_binary("test").unwrap(),
msg: to_json_binary("test").unwrap(),
funds: vec![Coin {
denom: "coin".to_string(),
amount: Uint128::new(100),
Expand Down Expand Up @@ -208,7 +208,7 @@ fn test_execute_owner() {
.add_messages(vec![
CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: "contract".to_string(),
msg: to_binary("test").unwrap(),
msg: to_json_binary("test").unwrap(),
funds: vec![Coin {
denom: "coin".to_string(),
amount: Uint128::new(100)
Expand Down Expand Up @@ -273,7 +273,7 @@ fn test_execute_unauth() {
msgs: vec![
WarpMsg::Generic(CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: "contract".to_string(),
msg: to_binary("test").unwrap(),
msg: to_json_binary("test").unwrap(),
funds: vec![Coin {
denom: "coin".to_string(),
amount: Uint128::new(100),
Expand Down
6 changes: 3 additions & 3 deletions packages/controller/src/account.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use cosmwasm_schema::cw_serde;
use cosmwasm_std::CosmosMsg::Stargate;
use cosmwasm_std::{to_binary, BankMsg, DepsMut, WasmMsg};
use cosmwasm_std::{to_json_binary, BankMsg, DepsMut, WasmMsg};
use cosmwasm_std::{Addr, CosmosMsg, Deps, Env, Response, StdError, StdResult, Uint128};
use cw20::{BalanceResponse, Cw20ExecuteMsg};
use cw721::{Cw721QueryMsg, OwnerOfResponse};
Expand Down Expand Up @@ -276,7 +276,7 @@ fn withdraw_asset_cw20(
let res = if amount.balance > Uint128::zero() {
Some(CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: token.to_string(),
msg: to_binary(&Cw20ExecuteMsg::Transfer {
msg: to_json_binary(&Cw20ExecuteMsg::Transfer {
recipient: owner.to_string(),
amount: amount.balance,
})?,
Expand Down Expand Up @@ -306,7 +306,7 @@ fn withdraw_asset_cw721(
let res = if owner_query.owner == *owner {
Some(CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: token.to_string(),
msg: to_binary(&Cw721ExecuteMsg::TransferNft {
msg: to_json_binary(&Cw721ExecuteMsg::TransferNft {
recipient: owner.to_string(),
token_id: token_id.to_string(),
})?,
Expand Down
6 changes: 2 additions & 4 deletions scripts/src/deploy.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use std::io::Error;
use cosmwasm_std::Uint64;
use cw_orch::anyhow;
use cw_orch::prelude::*;
use tokio::runtime::Runtime;
use controller::InstantiateMsg;
use interface::warp_controller::WarpController;
use interface::warp_funding_account::WarpFundingAccount;
use interface::warp_job_account::WarpJobAccount;
Expand Down Expand Up @@ -37,7 +35,7 @@ pub fn deploy() -> anyhow::Result<()>{
warp_addr: "".to_string(),
}, Some(&Addr::unchecked(chain.wallet().address()?.to_string())), None)?;

let legacy_account = WarpLegacyAccount::new("warp_legacy_account", chain.clone())
let legacy_account = WarpLegacyAccount::new("warp_legacy_account", chain.clone());
legacy_account.upload()?;

let resolver = WarpResolver::new("warp_resolver", chain.clone());
Expand All @@ -53,7 +51,7 @@ pub fn deploy() -> anyhow::Result<()>{
templates: vec![],
}, Some(&Addr::unchecked(chain.wallet().address()?.to_string())), None)?;

let controller = WarpController::new("warp_controller", chain);
let controller = WarpController::new("warp_controller", chain.clone());

controller.upload()?;
controller.instantiate(&controller::InstantiateMsg {
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ mod migrate;

fn main() {
let _ = deploy::deploy();
// let _ = migrate::migrate();
let _ = migrate::migrate();
}

0 comments on commit 87ee376

Please sign in to comment.