Skip to content

Commit

Permalink
Use latest bindings (v0.11.0) (#17)
Browse files Browse the repository at this point in the history
* Use latest bindings (v0.11.0)

* Update to Juno v17

* juno v17 & latest v7 ictest

* rm app_state.bank.params.denom_metadata

* bal.Int64()
  • Loading branch information
Reecepbcups authored Oct 26, 2023
1 parent 4267a6d commit d823f37
Show file tree
Hide file tree
Showing 11 changed files with 323 additions and 323 deletions.
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

0 comments on commit d823f37

Please sign in to comment.