Skip to content

Commit

Permalink
Merge branch 'development' into joe/validator-staking-adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
joemonem authored May 20, 2024
2 parents 0587379 + 3ddabea commit 8614d9d
Show file tree
Hide file tree
Showing 190 changed files with 32,356 additions and 4,411 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `ADOBaseVersion` query to all ADOs [(#416)](https://github.com/andromedaprotocol/andromeda-core/pull/416)
- Staking: Added ability to remove/replace reward token [(#418)](https://github.com/andromedaprotocol/andromeda-core/pull/418)
- Added Expiry Enum [(#419)](https://github.com/andromedaprotocol/andromeda-core/pull/419)
- Added Conditional Splitter [(#441)](https://github.com/andromedaprotocol/andromeda-core/pull/441)
- Validator Staking: Added the option to set an amount while unstaking [(#458)](https://github.com/andromedaprotocol/andromeda-core/pull/458)

### Changed

- Merkle Root: stage expiration now uses `Milliseconds`[(#417)](https://github.com/andromedaprotocol/andromeda-core/pull/417)
- Module Redesign [(#452)](https://github.com/andromedaprotocol/andromeda-core/pull/452)

### Fixed

- Splitter: avoid zero send messages, owner updates lock any time [(#457)](https://github.com/andromedaprotocol/andromeda-core/pull/457)

### Removed

- Schemas are no longer tracked [(#430)](https://github.com/andromedaprotocol/andromeda-core/pull/430)
21 changes: 19 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/workspace-optimizer:0.13.0
cosmwasm/optimizer:0.15.1
2 changes: 1 addition & 1 deletion contracts/data-storage/andromeda-primitive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cw-utils = { workspace = true }
cw20 = { workspace = true }


andromeda-std = { workspace = true, features = ["module_hooks"] }
andromeda-std = { workspace = true, features = [] }
andromeda-data-storage = { workspace = true }


Expand Down
13 changes: 11 additions & 2 deletions contracts/data-storage/andromeda-primitive/src/execute.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use andromeda_data_storage::primitive::{ExecuteMsg, Primitive, PrimitiveRestriction};
use andromeda_std::{
ado_contract::ADOContract, common::context::ExecuteContext, error::ContractError,
ado_contract::ADOContract,
common::{actions::call_action, context::ExecuteContext},
error::ContractError,
};
use cosmwasm_std::{ensure, Response, StdError};
use cw_utils::nonpayable;
Expand All @@ -10,7 +12,14 @@ use crate::{
state::{DATA, KEY_OWNER, RESTRICTION},
};

pub fn handle_execute(ctx: ExecuteContext, msg: ExecuteMsg) -> Result<Response, ContractError> {
pub fn handle_execute(mut ctx: ExecuteContext, msg: ExecuteMsg) -> Result<Response, ContractError> {
call_action(
&mut ctx.deps,
&ctx.info,
&ctx.env,
&ctx.amp_ctx,
msg.as_ref(),
)?;
match msg {
ExecuteMsg::UpdateRestriction { restriction } => update_restriction(ctx, restriction),
ExecuteMsg::SetValue { key, value } => set_value(ctx, key, value),
Expand Down
12 changes: 9 additions & 3 deletions contracts/ecosystem/andromeda-vault/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ use andromeda_ecosystem::vault::{
};
use andromeda_std::ado_base::ownership::ContractOwnerResponse;
use andromeda_std::ado_contract::ADOContract;

use andromeda_std::amp::{AndrAddr, Recipient};

use andromeda_std::common::actions::call_action;
use andromeda_std::common::context::ExecuteContext;
use andromeda_std::common::encode_binary;
use andromeda_std::{
Expand Down Expand Up @@ -76,7 +75,14 @@ pub fn execute(
}
}

pub fn handle_execute(ctx: ExecuteContext, msg: ExecuteMsg) -> Result<Response, ContractError> {
pub fn handle_execute(mut ctx: ExecuteContext, msg: ExecuteMsg) -> Result<Response, ContractError> {
call_action(
&mut ctx.deps,
&ctx.info,
&ctx.env,
&ctx.amp_ctx,
msg.as_ref(),
)?;
match msg {
ExecuteMsg::Deposit { recipient, msg } => execute_deposit(ctx, recipient, msg),
ExecuteMsg::WithdrawVault {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
2 changes: 2 additions & 0 deletions contracts/finance/andromeda-conditional-splitter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
Cargo.lock
32 changes: 32 additions & 0 deletions contracts/finance/andromeda-conditional-splitter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "andromeda-conditional-splitter"
version = "1.1.0"
edition = "2021"
rust-version = "1.75.0"

[lib]
crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query exports
library = []
testing = ["cw-multi-test", "andromeda-testing"]


[dependencies]
cosmwasm-std = { workspace = true }
cosmwasm-schema = { workspace = true }
cw-storage-plus = { workspace = true }
cw-utils = { workspace = true }

andromeda-std = { workspace = true }
andromeda-finance = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true, optional = true }

[dev-dependencies]
andromeda-app = { workspace = true }
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use andromeda_finance::conditional_splitter::{ExecuteMsg, InstantiateMsg, QueryMsg};
use cosmwasm_schema::write_api;

fn main() {
write_api! {
instantiate: InstantiateMsg,
query: QueryMsg,
execute: ExecuteMsg,

}
}
Loading

0 comments on commit 8614d9d

Please sign in to comment.