diff --git a/contracts/hub/src/execute.rs b/contracts/hub/src/execute.rs index 7853cb7..f97af86 100644 --- a/contracts/hub/src/execute.rs +++ b/contracts/hub/src/execute.rs @@ -119,7 +119,9 @@ pub fn instantiate( }, )?; - Ok(Response::new().add_message(chain.create_denom_msg(full_denom, sub_denom))) + Ok(Response::new() + .add_message(chain.create_denom_msg(full_denom.clone(), sub_denom)) + .add_attribute("denom", full_denom)) } //-------------------------------------------------------------------------------------------------- diff --git a/packages/eris-nibiru/src/chain.rs b/packages/eris-nibiru/src/chain.rs index deb4c1e..bf25284 100644 --- a/packages/eris-nibiru/src/chain.rs +++ b/packages/eris-nibiru/src/chain.rs @@ -12,6 +12,10 @@ pub struct Chain { } impl ChainInterface for Chain { + fn get_token_denom(&self, contract_addr: impl Into, sub_denom: String) -> String { + format!("tf/{0}/{1}", contract_addr.into(), sub_denom) + } + fn create_denom_msg(&self, _full_denom: String, subdenom: String) -> CosmosMsg { MsgCreateDenom { sender: self.contract.to_string(), @@ -28,6 +32,7 @@ impl ChainInterface Vec> { vec![MsgMint { sender: self.contract.to_string(), + amount: Some(crate::denom::Coin { denom: full_denom.to_string(), amount: amount.to_string(),