From 5834145794f0bbcf129c10e49c37138f3eb2620d Mon Sep 17 00:00:00 2001 From: Mitar Djakovic Date: Mon, 2 Dec 2024 19:07:30 +0200 Subject: [PATCH] Split up contracts (#672) --- CHANGELOG.md | 3 ++ Cargo.lock | 37 +++++++++++++++---- Cargo.toml | 4 ++ .../andromeda-fixed-multisig}/.cargo/config | 0 .../andromeda-fixed-multisig/Cargo.toml | 2 +- .../examples/schema.rs | 2 +- .../andromeda-fixed-multisig/src/contract.rs | 2 +- .../andromeda-fixed-multisig/src/execute.rs | 2 +- .../andromeda-fixed-multisig/src/interface.rs | 2 +- .../andromeda-fixed-multisig/src/lib.rs | 0 .../andromeda-fixed-multisig/src/query.rs | 0 .../andromeda-fixed-multisig/src/state.rs | 0 .../src/testing/mod.rs | 0 .../src/testing/tests.rs | 4 +- .../andromeda-counter/examples/schema.rs | 10 ----- .../andromeda-point/examples/schema.rs | 10 ----- .../andromeda-counter}/.cargo/config | 0 .../andromeda-counter/Cargo.toml | 3 +- .../andromeda-counter}/examples/schema.rs | 2 +- .../andromeda-counter/src/contract.rs | 4 +- .../andromeda-counter/src/interface.rs | 2 +- .../andromeda-counter/src/lib.rs | 0 .../andromeda-counter/src/mock.rs | 6 +-- .../andromeda-counter/src/state.rs | 2 +- .../andromeda-counter/src/testing/mock.rs | 4 +- .../andromeda-counter/src/testing/mod.rs | 0 .../andromeda-counter/src/testing/tests.rs | 2 +- .../andromeda-curve}/.cargo/config | 0 .../andromeda-curve/Cargo.toml | 2 +- .../andromeda-curve}/examples/schema.rs | 2 +- .../andromeda-curve/src/contract.rs | 2 +- .../andromeda-curve/src/interface.rs | 2 +- .../andromeda-curve/src/lib.rs | 0 .../andromeda-curve/src/mock.rs | 2 +- .../andromeda-curve/src/state.rs | 2 +- .../andromeda-curve/src/testing/mock.rs | 2 +- .../andromeda-curve}/src/testing/mod.rs | 0 .../andromeda-curve/src/testing/tests.rs | 4 +- .../andromeda-date-time/.cargo/config | 0 .../andromeda-date-time/Cargo.toml | 2 +- .../andromeda-date-time}/examples/schema.rs | 2 +- .../andromeda-date-time/src/contract.rs | 4 +- .../andromeda-date-time/src/interface.rs | 2 +- .../andromeda-date-time/src/lib.rs | 0 .../andromeda-date-time/src/mock.rs | 4 +- .../andromeda-date-time/src/testing/mock.rs | 4 +- .../andromeda-date-time}/src/testing/mod.rs | 0 .../andromeda-date-time/src/testing/tests.rs | 2 +- .../andromeda-graph}/.cargo/config | 0 .../andromeda-graph/Cargo.toml | 2 +- .../math/andromeda-graph/examples/schema.rs | 10 +++++ .../andromeda-graph/src/contract.rs | 6 +-- .../andromeda-graph/src/lib.rs | 0 .../andromeda-graph/src/mock.rs | 6 +-- .../andromeda-graph/src/state.rs | 4 +- .../andromeda-graph/src/testing/mock.rs | 4 +- .../src/testing/mock_querier.rs | 4 +- .../andromeda-graph/src/testing/mod.rs | 0 .../andromeda-graph/src/testing/tests.rs | 4 +- .../andromeda-point}/.cargo/config | 0 .../andromeda-point/Cargo.toml | 4 +- .../math/andromeda-point/examples/schema.rs | 10 +++++ .../andromeda-point/src/contract.rs | 2 +- .../andromeda-point/src/execute.rs | 2 +- .../andromeda-point/src/lib.rs | 0 .../andromeda-point/src/mock.rs | 2 +- .../andromeda-point/src/query.rs | 2 +- .../andromeda-point/src/state.rs | 2 +- .../andromeda-point/src/testing/mock.rs | 2 +- .../andromeda-point}/src/testing/mod.rs | 0 .../andromeda-point/src/testing/tests.rs | 2 +- .../andromeda-shunting/.cargo/config | 0 .../andromeda-shunting/Cargo.toml | 2 +- .../andromeda-shunting/README.md | 0 .../andromeda-shunting}/examples/schema.rs | 2 +- .../andromeda-shunting/src/contract.rs | 4 +- .../andromeda-shunting/src/interface.rs | 2 +- .../andromeda-shunting/src/lib.rs | 0 .../andromeda-shunting/src/mock.rs | 2 +- .../andromeda-shunting/src/state.rs | 0 .../andromeda-shunting/src/testing/mod.rs | 0 .../andromeda-shunting/src/testing/tests.rs | 2 +- packages/andromeda-accounts/Cargo.toml | 22 +++++++++++ .../src/fixed_multisig.rs | 0 packages/andromeda-accounts/src/lib.rs | 1 + packages/andromeda-data-storage/src/lib.rs | 3 -- packages/andromeda-finance/src/lib.rs | 1 - packages/andromeda-math/Cargo.toml | 21 +++++++++++ .../src/counter.rs | 0 .../src/curve.rs | 0 .../src/date_time.rs | 0 .../src/graph.rs | 0 packages/andromeda-math/src/lib.rs | 6 +++ .../src/point.rs | 0 .../src/shunting.rs | 0 packages/andromeda-modules/src/lib.rs | 3 -- packages/deploy/Cargo.toml | 10 +++-- tests-integration/Cargo.toml | 16 ++++---- tests-integration/tests/kernel_orch.rs | 12 +++--- tests-integration/tests/shunting.rs | 2 +- 100 files changed, 193 insertions(+), 127 deletions(-) rename contracts/{data-storage/andromeda-counter => accounts/andromeda-fixed-multisig}/.cargo/config (100%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/Cargo.toml (95%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/examples/schema.rs (66%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/src/contract.rs (98%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/src/execute.rs (99%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/src/interface.rs (74%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/src/lib.rs (100%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/src/query.rs (100%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/src/state.rs (100%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/src/testing/mod.rs (100%) rename contracts/{finance => accounts}/andromeda-fixed-multisig/src/testing/tests.rs (99%) delete mode 100644 contracts/data-storage/andromeda-counter/examples/schema.rs delete mode 100644 contracts/data-storage/andromeda-point/examples/schema.rs rename contracts/{data-storage/andromeda-graph => math/andromeda-counter}/.cargo/config (100%) rename contracts/{data-storage => math}/andromeda-counter/Cargo.toml (94%) rename contracts/{modules/andromeda-shunting => math/andromeda-counter}/examples/schema.rs (68%) rename contracts/{data-storage => math}/andromeda-counter/src/contract.rs (98%) rename contracts/{data-storage => math}/andromeda-counter/src/interface.rs (72%) rename contracts/{data-storage => math}/andromeda-counter/src/lib.rs (100%) rename contracts/{data-storage => math}/andromeda-counter/src/mock.rs (97%) rename contracts/{data-storage => math}/andromeda-counter/src/state.rs (86%) rename contracts/{data-storage => math}/andromeda-counter/src/testing/mock.rs (96%) rename contracts/{data-storage => math}/andromeda-counter/src/testing/mod.rs (100%) rename contracts/{data-storage => math}/andromeda-counter/src/testing/tests.rs (99%) rename contracts/{data-storage/andromeda-point => math/andromeda-curve}/.cargo/config (100%) rename contracts/{modules => math}/andromeda-curve/Cargo.toml (95%) rename contracts/{modules/andromeda-date-time => math/andromeda-curve}/examples/schema.rs (68%) rename contracts/{modules => math}/andromeda-curve/src/contract.rs (99%) rename contracts/{modules => math}/andromeda-curve/src/interface.rs (73%) rename contracts/{modules => math}/andromeda-curve/src/lib.rs (100%) rename contracts/{modules => math}/andromeda-curve/src/mock.rs (99%) rename contracts/{modules => math}/andromeda-curve/src/state.rs (81%) rename contracts/{modules => math}/andromeda-curve/src/testing/mock.rs (98%) rename contracts/{data-storage/andromeda-point => math/andromeda-curve}/src/testing/mod.rs (100%) rename contracts/{modules => math}/andromeda-curve/src/testing/tests.rs (96%) rename contracts/{modules => math}/andromeda-date-time/.cargo/config (100%) rename contracts/{modules => math}/andromeda-date-time/Cargo.toml (95%) rename contracts/{data-storage/andromeda-graph => math/andromeda-date-time}/examples/schema.rs (68%) rename contracts/{modules => math}/andromeda-date-time/src/contract.rs (96%) rename contracts/{modules => math}/andromeda-date-time/src/interface.rs (73%) rename contracts/{modules => math}/andromeda-date-time/src/lib.rs (100%) rename contracts/{modules => math}/andromeda-date-time/src/mock.rs (92%) rename contracts/{modules => math}/andromeda-date-time/src/testing/mock.rs (89%) rename contracts/{modules/andromeda-curve => math/andromeda-date-time}/src/testing/mod.rs (100%) rename contracts/{modules => math}/andromeda-date-time/src/testing/tests.rs (97%) rename contracts/{finance/andromeda-fixed-multisig => math/andromeda-graph}/.cargo/config (100%) rename contracts/{data-storage => math}/andromeda-graph/Cargo.toml (95%) create mode 100644 contracts/math/andromeda-graph/examples/schema.rs rename contracts/{data-storage => math}/andromeda-graph/src/contract.rs (98%) rename contracts/{data-storage => math}/andromeda-graph/src/lib.rs (100%) rename contracts/{data-storage => math}/andromeda-graph/src/mock.rs (96%) rename contracts/{data-storage => math}/andromeda-graph/src/state.rs (75%) rename contracts/{data-storage => math}/andromeda-graph/src/testing/mock.rs (96%) rename contracts/{data-storage => math}/andromeda-graph/src/testing/mock_querier.rs (97%) rename contracts/{data-storage => math}/andromeda-graph/src/testing/mod.rs (100%) rename contracts/{data-storage => math}/andromeda-graph/src/testing/tests.rs (98%) rename contracts/{modules/andromeda-curve => math/andromeda-point}/.cargo/config (100%) rename contracts/{data-storage => math}/andromeda-point/Cargo.toml (95%) create mode 100644 contracts/math/andromeda-point/examples/schema.rs rename contracts/{data-storage => math}/andromeda-point/src/contract.rs (96%) rename contracts/{data-storage => math}/andromeda-point/src/execute.rs (98%) rename contracts/{data-storage => math}/andromeda-point/src/lib.rs (100%) rename contracts/{data-storage => math}/andromeda-point/src/mock.rs (98%) rename contracts/{data-storage => math}/andromeda-point/src/query.rs (91%) rename contracts/{data-storage => math}/andromeda-point/src/state.rs (77%) rename contracts/{data-storage => math}/andromeda-point/src/testing/mock.rs (98%) rename contracts/{modules/andromeda-date-time => math/andromeda-point}/src/testing/mod.rs (100%) rename contracts/{data-storage => math}/andromeda-point/src/testing/tests.rs (99%) rename contracts/{modules => math}/andromeda-shunting/.cargo/config (100%) rename contracts/{modules => math}/andromeda-shunting/Cargo.toml (95%) rename contracts/{modules => math}/andromeda-shunting/README.md (100%) rename contracts/{modules/andromeda-curve => math/andromeda-shunting}/examples/schema.rs (72%) rename contracts/{modules => math}/andromeda-shunting/src/contract.rs (98%) rename contracts/{modules => math}/andromeda-shunting/src/interface.rs (73%) rename contracts/{modules => math}/andromeda-shunting/src/lib.rs (100%) rename contracts/{modules => math}/andromeda-shunting/src/mock.rs (97%) rename contracts/{modules => math}/andromeda-shunting/src/state.rs (100%) rename contracts/{modules => math}/andromeda-shunting/src/testing/mod.rs (100%) rename contracts/{modules => math}/andromeda-shunting/src/testing/tests.rs (91%) create mode 100644 packages/andromeda-accounts/Cargo.toml rename packages/{andromeda-finance => andromeda-accounts}/src/fixed_multisig.rs (100%) create mode 100644 packages/andromeda-accounts/src/lib.rs create mode 100644 packages/andromeda-math/Cargo.toml rename packages/{andromeda-data-storage => andromeda-math}/src/counter.rs (100%) rename packages/{andromeda-modules => andromeda-math}/src/curve.rs (100%) rename packages/{andromeda-modules => andromeda-math}/src/date_time.rs (100%) rename packages/{andromeda-data-storage => andromeda-math}/src/graph.rs (100%) create mode 100644 packages/andromeda-math/src/lib.rs rename packages/{andromeda-data-storage => andromeda-math}/src/point.rs (100%) rename packages/{andromeda-modules => andromeda-math}/src/shunting.rs (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69bf5162a..ba2a70e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,11 +26,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added MultiSig ADO [(#619)](https://github.com/andromedaprotocol/andromeda-core/pull/619) - Added Validator Staking ADO [(#330)](https://github.com/andromedaprotocol/andromeda-core/pull/330) - Added Restake and Redelegate to Validator Staking [(#622)](https://github.com/andromedaprotocol/andromeda-core/pull/622) +- Added andromeda-math and andromeda-account packages[(#672)](https://github.com/andromedaprotocol/andromeda-core/pull/672) + ### Changed - Removed staking from vesting contract [(#554)](https://github.com/andromedaprotocol/andromeda-core/pull/554) - Vesting: Changed to use Milliseconds instead of seconds and removed unnecessary is_multi_batch_enabled flag [(#578)](https://github.com/andromedaprotocol/andromeda-core/pull/578) +- Splits up ADOs: moved Counter, Curve, Date-Time, Graph, Point, Shunting ADOs to math package and Fixed Multisig ADO to accounts package[(#672)](https://github.com/andromedaprotocol/andromeda-core/pull/672) ### Fixed diff --git a/Cargo.lock b/Cargo.lock index 48e0acd2f..d8df1822f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,6 +95,17 @@ dependencies = [ "libc", ] +[[package]] +name = "andromeda-accounts" +version = "1.0.0" +dependencies = [ + "andromeda-std", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", + "cw-utils 1.0.3", + "cw3 1.1.2", +] + [[package]] name = "andromeda-address-list" version = "2.0.3" @@ -207,7 +218,7 @@ dependencies = [ name = "andromeda-counter" version = "0.1.0-beta" dependencies = [ - "andromeda-data-storage", + "andromeda-math", "andromeda-std", "andromeda-testing", "cosmwasm-schema 1.5.8", @@ -216,7 +227,6 @@ dependencies = [ "cw-orch", "cw-storage-plus 1.2.0", "cw-utils 1.0.3", - "cw20 1.1.2", ] [[package]] @@ -260,7 +270,7 @@ name = "andromeda-curve" version = "0.1.1-beta" dependencies = [ "andromeda-app", - "andromeda-modules", + "andromeda-math", "andromeda-std", "andromeda-testing", "cosmwasm-schema 1.5.8", @@ -360,7 +370,7 @@ name = "andromeda-date-time" version = "0.1.0-beta" dependencies = [ "andromeda-app", - "andromeda-modules", + "andromeda-math", "andromeda-std", "andromeda-testing", "chrono 0.4.38", @@ -491,8 +501,8 @@ dependencies = [ name = "andromeda-fixed-multisig" version = "0.1.0-beta" dependencies = [ + "andromeda-accounts", "andromeda-app", - "andromeda-finance", "andromeda-std", "andromeda-testing", "cosmwasm-schema 1.5.8", @@ -528,7 +538,7 @@ dependencies = [ name = "andromeda-graph" version = "0.1.0-beta" dependencies = [ - "andromeda-data-storage", + "andromeda-math", "andromeda-std", "andromeda-testing", "cosmwasm-schema 1.5.8", @@ -644,6 +654,16 @@ dependencies = [ "cw721 0.18.0", ] +[[package]] +name = "andromeda-math" +version = "1.0.0" +dependencies = [ + "andromeda-std", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", + "cw-utils 1.0.3", +] + [[package]] name = "andromeda-merkle-airdrop" version = "2.0.2" @@ -698,7 +718,7 @@ dependencies = [ name = "andromeda-point" version = "0.1.0-beta" dependencies = [ - "andromeda-data-storage", + "andromeda-math", "andromeda-std", "andromeda-testing", "cosmwasm-schema 1.5.8", @@ -779,7 +799,7 @@ name = "andromeda-shunting" version = "0.2.3" dependencies = [ "andromeda-app", - "andromeda-modules", + "andromeda-math", "andromeda-std", "andromeda-testing", "cosmwasm-schema 1.5.8", @@ -5619,6 +5639,7 @@ dependencies = [ "andromeda-kernel", "andromeda-lockdrop", "andromeda-marketplace", + "andromeda-math", "andromeda-modules", "andromeda-non-fungible-tokens", "andromeda-primitive", diff --git a/Cargo.toml b/Cargo.toml index 891054ba5..fa8dfc986 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,8 @@ members = [ # "contracts/automation/*", "contracts/modules/*", "contracts/os/*", + "contracts/accounts/*", + "contracts/math/*", #Internal "tests-integration", @@ -40,6 +42,8 @@ andromeda-data-storage = { path = "./packages/andromeda-data-storage", version = andromeda-modules = { path = "./packages/andromeda-modules", version = "2.0.0" } andromeda-app = { path = "./packages/andromeda-app", version = "1.0.0" } andromeda-ecosystem = { path = "./packages/andromeda-ecosystem", version = "1.0.0" } +andromeda-accounts = { path = "./packages/andromeda-accounts", version = "1.0.0" } +andromeda-math = { path = "./packages/andromeda-math", version = "1.0.0" } andromeda-testing = { path = "./packages/andromeda-testing", version = "1.0.0" } andromeda-testing-e2e = { path = "./packages/andromeda-testing-e2e", version = "1.0.0" } diff --git a/contracts/data-storage/andromeda-counter/.cargo/config b/contracts/accounts/andromeda-fixed-multisig/.cargo/config similarity index 100% rename from contracts/data-storage/andromeda-counter/.cargo/config rename to contracts/accounts/andromeda-fixed-multisig/.cargo/config diff --git a/contracts/finance/andromeda-fixed-multisig/Cargo.toml b/contracts/accounts/andromeda-fixed-multisig/Cargo.toml similarity index 95% rename from contracts/finance/andromeda-fixed-multisig/Cargo.toml rename to contracts/accounts/andromeda-fixed-multisig/Cargo.toml index b0fbbb103..aeb6da7d8 100644 --- a/contracts/finance/andromeda-fixed-multisig/Cargo.toml +++ b/contracts/accounts/andromeda-fixed-multisig/Cargo.toml @@ -26,7 +26,7 @@ cw4 = { workspace = true } cw3-fixed-multisig = { git = "https://github.com/CosmWasm/cw-plus" } andromeda-std = { workspace = true } -andromeda-finance = { workspace = true } +andromeda-accounts = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] cw-orch = { workspace = true } diff --git a/contracts/finance/andromeda-fixed-multisig/examples/schema.rs b/contracts/accounts/andromeda-fixed-multisig/examples/schema.rs similarity index 66% rename from contracts/finance/andromeda-fixed-multisig/examples/schema.rs rename to contracts/accounts/andromeda-fixed-multisig/examples/schema.rs index 010956b33..96c306044 100644 --- a/contracts/finance/andromeda-fixed-multisig/examples/schema.rs +++ b/contracts/accounts/andromeda-fixed-multisig/examples/schema.rs @@ -1,4 +1,4 @@ -use andromeda_finance::fixed_multisig::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_accounts::fixed_multisig::{ExecuteMsg, InstantiateMsg, QueryMsg}; use cosmwasm_schema::write_api; fn main() { diff --git a/contracts/finance/andromeda-fixed-multisig/src/contract.rs b/contracts/accounts/andromeda-fixed-multisig/src/contract.rs similarity index 98% rename from contracts/finance/andromeda-fixed-multisig/src/contract.rs rename to contracts/accounts/andromeda-fixed-multisig/src/contract.rs index 5be837a11..0c02b1475 100644 --- a/contracts/finance/andromeda-fixed-multisig/src/contract.rs +++ b/contracts/accounts/andromeda-fixed-multisig/src/contract.rs @@ -2,7 +2,7 @@ use cosmwasm_std::entry_point; use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError}; -use andromeda_finance::fixed_multisig::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_accounts::fixed_multisig::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::{ ado_base::{InstantiateMsg as BaseInstantiateMsg, MigrateMsg}, ado_contract::ADOContract, diff --git a/contracts/finance/andromeda-fixed-multisig/src/execute.rs b/contracts/accounts/andromeda-fixed-multisig/src/execute.rs similarity index 99% rename from contracts/finance/andromeda-fixed-multisig/src/execute.rs rename to contracts/accounts/andromeda-fixed-multisig/src/execute.rs index 3d4fcdf08..966768beb 100644 --- a/contracts/finance/andromeda-fixed-multisig/src/execute.rs +++ b/contracts/accounts/andromeda-fixed-multisig/src/execute.rs @@ -1,4 +1,4 @@ -use andromeda_finance::fixed_multisig::ExecuteMsg; +use andromeda_accounts::fixed_multisig::ExecuteMsg; use andromeda_std::{ ado_contract::ADOContract, common::{actions::call_action, context::ExecuteContext}, diff --git a/contracts/finance/andromeda-fixed-multisig/src/interface.rs b/contracts/accounts/andromeda-fixed-multisig/src/interface.rs similarity index 74% rename from contracts/finance/andromeda-fixed-multisig/src/interface.rs rename to contracts/accounts/andromeda-fixed-multisig/src/interface.rs index 3567580b1..70678352d 100644 --- a/contracts/finance/andromeda-fixed-multisig/src/interface.rs +++ b/contracts/accounts/andromeda-fixed-multisig/src/interface.rs @@ -1,4 +1,4 @@ -use andromeda_finance::fixed_multisig::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_accounts::fixed_multisig::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata}; pub const CONTRACT_ID: &str = "fixed-multisig"; diff --git a/contracts/finance/andromeda-fixed-multisig/src/lib.rs b/contracts/accounts/andromeda-fixed-multisig/src/lib.rs similarity index 100% rename from contracts/finance/andromeda-fixed-multisig/src/lib.rs rename to contracts/accounts/andromeda-fixed-multisig/src/lib.rs diff --git a/contracts/finance/andromeda-fixed-multisig/src/query.rs b/contracts/accounts/andromeda-fixed-multisig/src/query.rs similarity index 100% rename from contracts/finance/andromeda-fixed-multisig/src/query.rs rename to contracts/accounts/andromeda-fixed-multisig/src/query.rs diff --git a/contracts/finance/andromeda-fixed-multisig/src/state.rs b/contracts/accounts/andromeda-fixed-multisig/src/state.rs similarity index 100% rename from contracts/finance/andromeda-fixed-multisig/src/state.rs rename to contracts/accounts/andromeda-fixed-multisig/src/state.rs diff --git a/contracts/finance/andromeda-fixed-multisig/src/testing/mod.rs b/contracts/accounts/andromeda-fixed-multisig/src/testing/mod.rs similarity index 100% rename from contracts/finance/andromeda-fixed-multisig/src/testing/mod.rs rename to contracts/accounts/andromeda-fixed-multisig/src/testing/mod.rs diff --git a/contracts/finance/andromeda-fixed-multisig/src/testing/tests.rs b/contracts/accounts/andromeda-fixed-multisig/src/testing/tests.rs similarity index 99% rename from contracts/finance/andromeda-fixed-multisig/src/testing/tests.rs rename to contracts/accounts/andromeda-fixed-multisig/src/testing/tests.rs index 18e387185..7277ef656 100644 --- a/contracts/finance/andromeda-fixed-multisig/src/testing/tests.rs +++ b/contracts/accounts/andromeda-fixed-multisig/src/testing/tests.rs @@ -7,8 +7,8 @@ use cw2::{get_contract_version, ContractVersion}; use cw3::{ProposalResponse, Status, Vote, VoteListResponse}; use cw_utils::{Duration, Expiration, Threshold}; -use andromeda_finance::fixed_multisig::Voter; -use andromeda_finance::fixed_multisig::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_accounts::fixed_multisig::Voter; +use andromeda_accounts::fixed_multisig::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::{ amp::AndrAddr, error::ContractError, diff --git a/contracts/data-storage/andromeda-counter/examples/schema.rs b/contracts/data-storage/andromeda-counter/examples/schema.rs deleted file mode 100644 index 1248c18e9..000000000 --- a/contracts/data-storage/andromeda-counter/examples/schema.rs +++ /dev/null @@ -1,10 +0,0 @@ -use andromeda_data_storage::counter::{ExecuteMsg, InstantiateMsg, QueryMsg}; -use cosmwasm_schema::write_api; -fn main() { - write_api! { - instantiate: InstantiateMsg, - query: QueryMsg, - execute: ExecuteMsg, - - } -} diff --git a/contracts/data-storage/andromeda-point/examples/schema.rs b/contracts/data-storage/andromeda-point/examples/schema.rs deleted file mode 100644 index bb2a97e88..000000000 --- a/contracts/data-storage/andromeda-point/examples/schema.rs +++ /dev/null @@ -1,10 +0,0 @@ -use andromeda_data_storage::point::{ExecuteMsg, InstantiateMsg, QueryMsg}; -use cosmwasm_schema::write_api; -fn main() { - write_api! { - instantiate: InstantiateMsg, - query: QueryMsg, - execute: ExecuteMsg, - - } -} diff --git a/contracts/data-storage/andromeda-graph/.cargo/config b/contracts/math/andromeda-counter/.cargo/config similarity index 100% rename from contracts/data-storage/andromeda-graph/.cargo/config rename to contracts/math/andromeda-counter/.cargo/config diff --git a/contracts/data-storage/andromeda-counter/Cargo.toml b/contracts/math/andromeda-counter/Cargo.toml similarity index 94% rename from contracts/data-storage/andromeda-counter/Cargo.toml rename to contracts/math/andromeda-counter/Cargo.toml index b61d99b2c..e2f1740e4 100644 --- a/contracts/data-storage/andromeda-counter/Cargo.toml +++ b/contracts/math/andromeda-counter/Cargo.toml @@ -28,10 +28,9 @@ cosmwasm-std = { workspace = true } cosmwasm-schema = { workspace = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } -cw20 = { workspace = true } andromeda-std = { workspace = true, features = ["rates"] } -andromeda-data-storage = { workspace = true } +andromeda-math = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] diff --git a/contracts/modules/andromeda-shunting/examples/schema.rs b/contracts/math/andromeda-counter/examples/schema.rs similarity index 68% rename from contracts/modules/andromeda-shunting/examples/schema.rs rename to contracts/math/andromeda-counter/examples/schema.rs index 922291419..a4171e2bf 100644 --- a/contracts/modules/andromeda-shunting/examples/schema.rs +++ b/contracts/math/andromeda-counter/examples/schema.rs @@ -1,4 +1,4 @@ -use andromeda_modules::shunting::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::counter::{ExecuteMsg, InstantiateMsg, QueryMsg}; use cosmwasm_schema::write_api; fn main() { write_api! { diff --git a/contracts/data-storage/andromeda-counter/src/contract.rs b/contracts/math/andromeda-counter/src/contract.rs similarity index 98% rename from contracts/data-storage/andromeda-counter/src/contract.rs rename to contracts/math/andromeda-counter/src/contract.rs index 089333c07..62be026d0 100644 --- a/contracts/data-storage/andromeda-counter/src/contract.rs +++ b/contracts/math/andromeda-counter/src/contract.rs @@ -4,8 +4,8 @@ use cosmwasm_std::{ attr, ensure, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError, Storage, }; -use andromeda_data_storage::counter::{CounterRestriction, ExecuteMsg, InstantiateMsg, QueryMsg}; -use andromeda_data_storage::counter::{ +use andromeda_math::counter::{CounterRestriction, ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::counter::{ GetCurrentAmountResponse, GetDecreaseAmountResponse, GetIncreaseAmountResponse, GetInitialAmountResponse, GetRestrictionResponse, }; diff --git a/contracts/data-storage/andromeda-counter/src/interface.rs b/contracts/math/andromeda-counter/src/interface.rs similarity index 72% rename from contracts/data-storage/andromeda-counter/src/interface.rs rename to contracts/math/andromeda-counter/src/interface.rs index d14fef10a..6c46b6a83 100644 --- a/contracts/data-storage/andromeda-counter/src/interface.rs +++ b/contracts/math/andromeda-counter/src/interface.rs @@ -1,4 +1,4 @@ -use andromeda_data_storage::counter::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::counter::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata}; pub const CONTRACT_ID: &str = "counter"; diff --git a/contracts/data-storage/andromeda-counter/src/lib.rs b/contracts/math/andromeda-counter/src/lib.rs similarity index 100% rename from contracts/data-storage/andromeda-counter/src/lib.rs rename to contracts/math/andromeda-counter/src/lib.rs diff --git a/contracts/data-storage/andromeda-counter/src/mock.rs b/contracts/math/andromeda-counter/src/mock.rs similarity index 97% rename from contracts/data-storage/andromeda-counter/src/mock.rs rename to contracts/math/andromeda-counter/src/mock.rs index 26233492d..a12187a8d 100644 --- a/contracts/data-storage/andromeda-counter/src/mock.rs +++ b/contracts/math/andromeda-counter/src/mock.rs @@ -1,9 +1,7 @@ #![cfg(all(not(target_arch = "wasm32"), feature = "testing"))] use crate::contract::{execute, instantiate, query}; -use andromeda_data_storage::counter::{ - CounterRestriction, ExecuteMsg, InstantiateMsg, QueryMsg, State, -}; -use andromeda_data_storage::counter::{ +use andromeda_math::counter::{CounterRestriction, ExecuteMsg, InstantiateMsg, QueryMsg, State}; +use andromeda_math::counter::{ GetCurrentAmountResponse, GetDecreaseAmountResponse, GetIncreaseAmountResponse, GetInitialAmountResponse, GetRestrictionResponse, }; diff --git a/contracts/data-storage/andromeda-counter/src/state.rs b/contracts/math/andromeda-counter/src/state.rs similarity index 86% rename from contracts/data-storage/andromeda-counter/src/state.rs rename to contracts/math/andromeda-counter/src/state.rs index 911284656..db8464b47 100644 --- a/contracts/data-storage/andromeda-counter/src/state.rs +++ b/contracts/math/andromeda-counter/src/state.rs @@ -1,4 +1,4 @@ -use andromeda_data_storage::counter::CounterRestriction; +use andromeda_math::counter::CounterRestriction; use cw_storage_plus::Item; pub const INITIAL_AMOUNT: Item = Item::new("initial_amount"); diff --git a/contracts/data-storage/andromeda-counter/src/testing/mock.rs b/contracts/math/andromeda-counter/src/testing/mock.rs similarity index 96% rename from contracts/data-storage/andromeda-counter/src/testing/mock.rs rename to contracts/math/andromeda-counter/src/testing/mock.rs index 7f32bfd45..2a6a37d32 100644 --- a/contracts/data-storage/andromeda-counter/src/testing/mock.rs +++ b/contracts/math/andromeda-counter/src/testing/mock.rs @@ -1,5 +1,5 @@ -use andromeda_data_storage::counter::{CounterRestriction, ExecuteMsg, InstantiateMsg, QueryMsg}; -use andromeda_data_storage::counter::{ +use andromeda_math::counter::{CounterRestriction, ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::counter::{ GetCurrentAmountResponse, GetDecreaseAmountResponse, GetIncreaseAmountResponse, GetInitialAmountResponse, GetRestrictionResponse, State, }; diff --git a/contracts/data-storage/andromeda-counter/src/testing/mod.rs b/contracts/math/andromeda-counter/src/testing/mod.rs similarity index 100% rename from contracts/data-storage/andromeda-counter/src/testing/mod.rs rename to contracts/math/andromeda-counter/src/testing/mod.rs diff --git a/contracts/data-storage/andromeda-counter/src/testing/tests.rs b/contracts/math/andromeda-counter/src/testing/tests.rs similarity index 99% rename from contracts/data-storage/andromeda-counter/src/testing/tests.rs rename to contracts/math/andromeda-counter/src/testing/tests.rs index bfe612f0c..957fb4992 100644 --- a/contracts/data-storage/andromeda-counter/src/testing/tests.rs +++ b/contracts/math/andromeda-counter/src/testing/tests.rs @@ -3,7 +3,7 @@ use super::mock::{ query_increase_amount, query_initial_amount, query_restriction, reset, set_decrease_amount, set_increase_amount, update_restriction, }; -use andromeda_data_storage::counter::{CounterRestriction, State}; +use andromeda_math::counter::{CounterRestriction, State}; use andromeda_std::error::ContractError; use cosmwasm_std::Attribute; diff --git a/contracts/data-storage/andromeda-point/.cargo/config b/contracts/math/andromeda-curve/.cargo/config similarity index 100% rename from contracts/data-storage/andromeda-point/.cargo/config rename to contracts/math/andromeda-curve/.cargo/config diff --git a/contracts/modules/andromeda-curve/Cargo.toml b/contracts/math/andromeda-curve/Cargo.toml similarity index 95% rename from contracts/modules/andromeda-curve/Cargo.toml rename to contracts/math/andromeda-curve/Cargo.toml index 557edcf04..5c7f608a3 100644 --- a/contracts/modules/andromeda-curve/Cargo.toml +++ b/contracts/math/andromeda-curve/Cargo.toml @@ -23,7 +23,7 @@ cw-utils = { workspace = true } test-case = { workspace = true } andromeda-std = { workspace = true, features = [] } -andromeda-modules = { workspace = true } +andromeda-math = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] cw-multi-test = { workspace = true, optional = true } diff --git a/contracts/modules/andromeda-date-time/examples/schema.rs b/contracts/math/andromeda-curve/examples/schema.rs similarity index 68% rename from contracts/modules/andromeda-date-time/examples/schema.rs rename to contracts/math/andromeda-curve/examples/schema.rs index ce974bc45..5b5aa0600 100644 --- a/contracts/modules/andromeda-date-time/examples/schema.rs +++ b/contracts/math/andromeda-curve/examples/schema.rs @@ -1,4 +1,4 @@ -use andromeda_modules::date_time::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::curve::{ExecuteMsg, InstantiateMsg, QueryMsg}; use cosmwasm_schema::write_api; fn main() { write_api! { diff --git a/contracts/modules/andromeda-curve/src/contract.rs b/contracts/math/andromeda-curve/src/contract.rs similarity index 99% rename from contracts/modules/andromeda-curve/src/contract.rs rename to contracts/math/andromeda-curve/src/contract.rs index 40cca5ec5..74db8c569 100644 --- a/contracts/modules/andromeda-curve/src/contract.rs +++ b/contracts/math/andromeda-curve/src/contract.rs @@ -1,6 +1,6 @@ #[cfg(not(feature = "library"))] use crate::state::{CURVE_CONFIG, DEFAULT_CONSTANT_VALUE, DEFAULT_MULTIPLE_VARIABLE_VALUE}; -use andromeda_modules::curve::{ +use andromeda_math::curve::{ CurveConfig, CurveType, ExecuteMsg, GetCurveConfigResponse, GetPlotYFromXResponse, InstantiateMsg, QueryMsg, }; diff --git a/contracts/modules/andromeda-curve/src/interface.rs b/contracts/math/andromeda-curve/src/interface.rs similarity index 73% rename from contracts/modules/andromeda-curve/src/interface.rs rename to contracts/math/andromeda-curve/src/interface.rs index 74d221cae..be355c660 100644 --- a/contracts/modules/andromeda-curve/src/interface.rs +++ b/contracts/math/andromeda-curve/src/interface.rs @@ -1,4 +1,4 @@ -use andromeda_modules::curve::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::curve::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata}; pub const CONTRACT_ID: &str = "curve"; diff --git a/contracts/modules/andromeda-curve/src/lib.rs b/contracts/math/andromeda-curve/src/lib.rs similarity index 100% rename from contracts/modules/andromeda-curve/src/lib.rs rename to contracts/math/andromeda-curve/src/lib.rs diff --git a/contracts/modules/andromeda-curve/src/mock.rs b/contracts/math/andromeda-curve/src/mock.rs similarity index 99% rename from contracts/modules/andromeda-curve/src/mock.rs rename to contracts/math/andromeda-curve/src/mock.rs index ee64c212a..059d32c91 100644 --- a/contracts/modules/andromeda-curve/src/mock.rs +++ b/contracts/math/andromeda-curve/src/mock.rs @@ -1,6 +1,6 @@ #![cfg(all(not(target_arch = "wasm32"), feature = "testing"))] use crate::contract::{execute, instantiate, query}; -use andromeda_modules::curve::{ +use andromeda_math::curve::{ CurveConfig, ExecuteMsg, GetCurveConfigResponse, GetPlotYFromXResponse, InstantiateMsg, QueryMsg, }; diff --git a/contracts/modules/andromeda-curve/src/state.rs b/contracts/math/andromeda-curve/src/state.rs similarity index 81% rename from contracts/modules/andromeda-curve/src/state.rs rename to contracts/math/andromeda-curve/src/state.rs index 0e0ef0c78..0f22a55e7 100644 --- a/contracts/modules/andromeda-curve/src/state.rs +++ b/contracts/math/andromeda-curve/src/state.rs @@ -1,4 +1,4 @@ -use andromeda_modules::curve::CurveConfig; +use andromeda_math::curve::CurveConfig; use cw_storage_plus::Item; pub const CURVE_CONFIG: Item = Item::new("curve_config"); diff --git a/contracts/modules/andromeda-curve/src/testing/mock.rs b/contracts/math/andromeda-curve/src/testing/mock.rs similarity index 98% rename from contracts/modules/andromeda-curve/src/testing/mock.rs rename to contracts/math/andromeda-curve/src/testing/mock.rs index 18be90a65..6f00dd32d 100644 --- a/contracts/modules/andromeda-curve/src/testing/mock.rs +++ b/contracts/math/andromeda-curve/src/testing/mock.rs @@ -1,4 +1,4 @@ -use andromeda_modules::curve::{ +use andromeda_math::curve::{ CurveConfig, ExecuteMsg, GetCurveConfigResponse, GetPlotYFromXResponse, InstantiateMsg, QueryMsg, }; diff --git a/contracts/data-storage/andromeda-point/src/testing/mod.rs b/contracts/math/andromeda-curve/src/testing/mod.rs similarity index 100% rename from contracts/data-storage/andromeda-point/src/testing/mod.rs rename to contracts/math/andromeda-curve/src/testing/mod.rs diff --git a/contracts/modules/andromeda-curve/src/testing/tests.rs b/contracts/math/andromeda-curve/src/testing/tests.rs similarity index 96% rename from contracts/modules/andromeda-curve/src/testing/tests.rs rename to contracts/math/andromeda-curve/src/testing/tests.rs index 254655e0e..b3933dd8a 100644 --- a/contracts/modules/andromeda-curve/src/testing/tests.rs +++ b/contracts/math/andromeda-curve/src/testing/tests.rs @@ -2,7 +2,7 @@ use super::mock::{ error_initialization, proper_initialization, query_curve_config, query_plot_y_from_x, reset, update_curve_config, }; -use andromeda_modules::curve::{CurveConfig, CurveType}; +use andromeda_math::curve::{CurveConfig, CurveType}; use andromeda_std::{amp::AndrAddr, error::ContractError}; use cosmwasm_std::StdError; use test_case::test_case; @@ -38,7 +38,7 @@ fn test_reset() { reset(deps.as_mut(), "user1").unwrap(); let err_res = query_curve_config(deps.as_ref()).unwrap_err(); - assert_eq!(err_res, ContractError::Std(StdError::NotFound { kind: "type: andromeda_modules::curve::CurveConfig; key: [63, 75, 72, 76, 65, 5F, 63, 6F, 6E, 66, 69, 67]".to_string() })); + assert_eq!(err_res, ContractError::Std(StdError::NotFound { kind: "type: andromeda_math::curve::CurveConfig; key: [63, 75, 72, 76, 65, 5F, 63, 6F, 6E, 66, 69, 67]".to_string() })); } #[test] diff --git a/contracts/modules/andromeda-date-time/.cargo/config b/contracts/math/andromeda-date-time/.cargo/config similarity index 100% rename from contracts/modules/andromeda-date-time/.cargo/config rename to contracts/math/andromeda-date-time/.cargo/config diff --git a/contracts/modules/andromeda-date-time/Cargo.toml b/contracts/math/andromeda-date-time/Cargo.toml similarity index 95% rename from contracts/modules/andromeda-date-time/Cargo.toml rename to contracts/math/andromeda-date-time/Cargo.toml index ef07c992d..56d5f5631 100644 --- a/contracts/modules/andromeda-date-time/Cargo.toml +++ b/contracts/math/andromeda-date-time/Cargo.toml @@ -22,7 +22,7 @@ cw-storage-plus = { workspace = true } cw-utils = { workspace = true } andromeda-std = { workspace = true } -andromeda-modules = { workspace = true } +andromeda-math = { workspace = true } chrono = "0.4.38" diff --git a/contracts/data-storage/andromeda-graph/examples/schema.rs b/contracts/math/andromeda-date-time/examples/schema.rs similarity index 68% rename from contracts/data-storage/andromeda-graph/examples/schema.rs rename to contracts/math/andromeda-date-time/examples/schema.rs index 71e016e9b..807a453c1 100644 --- a/contracts/data-storage/andromeda-graph/examples/schema.rs +++ b/contracts/math/andromeda-date-time/examples/schema.rs @@ -1,4 +1,4 @@ -use andromeda_data_storage::graph::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::date_time::{ExecuteMsg, InstantiateMsg, QueryMsg}; use cosmwasm_schema::write_api; fn main() { write_api! { diff --git a/contracts/modules/andromeda-date-time/src/contract.rs b/contracts/math/andromeda-date-time/src/contract.rs similarity index 96% rename from contracts/modules/andromeda-date-time/src/contract.rs rename to contracts/math/andromeda-date-time/src/contract.rs index f94b9518c..24887c784 100644 --- a/contracts/modules/andromeda-date-time/src/contract.rs +++ b/contracts/math/andromeda-date-time/src/contract.rs @@ -2,8 +2,8 @@ use cosmwasm_std::entry_point; use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError}; -use andromeda_modules::date_time::GetDateTimeResponse; -use andromeda_modules::date_time::{ExecuteMsg, InstantiateMsg, QueryMsg, Timezone}; +use andromeda_math::date_time::GetDateTimeResponse; +use andromeda_math::date_time::{ExecuteMsg, InstantiateMsg, QueryMsg, Timezone}; use andromeda_std::{ ado_base::{InstantiateMsg as BaseInstantiateMsg, MigrateMsg}, ado_contract::ADOContract, diff --git a/contracts/modules/andromeda-date-time/src/interface.rs b/contracts/math/andromeda-date-time/src/interface.rs similarity index 73% rename from contracts/modules/andromeda-date-time/src/interface.rs rename to contracts/math/andromeda-date-time/src/interface.rs index f86708b21..6001928eb 100644 --- a/contracts/modules/andromeda-date-time/src/interface.rs +++ b/contracts/math/andromeda-date-time/src/interface.rs @@ -1,4 +1,4 @@ -use andromeda_modules::date_time::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::date_time::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata}; pub const CONTRACT_ID: &str = "date-time"; diff --git a/contracts/modules/andromeda-date-time/src/lib.rs b/contracts/math/andromeda-date-time/src/lib.rs similarity index 100% rename from contracts/modules/andromeda-date-time/src/lib.rs rename to contracts/math/andromeda-date-time/src/lib.rs diff --git a/contracts/modules/andromeda-date-time/src/mock.rs b/contracts/math/andromeda-date-time/src/mock.rs similarity index 92% rename from contracts/modules/andromeda-date-time/src/mock.rs rename to contracts/math/andromeda-date-time/src/mock.rs index 46b6b2419..7ebee6dde 100644 --- a/contracts/modules/andromeda-date-time/src/mock.rs +++ b/contracts/math/andromeda-date-time/src/mock.rs @@ -1,7 +1,7 @@ #![cfg(all(not(target_arch = "wasm32"), feature = "testing"))] use crate::contract::{execute, instantiate, query}; -use andromeda_modules::date_time::GetDateTimeResponse; -use andromeda_modules::date_time::{InstantiateMsg, QueryMsg, Timezone}; +use andromeda_math::date_time::GetDateTimeResponse; +use andromeda_math::date_time::{InstantiateMsg, QueryMsg, Timezone}; use andromeda_testing::mock::MockApp; use andromeda_testing::{ mock_ado, diff --git a/contracts/modules/andromeda-date-time/src/testing/mock.rs b/contracts/math/andromeda-date-time/src/testing/mock.rs similarity index 89% rename from contracts/modules/andromeda-date-time/src/testing/mock.rs rename to contracts/math/andromeda-date-time/src/testing/mock.rs index f51556bb0..fac2a7fa0 100644 --- a/contracts/modules/andromeda-date-time/src/testing/mock.rs +++ b/contracts/math/andromeda-date-time/src/testing/mock.rs @@ -1,5 +1,5 @@ -use andromeda_modules::date_time::{GetDateTimeResponse, Timezone}; -use andromeda_modules::date_time::{InstantiateMsg, QueryMsg}; +use andromeda_math::date_time::{GetDateTimeResponse, Timezone}; +use andromeda_math::date_time::{InstantiateMsg, QueryMsg}; use andromeda_std::{ error::ContractError, testing::mock_querier::{mock_dependencies_custom, WasmMockQuerier, MOCK_KERNEL_CONTRACT}, diff --git a/contracts/modules/andromeda-curve/src/testing/mod.rs b/contracts/math/andromeda-date-time/src/testing/mod.rs similarity index 100% rename from contracts/modules/andromeda-curve/src/testing/mod.rs rename to contracts/math/andromeda-date-time/src/testing/mod.rs diff --git a/contracts/modules/andromeda-date-time/src/testing/tests.rs b/contracts/math/andromeda-date-time/src/testing/tests.rs similarity index 97% rename from contracts/modules/andromeda-date-time/src/testing/tests.rs rename to contracts/math/andromeda-date-time/src/testing/tests.rs index 5fab309e7..a7913039c 100644 --- a/contracts/modules/andromeda-date-time/src/testing/tests.rs +++ b/contracts/math/andromeda-date-time/src/testing/tests.rs @@ -1,5 +1,5 @@ use super::mock::{proper_initialization, query_date_time}; -use andromeda_modules::date_time::{GetDateTimeResponse, Timezone}; +use andromeda_math::date_time::{GetDateTimeResponse, Timezone}; #[test] fn test_instantiation() { diff --git a/contracts/finance/andromeda-fixed-multisig/.cargo/config b/contracts/math/andromeda-graph/.cargo/config similarity index 100% rename from contracts/finance/andromeda-fixed-multisig/.cargo/config rename to contracts/math/andromeda-graph/.cargo/config diff --git a/contracts/data-storage/andromeda-graph/Cargo.toml b/contracts/math/andromeda-graph/Cargo.toml similarity index 95% rename from contracts/data-storage/andromeda-graph/Cargo.toml rename to contracts/math/andromeda-graph/Cargo.toml index 7104977fb..1ce4c3aa4 100644 --- a/contracts/data-storage/andromeda-graph/Cargo.toml +++ b/contracts/math/andromeda-graph/Cargo.toml @@ -30,7 +30,7 @@ cw-utils = { workspace = true } cw20 = { workspace = true } andromeda-std = { workspace = true } -andromeda-data-storage = { workspace = true } +andromeda-math = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] cw-multi-test = { workspace = true, optional = true } diff --git a/contracts/math/andromeda-graph/examples/schema.rs b/contracts/math/andromeda-graph/examples/schema.rs new file mode 100644 index 000000000..f267b1b6b --- /dev/null +++ b/contracts/math/andromeda-graph/examples/schema.rs @@ -0,0 +1,10 @@ +use andromeda_math::graph::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use cosmwasm_schema::write_api; +fn main() { + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + + } +} diff --git a/contracts/data-storage/andromeda-graph/src/contract.rs b/contracts/math/andromeda-graph/src/contract.rs similarity index 98% rename from contracts/data-storage/andromeda-graph/src/contract.rs rename to contracts/math/andromeda-graph/src/contract.rs index 03b1009f6..a36c12b14 100644 --- a/contracts/data-storage/andromeda-graph/src/contract.rs +++ b/contracts/math/andromeda-graph/src/contract.rs @@ -2,13 +2,11 @@ use cosmwasm_std::entry_point; use cosmwasm_std::{attr, ensure, Binary, Deps, DepsMut, Env, MessageInfo, Response, Storage}; -use andromeda_data_storage::graph::{ +use andromeda_math::graph::{ Coordinate, CoordinateInfo, ExecuteMsg, GetAllPointsResponse, GetMapInfoResponse, GetMaxPointNumberResponse, InstantiateMsg, MapInfo, QueryMsg, StoredDate, }; -use andromeda_data_storage::point::{ - GetDataOwnerResponse, PointCoordinate, QueryMsg as PointQueryMsg, -}; +use andromeda_math::point::{GetDataOwnerResponse, PointCoordinate, QueryMsg as PointQueryMsg}; use andromeda_std::{ ado_base::{InstantiateMsg as BaseInstantiateMsg, MigrateMsg}, ado_contract::ADOContract, diff --git a/contracts/data-storage/andromeda-graph/src/lib.rs b/contracts/math/andromeda-graph/src/lib.rs similarity index 100% rename from contracts/data-storage/andromeda-graph/src/lib.rs rename to contracts/math/andromeda-graph/src/lib.rs diff --git a/contracts/data-storage/andromeda-graph/src/mock.rs b/contracts/math/andromeda-graph/src/mock.rs similarity index 96% rename from contracts/data-storage/andromeda-graph/src/mock.rs rename to contracts/math/andromeda-graph/src/mock.rs index 066bfb676..03cfc2e34 100644 --- a/contracts/data-storage/andromeda-graph/src/mock.rs +++ b/contracts/math/andromeda-graph/src/mock.rs @@ -1,10 +1,10 @@ #![cfg(all(not(target_arch = "wasm32"), feature = "testing"))] use crate::contract::{execute, instantiate, query}; -use andromeda_data_storage::graph::CoordinateInfo; -use andromeda_data_storage::graph::{ +use andromeda_math::graph::CoordinateInfo; +use andromeda_math::graph::{ Coordinate, GetAllPointsResponse, GetMapInfoResponse, GetMaxPointNumberResponse, MapInfo, }; -use andromeda_data_storage::graph::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::graph::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::amp::AndrAddr; use andromeda_std::error::ContractError; use andromeda_testing::mock::MockApp; diff --git a/contracts/data-storage/andromeda-graph/src/state.rs b/contracts/math/andromeda-graph/src/state.rs similarity index 75% rename from contracts/data-storage/andromeda-graph/src/state.rs rename to contracts/math/andromeda-graph/src/state.rs index 4476a643a..96d9bc0a3 100644 --- a/contracts/data-storage/andromeda-graph/src/state.rs +++ b/contracts/math/andromeda-graph/src/state.rs @@ -1,5 +1,5 @@ -use andromeda_data_storage::graph::{CoordinateInfo, MapInfo, StoredDate}; -use andromeda_data_storage::point::PointCoordinate; +use andromeda_math::graph::{CoordinateInfo, MapInfo, StoredDate}; +use andromeda_math::point::PointCoordinate; use cosmwasm_std::Addr; use cw_storage_plus::{Item, Map}; diff --git a/contracts/data-storage/andromeda-graph/src/testing/mock.rs b/contracts/math/andromeda-graph/src/testing/mock.rs similarity index 96% rename from contracts/data-storage/andromeda-graph/src/testing/mock.rs rename to contracts/math/andromeda-graph/src/testing/mock.rs index 294081647..e84208c4d 100644 --- a/contracts/data-storage/andromeda-graph/src/testing/mock.rs +++ b/contracts/math/andromeda-graph/src/testing/mock.rs @@ -1,5 +1,5 @@ -use andromeda_data_storage::graph::{Coordinate, GetMapInfoResponse, MapInfo}; -use andromeda_data_storage::graph::{ +use andromeda_math::graph::{Coordinate, GetMapInfoResponse, MapInfo}; +use andromeda_math::graph::{ CoordinateInfo, ExecuteMsg, GetAllPointsResponse, GetMaxPointNumberResponse, InstantiateMsg, QueryMsg, }; diff --git a/contracts/data-storage/andromeda-graph/src/testing/mock_querier.rs b/contracts/math/andromeda-graph/src/testing/mock_querier.rs similarity index 97% rename from contracts/data-storage/andromeda-graph/src/testing/mock_querier.rs rename to contracts/math/andromeda-graph/src/testing/mock_querier.rs index 81515454b..b95bfb106 100644 --- a/contracts/data-storage/andromeda-graph/src/testing/mock_querier.rs +++ b/contracts/math/andromeda-graph/src/testing/mock_querier.rs @@ -1,6 +1,4 @@ -use andromeda_data_storage::point::{ - GetDataOwnerResponse, PointCoordinate, QueryMsg as PointQueryMsg, -}; +use andromeda_math::point::{GetDataOwnerResponse, PointCoordinate, QueryMsg as PointQueryMsg}; use andromeda_std::amp::AndrAddr; use andromeda_std::testing::mock_querier::MockAndromedaQuerier; use andromeda_std::{ diff --git a/contracts/data-storage/andromeda-graph/src/testing/mod.rs b/contracts/math/andromeda-graph/src/testing/mod.rs similarity index 100% rename from contracts/data-storage/andromeda-graph/src/testing/mod.rs rename to contracts/math/andromeda-graph/src/testing/mod.rs diff --git a/contracts/data-storage/andromeda-graph/src/testing/tests.rs b/contracts/math/andromeda-graph/src/testing/tests.rs similarity index 98% rename from contracts/data-storage/andromeda-graph/src/testing/tests.rs rename to contracts/math/andromeda-graph/src/testing/tests.rs index 8ab5e9cc2..822b65387 100644 --- a/contracts/data-storage/andromeda-graph/src/testing/tests.rs +++ b/contracts/math/andromeda-graph/src/testing/tests.rs @@ -1,6 +1,6 @@ use crate::testing::mock_querier::MOCK_POINT_CONTRACT; -use andromeda_data_storage::graph::{Coordinate, MapInfo, MapSize, StoredDate}; -use andromeda_data_storage::graph::{CoordinateInfo, GetMapInfoResponse}; +use andromeda_math::graph::{Coordinate, MapInfo, MapSize, StoredDate}; +use andromeda_math::graph::{CoordinateInfo, GetMapInfoResponse}; use andromeda_std::amp::AndrAddr; use andromeda_std::error::ContractError; diff --git a/contracts/modules/andromeda-curve/.cargo/config b/contracts/math/andromeda-point/.cargo/config similarity index 100% rename from contracts/modules/andromeda-curve/.cargo/config rename to contracts/math/andromeda-point/.cargo/config diff --git a/contracts/data-storage/andromeda-point/Cargo.toml b/contracts/math/andromeda-point/Cargo.toml similarity index 95% rename from contracts/data-storage/andromeda-point/Cargo.toml rename to contracts/math/andromeda-point/Cargo.toml index 664e9fb0f..149355a48 100644 --- a/contracts/data-storage/andromeda-point/Cargo.toml +++ b/contracts/math/andromeda-point/Cargo.toml @@ -29,10 +29,8 @@ cosmwasm-schema = { workspace = true } cw-storage-plus = { workspace = true } cw-utils = { workspace = true } - andromeda-std = { workspace = true, features = ["rates"] } -andromeda-data-storage = { workspace = true } - +andromeda-math = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] cw-multi-test = { workspace = true, optional = true } diff --git a/contracts/math/andromeda-point/examples/schema.rs b/contracts/math/andromeda-point/examples/schema.rs new file mode 100644 index 000000000..5c409d593 --- /dev/null +++ b/contracts/math/andromeda-point/examples/schema.rs @@ -0,0 +1,10 @@ +use andromeda_math::point::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use cosmwasm_schema::write_api; +fn main() { + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + + } +} diff --git a/contracts/data-storage/andromeda-point/src/contract.rs b/contracts/math/andromeda-point/src/contract.rs similarity index 96% rename from contracts/data-storage/andromeda-point/src/contract.rs rename to contracts/math/andromeda-point/src/contract.rs index f7c9f7054..87827c0cd 100644 --- a/contracts/data-storage/andromeda-point/src/contract.rs +++ b/contracts/math/andromeda-point/src/contract.rs @@ -7,7 +7,7 @@ use crate::{ query::{get_data_owner, get_point}, state::RESTRICTION, }; -use andromeda_data_storage::point::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::point::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::{ ado_base::{InstantiateMsg as BaseInstantiateMsg, MigrateMsg}, ado_contract::ADOContract, diff --git a/contracts/data-storage/andromeda-point/src/execute.rs b/contracts/math/andromeda-point/src/execute.rs similarity index 98% rename from contracts/data-storage/andromeda-point/src/execute.rs rename to contracts/math/andromeda-point/src/execute.rs index 0cafa992d..7fb4e09c2 100644 --- a/contracts/data-storage/andromeda-point/src/execute.rs +++ b/contracts/math/andromeda-point/src/execute.rs @@ -1,4 +1,4 @@ -use andromeda_data_storage::point::{ExecuteMsg, PointCoordinate, PointRestriction}; +use andromeda_math::point::{ExecuteMsg, PointCoordinate, PointRestriction}; use andromeda_std::{ ado_base::rates::{Rate, RatesMessage}, ado_contract::ADOContract, diff --git a/contracts/data-storage/andromeda-point/src/lib.rs b/contracts/math/andromeda-point/src/lib.rs similarity index 100% rename from contracts/data-storage/andromeda-point/src/lib.rs rename to contracts/math/andromeda-point/src/lib.rs diff --git a/contracts/data-storage/andromeda-point/src/mock.rs b/contracts/math/andromeda-point/src/mock.rs similarity index 98% rename from contracts/data-storage/andromeda-point/src/mock.rs rename to contracts/math/andromeda-point/src/mock.rs index a3c8db352..3e4678b5c 100644 --- a/contracts/data-storage/andromeda-point/src/mock.rs +++ b/contracts/math/andromeda-point/src/mock.rs @@ -1,6 +1,6 @@ #![cfg(all(not(target_arch = "wasm32"), feature = "testing"))] use crate::contract::{execute, instantiate, query}; -use andromeda_data_storage::point::{ +use andromeda_math::point::{ ExecuteMsg, GetDataOwnerResponse, InstantiateMsg, PointCoordinate, PointRestriction, QueryMsg, }; use andromeda_std::ado_base::rates::{Rate, RatesMessage}; diff --git a/contracts/data-storage/andromeda-point/src/query.rs b/contracts/math/andromeda-point/src/query.rs similarity index 91% rename from contracts/data-storage/andromeda-point/src/query.rs rename to contracts/math/andromeda-point/src/query.rs index 9bf6915b2..e94c62fcd 100644 --- a/contracts/data-storage/andromeda-point/src/query.rs +++ b/contracts/math/andromeda-point/src/query.rs @@ -1,5 +1,5 @@ use crate::state::{DATA, DATA_OWNER, RESTRICTION}; -use andromeda_data_storage::point::{GetDataOwnerResponse, PointCoordinate, PointRestriction}; +use andromeda_math::point::{GetDataOwnerResponse, PointCoordinate, PointRestriction}; use andromeda_std::{ado_contract::ADOContract, amp::AndrAddr, error::ContractError}; use cosmwasm_std::{Addr, Storage}; diff --git a/contracts/data-storage/andromeda-point/src/state.rs b/contracts/math/andromeda-point/src/state.rs similarity index 77% rename from contracts/data-storage/andromeda-point/src/state.rs rename to contracts/math/andromeda-point/src/state.rs index bec7a75e2..421b7fb1f 100644 --- a/contracts/data-storage/andromeda-point/src/state.rs +++ b/contracts/math/andromeda-point/src/state.rs @@ -1,4 +1,4 @@ -use andromeda_data_storage::point::{PointCoordinate, PointRestriction}; +use andromeda_math::point::{PointCoordinate, PointRestriction}; use cosmwasm_std::Addr; use cw_storage_plus::Item; diff --git a/contracts/data-storage/andromeda-point/src/testing/mock.rs b/contracts/math/andromeda-point/src/testing/mock.rs similarity index 98% rename from contracts/data-storage/andromeda-point/src/testing/mock.rs rename to contracts/math/andromeda-point/src/testing/mock.rs index db31d1363..3dbcd2f4a 100644 --- a/contracts/data-storage/andromeda-point/src/testing/mock.rs +++ b/contracts/math/andromeda-point/src/testing/mock.rs @@ -1,4 +1,4 @@ -use andromeda_data_storage::point::{ +use andromeda_math::point::{ ExecuteMsg, InstantiateMsg, PointCoordinate, PointRestriction, QueryMsg, }; use andromeda_std::{ diff --git a/contracts/modules/andromeda-date-time/src/testing/mod.rs b/contracts/math/andromeda-point/src/testing/mod.rs similarity index 100% rename from contracts/modules/andromeda-date-time/src/testing/mod.rs rename to contracts/math/andromeda-point/src/testing/mod.rs diff --git a/contracts/data-storage/andromeda-point/src/testing/tests.rs b/contracts/math/andromeda-point/src/testing/tests.rs similarity index 99% rename from contracts/data-storage/andromeda-point/src/testing/tests.rs rename to contracts/math/andromeda-point/src/testing/tests.rs index f87cf17a4..b051ad75e 100644 --- a/contracts/data-storage/andromeda-point/src/testing/tests.rs +++ b/contracts/math/andromeda-point/src/testing/tests.rs @@ -1,5 +1,5 @@ use crate::contract::{execute, query}; -use andromeda_data_storage::point::{ +use andromeda_math::point::{ ExecuteMsg, GetDataOwnerResponse, PointCoordinate, PointRestriction, QueryMsg, }; use cosmwasm_std::{ diff --git a/contracts/modules/andromeda-shunting/.cargo/config b/contracts/math/andromeda-shunting/.cargo/config similarity index 100% rename from contracts/modules/andromeda-shunting/.cargo/config rename to contracts/math/andromeda-shunting/.cargo/config diff --git a/contracts/modules/andromeda-shunting/Cargo.toml b/contracts/math/andromeda-shunting/Cargo.toml similarity index 95% rename from contracts/modules/andromeda-shunting/Cargo.toml rename to contracts/math/andromeda-shunting/Cargo.toml index d4b7a9031..25f6efe14 100644 --- a/contracts/modules/andromeda-shunting/Cargo.toml +++ b/contracts/math/andromeda-shunting/Cargo.toml @@ -20,7 +20,7 @@ cw-utils = { workspace = true } cw2 = { workspace = true } cosmwasm-schema = { workspace = true } andromeda-std = { workspace = true, features = [] } -andromeda-modules = { workspace = true } +andromeda-math = { workspace = true } simple-shunting = "0.1.2" serde-cw-value = "0.7.0" diff --git a/contracts/modules/andromeda-shunting/README.md b/contracts/math/andromeda-shunting/README.md similarity index 100% rename from contracts/modules/andromeda-shunting/README.md rename to contracts/math/andromeda-shunting/README.md diff --git a/contracts/modules/andromeda-curve/examples/schema.rs b/contracts/math/andromeda-shunting/examples/schema.rs similarity index 72% rename from contracts/modules/andromeda-curve/examples/schema.rs rename to contracts/math/andromeda-shunting/examples/schema.rs index a54e619ad..953e5b747 100644 --- a/contracts/modules/andromeda-curve/examples/schema.rs +++ b/contracts/math/andromeda-shunting/examples/schema.rs @@ -1,4 +1,4 @@ -use andromeda_modules::curve::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::shunting::{ExecuteMsg, InstantiateMsg, QueryMsg}; use cosmwasm_schema::write_api; fn main() { write_api! { diff --git a/contracts/modules/andromeda-shunting/src/contract.rs b/contracts/math/andromeda-shunting/src/contract.rs similarity index 98% rename from contracts/modules/andromeda-shunting/src/contract.rs rename to contracts/math/andromeda-shunting/src/contract.rs index bf48a46c4..67111dd07 100644 --- a/contracts/modules/andromeda-shunting/src/contract.rs +++ b/contracts/math/andromeda-shunting/src/contract.rs @@ -1,6 +1,6 @@ -use andromeda_modules::shunting::ShuntingResponse; +use andromeda_math::shunting::ShuntingResponse; #[cfg(not(feature = "library"))] -use andromeda_modules::shunting::{ +use andromeda_math::shunting::{ EvaluateParam, EvaluateRefParam, ExecuteMsg, InstantiateMsg, QueryMsg, }; use andromeda_std::{ diff --git a/contracts/modules/andromeda-shunting/src/interface.rs b/contracts/math/andromeda-shunting/src/interface.rs similarity index 73% rename from contracts/modules/andromeda-shunting/src/interface.rs rename to contracts/math/andromeda-shunting/src/interface.rs index db0902ef4..fc1b36316 100644 --- a/contracts/modules/andromeda-shunting/src/interface.rs +++ b/contracts/math/andromeda-shunting/src/interface.rs @@ -1,4 +1,4 @@ -use andromeda_modules::shunting::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use andromeda_math::shunting::{ExecuteMsg, InstantiateMsg, QueryMsg}; use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata}; pub const CONTRACT_ID: &str = "shunting"; diff --git a/contracts/modules/andromeda-shunting/src/lib.rs b/contracts/math/andromeda-shunting/src/lib.rs similarity index 100% rename from contracts/modules/andromeda-shunting/src/lib.rs rename to contracts/math/andromeda-shunting/src/lib.rs diff --git a/contracts/modules/andromeda-shunting/src/mock.rs b/contracts/math/andromeda-shunting/src/mock.rs similarity index 97% rename from contracts/modules/andromeda-shunting/src/mock.rs rename to contracts/math/andromeda-shunting/src/mock.rs index 7252d4ed2..9e9fd8e94 100644 --- a/contracts/modules/andromeda-shunting/src/mock.rs +++ b/contracts/math/andromeda-shunting/src/mock.rs @@ -1,7 +1,7 @@ #![cfg(all(not(target_arch = "wasm32"), feature = "testing"))] use crate::contract::{execute, instantiate, query}; -use andromeda_modules::shunting::{ +use andromeda_math::shunting::{ EvaluateParam, ExecuteMsg, InstantiateMsg, QueryMsg, ShuntingResponse, }; use cosmwasm_std::{Addr, Empty}; diff --git a/contracts/modules/andromeda-shunting/src/state.rs b/contracts/math/andromeda-shunting/src/state.rs similarity index 100% rename from contracts/modules/andromeda-shunting/src/state.rs rename to contracts/math/andromeda-shunting/src/state.rs diff --git a/contracts/modules/andromeda-shunting/src/testing/mod.rs b/contracts/math/andromeda-shunting/src/testing/mod.rs similarity index 100% rename from contracts/modules/andromeda-shunting/src/testing/mod.rs rename to contracts/math/andromeda-shunting/src/testing/mod.rs diff --git a/contracts/modules/andromeda-shunting/src/testing/tests.rs b/contracts/math/andromeda-shunting/src/testing/tests.rs similarity index 91% rename from contracts/modules/andromeda-shunting/src/testing/tests.rs rename to contracts/math/andromeda-shunting/src/testing/tests.rs index fae4317d3..134e8e034 100644 --- a/contracts/modules/andromeda-shunting/src/testing/tests.rs +++ b/contracts/math/andromeda-shunting/src/testing/tests.rs @@ -1,7 +1,7 @@ use crate::contract::{instantiate, query}; pub use andromeda_std::testing::mock_querier::MOCK_KERNEL_CONTRACT; -use andromeda_modules::shunting::{EvaluateParam, InstantiateMsg, QueryMsg, ShuntingResponse}; +use andromeda_math::shunting::{EvaluateParam, InstantiateMsg, QueryMsg, ShuntingResponse}; use cosmwasm_std::{ from_json, testing::{mock_dependencies, mock_env, mock_info}, diff --git a/packages/andromeda-accounts/Cargo.toml b/packages/andromeda-accounts/Cargo.toml new file mode 100644 index 000000000..3c21bbed6 --- /dev/null +++ b/packages/andromeda-accounts/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "andromeda-accounts" +version = "1.0.0" +edition = "2018" +rust-version = "1.75.0" +description = "Utility methods and message definitions for the Andromeda Accounts Contracts" +license = "MIT" + +[features] +backtraces = ["cosmwasm-std/backtraces"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +crate-type = ["cdylib", "rlib"] + +[dependencies] +cosmwasm-std = { workspace = true } +cosmwasm-schema = { workspace = true } +cw3 = { workspace = true } +cw-utils = { workspace = true } + +andromeda-std = { workspace = true, features = [] } diff --git a/packages/andromeda-finance/src/fixed_multisig.rs b/packages/andromeda-accounts/src/fixed_multisig.rs similarity index 100% rename from packages/andromeda-finance/src/fixed_multisig.rs rename to packages/andromeda-accounts/src/fixed_multisig.rs diff --git a/packages/andromeda-accounts/src/lib.rs b/packages/andromeda-accounts/src/lib.rs new file mode 100644 index 000000000..59dc27c94 --- /dev/null +++ b/packages/andromeda-accounts/src/lib.rs @@ -0,0 +1 @@ +pub mod fixed_multisig; diff --git a/packages/andromeda-data-storage/src/lib.rs b/packages/andromeda-data-storage/src/lib.rs index ec92895be..35859a631 100644 --- a/packages/andromeda-data-storage/src/lib.rs +++ b/packages/andromeda-data-storage/src/lib.rs @@ -1,6 +1,3 @@ pub mod boolean; -pub mod counter; -pub mod graph; -pub mod point; pub mod primitive; pub mod string_storage; diff --git a/packages/andromeda-finance/src/lib.rs b/packages/andromeda-finance/src/lib.rs index 50141a6b7..dabe894a2 100644 --- a/packages/andromeda-finance/src/lib.rs +++ b/packages/andromeda-finance/src/lib.rs @@ -1,6 +1,5 @@ pub mod conditional_splitter; pub mod cross_chain_swap; -pub mod fixed_multisig; pub mod rate_limiting_withdrawals; pub mod set_amount_splitter; pub mod splitter; diff --git a/packages/andromeda-math/Cargo.toml b/packages/andromeda-math/Cargo.toml new file mode 100644 index 000000000..8dc6cd570 --- /dev/null +++ b/packages/andromeda-math/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "andromeda-math" +version = "1.0.0" +edition = "2018" +rust-version = "1.75.0" +description = "Utility methods and message definitions for the Andromeda Math Contracts" +license = "MIT" + +[features] +backtraces = ["cosmwasm-std/backtraces"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +crate-type = ["cdylib", "rlib"] + +[dependencies] +cosmwasm-std = { workspace = true } +cosmwasm-schema = { workspace = true } +cw-utils = { workspace = true } + +andromeda-std = { workspace = true, features = [] } diff --git a/packages/andromeda-data-storage/src/counter.rs b/packages/andromeda-math/src/counter.rs similarity index 100% rename from packages/andromeda-data-storage/src/counter.rs rename to packages/andromeda-math/src/counter.rs diff --git a/packages/andromeda-modules/src/curve.rs b/packages/andromeda-math/src/curve.rs similarity index 100% rename from packages/andromeda-modules/src/curve.rs rename to packages/andromeda-math/src/curve.rs diff --git a/packages/andromeda-modules/src/date_time.rs b/packages/andromeda-math/src/date_time.rs similarity index 100% rename from packages/andromeda-modules/src/date_time.rs rename to packages/andromeda-math/src/date_time.rs diff --git a/packages/andromeda-data-storage/src/graph.rs b/packages/andromeda-math/src/graph.rs similarity index 100% rename from packages/andromeda-data-storage/src/graph.rs rename to packages/andromeda-math/src/graph.rs diff --git a/packages/andromeda-math/src/lib.rs b/packages/andromeda-math/src/lib.rs new file mode 100644 index 000000000..951fd9bf5 --- /dev/null +++ b/packages/andromeda-math/src/lib.rs @@ -0,0 +1,6 @@ +pub mod counter; +pub mod curve; +pub mod date_time; +pub mod graph; +pub mod point; +pub mod shunting; diff --git a/packages/andromeda-data-storage/src/point.rs b/packages/andromeda-math/src/point.rs similarity index 100% rename from packages/andromeda-data-storage/src/point.rs rename to packages/andromeda-math/src/point.rs diff --git a/packages/andromeda-modules/src/shunting.rs b/packages/andromeda-math/src/shunting.rs similarity index 100% rename from packages/andromeda-modules/src/shunting.rs rename to packages/andromeda-math/src/shunting.rs diff --git a/packages/andromeda-modules/src/lib.rs b/packages/andromeda-modules/src/lib.rs index 6ac3bfda7..600952077 100644 --- a/packages/andromeda-modules/src/lib.rs +++ b/packages/andromeda-modules/src/lib.rs @@ -1,5 +1,2 @@ pub mod address_list; -pub mod curve; -pub mod date_time; pub mod rates; -pub mod shunting; diff --git a/packages/deploy/Cargo.toml b/packages/deploy/Cargo.toml index f7f014e28..6bd378fc5 100644 --- a/packages/deploy/Cargo.toml +++ b/packages/deploy/Cargo.toml @@ -53,7 +53,6 @@ andromeda-set-amount-splitter = { path = "../../contracts/finance/andromeda-set- andromeda-weighted-distribution-splitter = { path = "../../contracts/finance/andromeda-weighted-distribution-splitter" } # Data Storage Contracts -andromeda-counter = { path = "../../contracts/data-storage/andromeda-counter" } andromeda-primitive = { path = "../../contracts/data-storage/andromeda-primitive" } andromeda-boolean = { path = "../../contracts/data-storage/andromeda-boolean" } andromeda-string-storage = { path = "../../contracts/data-storage/andromeda-string-storage" } @@ -76,10 +75,13 @@ andromeda-app-contract = { path = "../../contracts/app/andromeda-app-contract" } # Modules Contracts andromeda-address-list = { path = "../../contracts/modules/andromeda-address-list" } -andromeda-curve = { path = "../../contracts/modules/andromeda-curve" } -andromeda-date-time = { path = "../../contracts/modules/andromeda-date-time" } andromeda-rates = { path = "../../contracts/modules/andromeda-rates" } -andromeda-shunting = { path = "../../contracts/modules/andromeda-shunting" } + +# Math Contracts +andromeda-counter = { path = "../../contracts/math/andromeda-counter" } +andromeda-curve = { path = "../../contracts/math/andromeda-curve" } +andromeda-date-time = { path = "../../contracts/math/andromeda-date-time" } +andromeda-shunting = { path = "../../contracts/math/andromeda-shunting" } andromeda-std = { workspace = true } env_logger = "0.11.5" diff --git a/tests-integration/Cargo.toml b/tests-integration/Cargo.toml index 96302c2cf..50940b47d 100644 --- a/tests-integration/Cargo.toml +++ b/tests-integration/Cargo.toml @@ -88,16 +88,9 @@ andromeda-data-storage = { workspace = true } andromeda-primitive = { path = "../contracts/data-storage/andromeda-primitive", features = [ "testing", ] } -andromeda-counter = { path = "../contracts/data-storage/andromeda-counter", features = [ - "testing", -] } # #OS -andromeda-shunting = { path = "../contracts/modules/andromeda-shunting", features = [ - "testing", -] } - andromeda-kernel = { path = "../contracts/os/andromeda-kernel", features = [ "testing", ] } @@ -114,6 +107,15 @@ andromeda-vfs = { path = "../contracts/os/andromeda-vfs", features = [ "testing", ] } +# # Math +andromeda-math = { workspace = true } +andromeda-counter = { path = "../contracts/math/andromeda-counter", features = [ + "testing", +] } +andromeda-shunting = { path = "../contracts/math/andromeda-shunting", features = [ + "testing", +] } + #Other Crates # common = { version = "0.1.0", path = "../packages/common" } diff --git a/tests-integration/tests/kernel_orch.rs b/tests-integration/tests/kernel_orch.rs index 6a35c0be6..590cf2006 100644 --- a/tests-integration/tests/kernel_orch.rs +++ b/tests-integration/tests/kernel_orch.rs @@ -1,13 +1,13 @@ use andromeda_adodb::ADODBContract; use andromeda_counter::CounterContract; -use andromeda_data_storage::counter::{ - CounterRestriction, ExecuteMsg as CounterExecuteMsg, GetCurrentAmountResponse, - InstantiateMsg as CounterInstantiateMsg, State, -}; use andromeda_economics::EconomicsContract; use andromeda_finance::splitter::{ AddressPercent, ExecuteMsg as SplitterExecuteMsg, InstantiateMsg as SplitterInstantiateMsg, }; +use andromeda_math::counter::{ + CounterRestriction, ExecuteMsg as CounterExecuteMsg, GetCurrentAmountResponse, + InstantiateMsg as CounterInstantiateMsg, State, +}; use andromeda_kernel::KernelContract; use andromeda_splitter::SplitterContract; @@ -238,7 +238,7 @@ fn test_kernel_ibc_execute_only() { }; let current_count: GetCurrentAmountResponse = counter_osmosis - .query(&andromeda_data_storage::counter::QueryMsg::GetCurrentAmount {}) + .query(&andromeda_math::counter::QueryMsg::GetCurrentAmount {}) .unwrap(); assert_eq!(current_count.current_amount, 1); } @@ -577,7 +577,7 @@ fn test_kernel_ibc_execute_only_multi_hop() { // Send a message to the counter on andromeda let current_count: GetCurrentAmountResponse = counter_andromeda - .query(&andromeda_data_storage::counter::QueryMsg::GetCurrentAmount {}) + .query(&andromeda_math::counter::QueryMsg::GetCurrentAmount {}) .unwrap(); assert_eq!(current_count.current_amount, 1); } diff --git a/tests-integration/tests/shunting.rs b/tests-integration/tests/shunting.rs index 23431a418..0bf93cd9d 100644 --- a/tests-integration/tests/shunting.rs +++ b/tests-integration/tests/shunting.rs @@ -7,7 +7,7 @@ use andromeda_testing::{ use cosmwasm_std::to_json_binary; -use andromeda_modules::shunting::{EvaluateParam, EvaluateRefParam, ShuntingResponse}; +use andromeda_math::shunting::{EvaluateParam, EvaluateRefParam, ShuntingResponse}; use andromeda_shunting::mock::{ mock_andromeda_shunting, mock_shunting_evaluate, mock_shunting_instantiate_msg, MockShunting, };