Skip to content

Commit

Permalink
Fix token_gateway vesting time config
Browse files Browse the repository at this point in the history
  • Loading branch information
ismellike committed Sep 3, 2024
1 parent 4c90f3c commit 505e33a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/arena-token-gateway/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ pub fn accept_application(
denom: cw_vesting::UncheckedDenom::Native(vesting_config.denom.clone()),
schedule: Schedule::SaturatingLinear,
start_time: Some(env.block.time),
vesting_duration_seconds: 31_536_000, // 365 days * 24 hours * 60 minutes * 60 seconds
unbonding_duration_seconds: 1_209_600,
vesting_duration_seconds: vesting_config.vesting_time,
unbonding_duration_seconds: 1_209_600, // N/A
})?,
funds: coins(vesting_amount.u128(), vesting_config.denom.clone()),
})?;
Expand Down
12 changes: 11 additions & 1 deletion scripts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use arena::Arena;
use cw_orch::{anyhow, prelude::*};
use orch_interface::{
arena_competition_enrollment::ArenaCompetitionEnrollmentContract,
arena_core::ArenaCoreContract, arena_tournament_module::ArenaTournamentModuleContract,
arena_core::ArenaCoreContract, arena_token_gateway::ArenaTokenGatewayContract,
arena_tournament_module::ArenaTournamentModuleContract,
};
use std::env;

Expand Down Expand Up @@ -40,6 +41,7 @@ enum DeployComponent {
Core,
Tournament,
Enrollment,
TokenGateway,
}

fn parse_command(args: &[String]) -> Command {
Expand All @@ -58,6 +60,7 @@ fn parse_command(args: &[String]) -> Command {
"core" => DeployComponent::Core,
"tournament" => DeployComponent::Tournament,
"enrollment" => DeployComponent::Enrollment,
"token_gateway" => DeployComponent::TokenGateway,
_ => return Command::Unknown,
};

Expand All @@ -75,6 +78,7 @@ fn deploy(network: Network, component: DeployComponent) -> anyhow::Result<()> {
DeployComponent::Core => deploy_core(daemon)?,
DeployComponent::Tournament => deploy_tournament(daemon)?,
DeployComponent::Enrollment => deploy_enrollment(daemon)?,
DeployComponent::TokenGateway => deploy_token_gateway(daemon)?,
}

Ok(())
Expand Down Expand Up @@ -104,6 +108,12 @@ fn deploy_enrollment(daemon: Daemon) -> anyhow::Result<()> {
Ok(())
}

fn deploy_token_gateway(daemon: Daemon) -> anyhow::Result<()> {
let token_gateway = ArenaTokenGatewayContract::new(daemon);
token_gateway.upload()?;
Ok(())
}

mod arena;
mod dao_dao;
#[cfg(test)]
Expand Down
2 changes: 1 addition & 1 deletion scripts/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"arena_escrow": 6398,
"arena_league_module": 6401,
"arena_payment_registry": 6405,
"arena_token_gateway": 6404,
"arena_token_gateway": 6441,
"arena_tournament_module": 6402,
"arena_wager_module": 6400
},
Expand Down

0 comments on commit 505e33a

Please sign in to comment.