terra: post migration fee change

Change-Id: I9e1517cf3038f80836b58810e11bddc1b58e6fbf
This commit is contained in:
Reisen 2021-10-19 15:24:54 +00:00
parent f275823461
commit 17ba6b12d0
2 changed files with 3 additions and 18 deletions

View File

@ -110,19 +110,7 @@ const CHAIN_ID: u16 = 3;
const WRAPPED_ASSET_UPDATING: &str = "updating";
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> {
// Switch CW20 Code ID to include assets with updatable metadata.
let mut state = config(deps.storage).load()?;
state.wrapped_asset_code_id = 556;
config(deps.storage).save(&state)?;
// Remove registered asset with old code ID.
let asset_id = build_asset_id(
1,
&hex::decode("069b8857feab8184fb687f634618c035dac439dc1aeb3b5598a0f00000000001").unwrap(),
);
wrapped_asset(deps.storage).remove(&asset_id);
assert!(wrapped_asset(deps.storage).load(&asset_id).is_err());
pub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> {
Ok(Response::default())
}

View File

@ -78,14 +78,11 @@ type HumanAddr = String;
const CHAIN_ID: u16 = 3;
// Lock assets fee amount and denomination
const FEE_AMOUNT: u128 = 10000;
const FEE_AMOUNT: u128 = 0;
pub const FEE_DENOMINATION: &str = "uluna";
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> {
let mut state = config_read(deps.storage).load()?;
state.fee = Coin::new(0, FEE_DENOMINATION);
config(deps.storage).save(&state)?;
pub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> {
Ok(Response::default())
}