Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest bindings (v0.11.0) #17

Merged
merged 5 commits into from
Oct 26, 2023
Merged
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
86 changes: 43 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions contracts/tokenfactory_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ cosmwasm-schema = "1.1"
cosmwasm-std = "1.1"
cosmwasm-storage = "1.1"
cw-storage-plus = "1.0.0"
token-bindings = "0.10.3"
token-bindings = "0.11.0"
cw2 = "1.0.0"
schemars = "0.8"
serde = { version = "1.0", default-features = false, features = ["derive"] }
thiserror = "1.0"

juno-tokenfactory-types = { path = "../../packages/tokenfactory-types", version = "0.0.2"}
juno-tokenfactory-types = { path = "../../packages/tokenfactory-types", version = "0.1.0"}

[dev-dependencies]
cw-multi-test = "0.16.1"
Expand Down
20 changes: 10 additions & 10 deletions contracts/tokenfactory_core/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::helpers::{
use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
use crate::state::{Config, CONFIG};

use token_bindings::{TokenFactoryMsg, TokenMsg};
use token_bindings::TokenFactoryMsg;

// version info for migration info
const CONTRACT_NAME: &str = "crates.io:tokenfactory-core";
Expand All @@ -41,8 +41,8 @@ pub fn instantiate(
}

// Create new denoms.
let mut new_denom_msgs: Vec<TokenMsg> = vec![];
let mut new_mint_msgs: Vec<TokenMsg> = vec![];
let mut new_denom_msgs: Vec<TokenFactoryMsg> = vec![];
let mut new_mint_msgs: Vec<TokenFactoryMsg> = vec![];

if let Some(new_denoms) = msg.new_denoms {
if !new_denoms.is_empty() {
Expand Down Expand Up @@ -138,7 +138,7 @@ pub fn execute(
}

// burn from from_address
let msg: TokenMsg = TokenMsg::BurnTokens {
let msg: TokenFactoryMsg = TokenFactoryMsg::BurnTokens {
denom: denom.denom.clone(),
amount: denom.amount,
burn_from_address: from,
Expand All @@ -158,7 +158,7 @@ pub fn execute(
let config = CONFIG.load(deps.storage)?;
is_contract_manager(config, info.sender)?;

let msg: TokenMsg = TokenMsg::ForceTransfer {
let msg: TokenFactoryMsg = TokenFactoryMsg::ForceTransfer {
denom: denom.denom.clone(),
amount: denom.amount,
from_address: from,
Expand All @@ -175,7 +175,7 @@ pub fn execute(
let config = CONFIG.load(deps.storage)?;
is_contract_manager(config, info.sender)?;

let msg: TokenMsg = TokenMsg::SetMetadata {
let msg: TokenFactoryMsg = TokenFactoryMsg::SetMetadata {
denom: denom.clone(),
metadata,
};
Expand Down Expand Up @@ -285,7 +285,7 @@ pub fn execute_transfer_admin(
})?;
}

let msg = TokenMsg::ChangeAdmin {
let msg = TokenFactoryMsg::ChangeAdmin {
denom: denom.to_string(),
new_admin_address: new_addr.to_string(),
};
Expand All @@ -306,7 +306,7 @@ pub fn execute_mint(

is_whitelisted(config, info.sender)?;

let mint_msgs: Vec<TokenMsg> = mint_factory_token_messages(&address, &denoms)?;
let mint_msgs: Vec<TokenFactoryMsg> = mint_factory_token_messages(&address, &denoms)?;

Ok(Response::new()
.add_attribute("method", "execute_mint")
Expand All @@ -333,9 +333,9 @@ pub fn execute_burn(
.cloned()
.partition(|coin| config.denoms.iter().any(|d| *d == coin.denom));

let burn_msgs: Vec<TokenMsg> = factory_denoms
let burn_msgs: Vec<TokenFactoryMsg> = factory_denoms
.iter()
.map(|coin| TokenMsg::BurnTokens {
.map(|coin| TokenFactoryMsg::BurnTokens {
denom: coin.denom.clone(),
amount: coin.amount,
burn_from_address: env.contract.address.to_string(),
Expand Down
Loading
Loading