diff --git a/Cargo.lock b/Cargo.lock index 475772cb..af4c97ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -386,7 +386,7 @@ dependencies = [ [[package]] name = "external-staking" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -553,7 +553,7 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mesh-apis" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -566,7 +566,7 @@ dependencies = [ [[package]] name = "mesh-bindings" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -574,7 +574,7 @@ dependencies = [ [[package]] name = "mesh-converter" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -596,7 +596,7 @@ dependencies = [ [[package]] name = "mesh-mocks" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -610,7 +610,7 @@ dependencies = [ [[package]] name = "mesh-native-staking" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -633,7 +633,7 @@ dependencies = [ [[package]] name = "mesh-native-staking-proxy" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -656,7 +656,7 @@ dependencies = [ [[package]] name = "mesh-simple-price-feed" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -677,7 +677,7 @@ dependencies = [ [[package]] name = "mesh-sync" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -689,7 +689,7 @@ dependencies = [ [[package]] name = "mesh-vault" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -711,7 +711,7 @@ dependencies = [ [[package]] name = "mesh-virtual-staking" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" dependencies = [ "anyhow", "cosmwasm-schema", diff --git a/Cargo.toml b/Cargo.toml index 3cc65b8b..e0525f81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "2" [workspace.package] edition = "2021" -version = "0.3.0-alpha.1" +version = "0.3.0-beta.1" license = "MIT" repository = "https://github.com/osmosis-labs/mesh-security" diff --git a/contracts/provider/external-staking/src/contract.rs b/contracts/provider/external-staking/src/contract.rs index a7f31ec2..1c92d050 100644 --- a/contracts/provider/external-staking/src/contract.rs +++ b/contracts/provider/external-staking/src/contract.rs @@ -111,7 +111,6 @@ impl ExternalStakingContract<'_> { let tx = self.pending_txs.load(deps.storage, tx_id)?; println!("tx: {:?}", tx); - // TODO: Verify tx comes from the right context // Verify tx is the right type ensure!( matches!(tx, Tx::InFlightRemoteStaking { .. }), @@ -142,7 +141,6 @@ impl ExternalStakingContract<'_> { let stake = stake_lock.write()?; stake.stake += tx_amount; - // Commit distribution (need to unlock it first) // Distribution alignment stake .points_alignment @@ -176,7 +174,6 @@ impl ExternalStakingContract<'_> { // Load tx let tx = self.pending_txs.load(deps.storage, tx_id)?; - // TODO: Verify tx comes from the right context // Verify tx is the right type ensure!( matches!(tx, Tx::InFlightRemoteStaking { .. }), @@ -330,7 +327,6 @@ impl ExternalStakingContract<'_> { // Load tx let tx = self.pending_txs.load(deps.storage, tx_id)?; - // TODO: Verify tx comes from the right context // Verify tx is of the right type ensure!( matches!(tx, Tx::InFlightRemoteUnstaking { .. }), @@ -364,6 +360,7 @@ impl ExternalStakingContract<'_> { stake.stake -= tx_amount; // FIXME? Release period being computed after successful IBC tx + // (Note: this is good for now, but can be revisited in v1 design) let release_at = env.block.time.plus_seconds(config.unbonding_period); let unbond = PendingUnbond { amount: tx_amount, @@ -396,7 +393,6 @@ impl ExternalStakingContract<'_> { // Load tx let tx = self.pending_txs.load(deps.storage, tx_id)?; - // TODO: Verify tx comes from the right context // Verify tx is of the right type ensure!( matches!(tx, Tx::InFlightRemoteUnstaking { .. }),