Skip to content

Commit

Permalink
FIxes
Browse files Browse the repository at this point in the history
  • Loading branch information
MissingNO57 committed Apr 19, 2024
1 parent 1cf0f1d commit bf1fa86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fetch/cosmwasm_contract/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use crate::state::{config, config_read, refunds_add, refunds_have, State};

pub const DEFAULT_DENOM: &str = "aasi";
pub const DEFAULT_RELAY_EON: u64 = 0;
pub const DEFAULT_FEES_ACCRUED: Uint128 = Uint128::zero();

/* ***************************************************
* ************** Initialization *************
Expand All @@ -38,6 +39,7 @@ pub fn instantiate(
&info.sender,
supply,
DEFAULT_RELAY_EON,
DEFAULT_FEES_ACCRUED,
&msg,
)?;

Expand All @@ -50,6 +52,7 @@ pub fn initialise_contract_state(
admin: &Addr,
supply: Uint128,
relay_eon: u64,
fees_accrued: Uint128,
msg: &InstantiateMsg,
) -> StdResult<()> {
let current_block_number = env.block.height;
Expand All @@ -70,7 +73,7 @@ pub fn initialise_contract_state(

let state = State {
supply,
fees_accrued: Uint128::zero(),
fees_accrued,
next_swap_id: msg.next_swap_id,
sealed_reverse_swap_id: 0,
relay_eon,
Expand Down
1 change: 1 addition & 0 deletions fetch/cosmwasm_contract/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub fn migrate(deps: DepsMut, env: Env, msg: MigrateMsg) -> StdResult<Response>
&re_init.admin,
re_init.supply,
re_init.relay_eon,
re_init.fees_accrued,
&re_init.init_msg,
)?;
} else if !is_state_valid(deps.storage) {
Expand Down
1 change: 1 addition & 0 deletions fetch/cosmwasm_contract/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ pub struct ReInitMsg {
pub admin: Addr,
pub supply: Uint128,
pub relay_eon: u64,
pub fees_accrued: Uint128,
}

#[derive(Serialize, Deserialize, JsonSchema)]
Expand Down

0 comments on commit bf1fa86

Please sign in to comment.