Skip to content

Commit

Permalink
fix: bump apollo-cw-asset
Browse files Browse the repository at this point in the history
  • Loading branch information
ApolloGie committed Aug 15, 2024
1 parent 8eea68d commit f02438e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.59.0
toolchain: 1.79.0
target: wasm32-unknown-unknown
override: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.59.0
toolchain: 1.79.0
target: wasm32-unknown-unknown
override: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.65.0
toolchain: 1.79.0
target: wasm32-unknown-unknown
override: true

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-utils"
version = "0.1.2"
version = "0.2.0"
edition = "2021"
license = "MPL-2.0"
description = "Useful helper functions for writing CosmWasm smart contracts."
Expand All @@ -14,10 +14,10 @@ keywords = ["cosmwasm", "smart-contract", "cw20", "apollo", "web3"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cosmwasm-std = "1.2.1"
cosmwasm-std = "1.5.5"
cosmwasm-schema = "1.2.1"
cw20 = "1.0.1"
apollo-cw-asset = "0.1.0"
apollo-cw-asset = { git = "https://github.com/apollodao/apollo-cw-asset.git", rev = "7df6fc38ebcedd2408192858f8af403ef8683d0f" }
regex = "1.9.5"

[dev-dependencies]
Expand Down
10 changes: 5 additions & 5 deletions src/assets.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use apollo_cw_asset::{Asset, AssetInfo, AssetList};
use cosmwasm_std::{
attr, to_binary, Addr, Api, Coin, CosmosMsg, Env, Event, MessageInfo, Response, StdError,
attr, to_json_binary, Addr, Api, Coin, CosmosMsg, Env, Event, MessageInfo, Response, StdError,
StdResult, WasmMsg,
};
use cw20::{Cw20Coin, Cw20ExecuteMsg};
Expand Down Expand Up @@ -232,7 +232,7 @@ pub fn increase_allowance_msgs(
.map(|x| {
Ok(CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: x.address,
msg: to_binary(&Cw20ExecuteMsg::IncreaseAllowance {
msg: to_json_binary(&Cw20ExecuteMsg::IncreaseAllowance {
spender: recipient.to_string(),
amount: x.amount,
expires: Some(cw20::Expiration::AtHeight(env.block.height + 1)),
Expand All @@ -253,7 +253,7 @@ mod tests {
use cosmwasm_std::ReplyOn::Never;
use cosmwasm_std::StdError::GenericErr;
use cosmwasm_std::WasmMsg::Execute;
use cosmwasm_std::{to_binary, Addr, Coin, SubMsg, Uint128};
use cosmwasm_std::{to_json_binary, Addr, Coin, SubMsg, Uint128};
use cw20::{Cw20ExecuteMsg, Expiration};
use test_case::test_case;

Expand Down Expand Up @@ -317,7 +317,7 @@ mod tests {
id: 0,
msg: Wasm(Execute {
contract_addr: String::from("apollo"),
msg: to_binary(
msg: to_json_binary(
&(Cw20ExecuteMsg::TransferFrom {
owner: String::from("addr"),
recipient: String::from("cosmos2contract"),
Expand Down Expand Up @@ -572,7 +572,7 @@ mod tests {
CosmosMsg::Wasm(WasmMsg::Execute {
contract_addr: "cw20".to_string(),
funds: vec![],
msg: to_binary(&Cw20ExecuteMsg::IncreaseAllowance {
msg: to_json_binary(&Cw20ExecuteMsg::IncreaseAllowance {
spender: spender.to_string(),
amount: Uint128::new(200),
expires: Some(Expiration::AtHeight(env.block.height + 1)),
Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ macro_rules! contract_helper {
msg: impl Into<$execute_msg>,
funds: Vec<cosmwasm_std::Coin>,
) -> cosmwasm_std::StdResult<cosmwasm_std::CosmosMsg> {
let msg = cosmwasm_std::to_binary(&msg.into())?;
let msg = cosmwasm_std::to_json_binary(&msg.into())?;
Ok(cosmwasm_std::WasmMsg::Execute {
contract_addr: self.addr().into(),
msg,
Expand Down

0 comments on commit f02438e

Please sign in to comment.